DLLs and String arrays

Richard B.
Havant, Hampshire

Dec 3, 2009
3 Posts

0  |  0  

Re: DLLs and String arrays

I am writing an ATEasy DLL which, inturn calls another.
The 3rd party dll function has the following arguments.
( int ncnt, char** inst, char* res ), where ncnt is number of strings in inst.
I have the following message from ATEasy compiler :
Warning : ATEasy not support calling function with array from external application use DWord type and MemoryCopy instead

Can you please show me how you would handle this? thanks.

DrATEasy (Ron Y.)
Mission Viejo, CA

Dec 3, 2009
367 Posts

0  |  0  

Re: DLLs and String arrays

Here is an example:

adw[100]: Dword
as[100]: string

for i=0 to 99
    as[i]="abc"  ! fill in to allocate string
    MemoryCopy( &adw[I] , &as[i],  4)  ! copy the string array address
Next

MyDllFunctionCall( … , adw, …)


Note: the DLL function array of string parameter is defined as Val Dword[] instead of Val String[].


Ronnie



Please Note
You need to have a M@GIC account to participate in the Forums.
Not yet registered on our website? Click here to register today!

All content, information and opinions presented on the Marvin Test Solutions User Forums are those of the authors of the posts and messages and not Marvin Test Solutions'. All attachments and files are downloaded at your own risk. [Read More]