Calling C++ functions from a dll (assembly) in a .
We are scripting in .NET protocol using Vugen v11. We have some custom functions that we want to call/use in the .NET Vugen script. We have created a .dll file which has the custom C++ functions and we want to use these functions in our script. Could you please le us know how to-
1. Import the .dll file in the script?
2. Use (or call) the custom functions in the script?
Re: Calling C++ functions from a dll (assembly) in a .
If its a .NET DLL and you are coding in .NET then:
- Open the script in Visual Studio (you can use Express version)
- Add a reference to the DLL
- Add using state in globals.fixed.cs/vb e.g. using my.class.MyClass;
- Instantiate class instance in globals.fixed.cs/vb inside VuserClass e.g. MyClass bla = new MyClass();
The object instance is now avaialbe to us in your script code.
Note there is a section in the Help covering this "Viewing Scripts in VuGen and Visual Studio".