KentDRuddick
asked on
Calling external DLL, How to declare and get values.
Hello,
I have a DLL I wrote in PowerBasic where I have a function declared like this:
FUNCTION GetAllAdapters(Target2 AS ASCIIZ) EXPORT AS LONG (the long is a lpstr)
In my Delphi code I declared this function like this:
Function GETALLADAPTERS(Target2:lps tr): lpstr; Â External 'newnic2.dll';
My question is how to set up the call with the string pointers and read the string from the pointer returned. I have tried a couple of different things, but I cannot narrow down the problem to my declare or the call.
Any help is appreciated.
Thanks
Kent
I have a DLL I wrote in PowerBasic where I have a function declared like this:
FUNCTION GetAllAdapters(Target2 AS ASCIIZ) EXPORT AS LONG (the long is a lpstr)
In my Delphi code I declared this function like this:
Function GETALLADAPTERS(Target2:lps
My question is how to set up the call with the string pointers and read the string from the pointer returned. I have tried a couple of different things, but I cannot narrow down the problem to my declare or the call.
Any help is appreciated.
Thanks
Kent
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Just what I needed.
Thanks
Kent