NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Resolve DLL at runtime

Hallo,

 

I'm running TestStand2010 and use a DLL with exported funtions. I have written a sequence file with one sequence per function to use that sequence file as a wrapper for easy DLL integration.

Now I want to have the feature of switching to different versions of the DLL by just a global variable "pathToLibrary" and use that pathToLibrary as a placeholder in the C-Module. But I haven't found out yet how to achieve this goal.

 

Is this possible?

 

regards

Oliver Friedrich

0 Kudos
Message 1 of 2
(4,180 Views)

Hi Oliver,

I presume you need this :

Change the DLL version during run time based on a variable.

 

You can do the following :

Add a statement step before the step which calls your DLL ( i am assuming you use a action step type).

In this statement do the following "RunState.NextStep.TS.SData.Call.LibPath = "C:\\temp\\LV DLL test\\SharedLib2.dll""

This will change the name of the DLL which will be executed next (next step).

 

You will have to write additional logic to change the DLL name based on the variable.

Hope this helps.

 

Ravi

0 Kudos
Message 2 of 2
(4,142 Views)