Link to home
Start Free TrialLog in
Avatar of KentDRuddick
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:lpstr): 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
ASKER CERTIFIED SOLUTION
Avatar of Lee_Nover
Lee_Nover

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KentDRuddick
KentDRuddick

ASKER



Just what I needed.

Thanks
Kent