NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Pointer to array within a dll

Hello,

iam trying to access a function within a Dll, programmed with Borland C++ Builder.
Prototype of function: int GetImage(char *pBuf, DWORD *pdwLen)

Normaly the function returns an state, fills up the pBuf and the pdwLen.

I created a new Action-Step in Teststand with the C++ Dll Adapter.
There the function will be called with the corresponding parameters.

But the return value is the error code 5(it means, pBuf or pdwLen == NULL).

How can i assign the right parameters?

Any idea?

Thanks a lot.

Ronny
0 Kudos
Message 1 of 2
(3,058 Views)
Hi Tiny-Toon,

you can either set your parameters manually or use a typelibrary to provide the prototype information of your functions for TestStand.

When you define the parameters as "C String (const)" and "Signed 32 bit integer" you should be able to assign the parameters of the dll (See the attached screenshot for these settings).

For more information about typelibraries the following link should be helpful:

http://digital.ni.com/public.nsf/websearch/F0C4A21E73C80FC986256802007D099A?OpenDocument

regards,

Nikolai
0 Kudos
Message 2 of 2
(3,027 Views)