09-15-2011 01:38 AM
I'd like to use .dll files which were developed for another application.
I'm using TS 4.0 which is recognising dll's function but when try to run it it's not working.
I thought it won't be so straightforward, I attached specify module part.
Any help would be appreciated.
Thanks
Solved! Go to Solution.
09-15-2011 02:40 PM
It is quite difficult to provide a solution to your problem as you missed to tell us what kind of error you get.
My guess: Your functions take parameters and you did not specify any.
09-16-2011 03:09 AM
Thanks Guenter for your reply.
It looks like the "DllInit" function is partly working.
The dll called function is starting, but immediately closing down.
I tried to change the unload options, but nothing has changed.
Another question is: how to give parameters to the dll.
In the original application it looked like this:
csAudio.dll,LOADPRESET wattmeter.atp
csAudio.dll,SHOWDIA
csAudio.dll,STARTMEAS
csAudio.dll,MBOK, ...
09-16-2011 11:50 AM
Do you have a specification of this DLL's functions? This should clarify the parameter(s) each function takes.
How parameters are passed to a DLL in TestStand can be taken from the examples that ship with TestStand.
Guenter
09-20-2011 04:37 AM
Dear kopisti,
Rearding we talked over phone about this problem, let me share the current state in nutshell also on this forum:
The dll you use doesn't contain the prototype of the functions. Like: int func(int a, int b ...) So we don't know any parameters about how to call those 4 functions: CallAT(), EntryPoint(), DllInit(), DllFree()
Since the TestStand is a very flexible environment, you can provide this prototypes manually by adding those parameters in dll module.
If you could reach somehow the documentation of the Dll, it's very strait forward to do it, and any case we can provide you help. Maybe you can also ask for support by the developer company of the Dll, or the developer of the old test-program which called this dll.
We also mentioned that this Dll is possibly an interface to reach a ActiveX/COM Server. By-passing this dll you can also use ActiveX/COM TestStand module to call directly the ActiveX functionality.
Feel free to contact us in any progress or questions on this topic, and/or share with public here in the forum your knowledge.
Best Regards:
Tamas Szekely
Applications Engineer Hungary - National Instruments
09-23-2011 06:02 AM - edited 09-23-2011 06:06 AM
Dear All,
Thank you for your effort trying to help me out and find a solution.
In the meantime the problem has been solved.
The csAudio.dll was an interface between the original application and a DLL which has the full function as an executable.
I didn't see this at the first time, as I could see only csAudio.dll.
The other DLL (an audiotester) has a function that uses parameters. One of them is a pointer to a zero terminated string (CString).
The other two:
- ReceiveBuffer is a passed variable which will be filled by the DLL and contains results from
the DLL.
- ReceiveBufferLen is an integer variable which contains the length of the string buffer.
The result of the DLL should be zero.
The only problem still exist is that if I call this DLL to stop TestStand freezes.
So I skipped this step and it looks like TS closes and unload the DLL's function when sequence finished.
Best regards,
kopisti
04-11-2012 03:26 AM
I am using adlink PCI 7841, i am getting "build error" when i tried to create a dll ,please help me
error which i got
Error 1 occurred at AB_Destination.lvclass:Copy_File.vi -> AB_Source.lvclass:Copy_SourceItem.vi -> AB_Build.lvclass:Copy_Files.vi -> AB_Application.lvclass:Copy_Files.vi -> AB_DLL.lvclass:Copy_Files.vi -> AB_Build.lvclass:Build.vi -> AB_Application.lvclass:Build.vi -> AB_DLL.lvclass:Build.vi -> AB_Build.lvclass:Build_from_Wizard.vi -> AB_UI_Frmwk_Build.lvclass:Build.vi -> AB_UI_FRAMEWORK.vi -> AB_CreateNewWizard_Invoke_CORE.vi -> DBUIP_CreateNewWizard_Invoke.vi -> DBUIP_CreateNewWizard_Invoke.vi.ProxyCaller