Defining DLL Functions global
I'm working with an selfmade DLL from Labview. I have defined some function in this DLL and everything is working fine. Now i have imported the DLL into my TestComplete function. (C#)
function test()
{
Def_Environment = DLL["DefineEnvironment"](true);
Def_DLL = Def_Environment["DefineDLL"]("Labview");
//Define DLL Function
Def_DLL["DefineProc"]("SetTestRackPower",VT_I1,VT_VOID);
Def_DLL["DefineProc"]("SetPCOnOff",VT_I1,VT_VOID);
//Load DLL
Lib = Def_Environment["Load"]("C:\\Test Complete\\Autotest RSD 4.3\\Project\\Sources\\LabviewDLL\\SharedLib.DLL", "Labview");
//Call function from DLL
Lib["SetTestRackPower"](1);
Lib["SetPCOnOff"](1);
}
Also in this TC function is everything working fine. I am able to call functions from the DLL. But is it possible to define the DLL, alternatively to define the functions from the DLL global so that i can call them from every function. I am calling many times functions and variables declared in another unit but it seems to be that the functions from DLL must be defined in the function that use them? I want to define the DLL for example at the start of the test and then to call functions from the DLL in different Scripts and functions. Actually ervery time i call my "test" function I receive an Warning that the function is already defined.
I am working with Test Complete8 on a Windows XP SP3 machine.
Thanks a lot
Andreas