![]() |
fill pointer in DLL from app
How to pass the parameter to DLL, the parameter is a pointer to the record .
in my Dll i have :
Delphi-Quellcode:
so how could i fill this parameter from my app;
type
PList = ^AList; AList = record nam:String; Orders: TList; end; regards |
Re: fill pointer in DLL from app
you have to work with sharemem because in your record are objects and dynamic strings.
Then you have to call your function in your dll like any other function. But I wunder. You use a record and a TList object. So you mix global programming with oop. why don't you use only one of both? |
Re: fill pointer in DLL from app
With the use of sharemem or fastmm you can pass the string from the app to the dll, but an object instance (simple VCL objects) will not work correctly.
|
Re: fill pointer in DLL from app
thank SirThornberry , but is there any other alternative so that i can use Strings in my Dll without using ShareMem unit .
Because when using ShareMem i think my Dll will be used only by My app . |
Re: fill pointer in DLL from app
use PChar as type for strings and do it like the WinAPI: the caller has to allocate the memory for results and the DLL fills the memory of the app - or returns the needed space, if the allocation is is too small.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:40 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz