NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Is their a possibility to call SDK functions from TestStand directly?

Hello!
 
I want to call a function from the Windows SDK.
Is this possible?
 
Regards,
 
Brosig
 
Using TestStand 3.5 and Windows XP
0 Kudos
Message 1 of 9
(4,392 Views)
Brosig,

the SDK is nothing but a collection of windows-DLLs. so you can call the SDK directly via the DLL-adapter. but take care because the SDK-DLLs do not contain infos on the prototypes on their own. so you got to build your own prototypes of the functions on your own.

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 9
(4,373 Views)

Hello,

I tried calling a SDK function via the dll-adapter with added prototype. But when I run this step, it stops with a Message "... could not find pdb-File...". I think PDB files can be created by compiling a Visual Studio Project. But I can not create a pdb-File for SDK dll. So I thought it is only possible to call function from a dll which I create on myself. Is there a workaround?

Regards,

Brosig

0 Kudos
Message 3 of 9
(4,370 Views)

What function was you trying to call?

Ray

Regards
Ray Farmer
0 Kudos
Message 4 of 9
(4,367 Views)
and to complete rays question: which DLL do you exactly use?

:)

Norbert B.
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 5 of 9
(4,365 Views)
I tried to call GetPrivateProfileStringA() from kernel32.dll.
 
Regards,
 
Brosig
0 Kudos
Message 6 of 9
(4,363 Views)
Brosig,

sadly i dont know what the error with the pdb-file could be. but as far as i see from the description to the function found here, there should be no such dependency.
please take a look into the "requirements"-section of the link. it seems that kernel32.dll is sufficient for usage of the function. and for myself, i never had such problems when using the kernel32.dll.....
one problem could be the type of the parameter you are using. i know that there are sometimes odd issues on SDK when the parameters do not fit exactly the needed type.  so make sure that all strings are null-terminated and the buffers you pass are preallocated!

Norbert B.
Edit: forgot the link.....

Message Edited by Norbert B on 12-22-2005 09:31 AM

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 9
(4,358 Views)

Hi,

I think there was an example on the NI web site. If not I might still have the example somewhere.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 8 of 9
(4,350 Views)
Hello all together and a happy new year!
 
I found the reason for the error/warning message.
 
All the time I was testing the sequence with the function call step with F8 (Step Into).
When I run the sequence normal it runs fine.
 
A typical Userfailure.
 
Thanks for all your responses.
 
Regards,
 
M. Brosig
0 Kudos
Message 9 of 9
(4,275 Views)