delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

Treat all DLLs as if they were written in other languages and use API-style management: this is somewhat reasonable, in that if a project is written in more than one language anyway, then simply not using any Delphi-specific constructs across DLLs, may not add any more complexity. A disadvantage is that many Delphi constructs will not be available (objects, strings, dynamic arrays, etc).
.
But how to implement it? Please guide me, I want to pass PChar type string to a dll method which receive it as Char *.


Hi,
There is a dll that i am calling. I am having no problem in loading and calling some function which accept Char * .. i am using PChar to send parameters to this method.
But when i tried to call a method which received 2 char *, one bool and one Handle, it is raising exception. I have studied article of Delphi Shared Memory issue
http://delphi.about.com/od/objectpascalide/l/aa103003b.htm
but i am unable to get how to do it.
Now, my dll is writen in C and i guess this will be better approach writen in this very article
Treat all DLLs as if they were written in other languages and use API-style management: this is somewhat reasonable, in that if a project is written in more than one language anyway, then simply not using any Delphi-specific constructs across DLLs, may not add any more complexity. A disadvantage is that many Delphi constructs will not be available (objects, strings, dynamic arrays, etc).
.
But how to implement it? Please guide me, I want to pass PChar type string to a dll method which receive it as Char *.

TOP

Are the function declarations in the DLL and your application using the same calling convention?



Treat all DLLs as if they were written in other languages and use API-style management: this is somewhat reasonable, in that if a project is written in more than one language anyway, then simply not using any Delphi-specific constructs across DLLs, may not add any more complexity. A disadvantage is that many Delphi constructs will not be available (objects, strings, dynamic arrays, etc).
.
But how to implement it? Please guide me, I want to pass PChar type string to a dll method which receive it as Char *.

TOP

Back Forum