NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access a dll

HI,
 
I"m using TS3.5
I'm given a dll file, lib file and many h files and a sample test in c file. (no source files for the dll)
 
I was able to run this c file under Labwindows/CVI, link it and run it ok.  (The file creats a TCP/IP link and run a test on SmartBits equiptment.)
 
Now, I'm wishing to run the same functions executed in CVI from TestStand.
 
I created an Action step using the  c/c++ dll adaptor.  In the 'specify module' window, I specified the dll and selected the function.
I get   'This function either does not have parameter information in the dll or uses types not recognized by TestStand'.
 
Is there a way out?
 
I put all the files under one directory.
 
Thanks and regards
Rafi
0 Kudos
Message 1 of 7
(5,350 Views)

Hi Rafi,

Can you not just create a wrapper function that interfaces your dll function to TestStand instead of trying to call the dll function direct from TestStand.

Regards

Ray

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(5,338 Views)

Hi Ray,

That's exactly whay I'm doing right now....

However, I thought there's a way to access it directly and wondered how to do it

 

Thanks

Rafi

0 Kudos
Message 3 of 7
(5,331 Views)

Hi Rafi

Do know the Tool "Dependeny Walker"?   You can download it at http://dependencywalker.com/ . With it you can look "inside" your dll
and maybe find your right parameter definition.

Hope this helps a little bit

Greetings

Juergen

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 7
(5,328 Views)
Would it be possible to post your dll Rafi? I would like to replicate the behavior on my machine.
Nestor
0 Kudos
Message 5 of 7
(5,307 Views)
I get these all the time with the DLL's I use.  I assume you know the variables types of the function call.  In that case, after closing the warning box, click on the NEW button next to prototype.  This creates a dummy variable that you will need to match to your function call.  Create as many variables and match them up as necessary, and the function will work.
0 Kudos
Message 6 of 7
(5,293 Views)
Although, this thread is a few days old, I like to post my experiance here - maybe it's useful for other users...

The last message is just a workaround (a quite tiring one). The reason is for sure at least 1 type in the function call that is unknown by TestStand. I guess, it's "CAObjHandle". Just replace it by its basetype "int" and it's working. Same on structs and other derived types.

I wonder, how to learn those types to TestStand. I'm quite sure that my example worked before, until it changed with a CVI version update.

If anyone knows, how to declare types to TestStand, please post here.
0 Kudos
Message 7 of 7
(5,077 Views)