Hello all,
I am using CVI2017 and the tool "Create .NET controller" in order to create an instrument driver for a .NET assembly I have received from Racelogic company. This assembly is to control a GNSS-speed sensor called VBOX. They have created the dll's in a .NET language and they assure that they have done it in a COM compatible way.
I have received 3 x dll files and 1 x tlb file. Also a .bat file that registers the COM components. The first question I have is whether I need to create an instrument controller for each dll. The high level functions that I need are in only one of the dll's. I don't know if having an instrument controller for only this dll and having the other dll's all in the same dir would be enough so that they can call to each other.
I have created the instrument controller of only the dll with the functions that I need, and the behavior of the program is the following:
....
sError = CDotNetGetErrorDescription(Initialize_Racelogic_SetupApi ()); //sError = ""
sError = CDotNetGetErrorDescription(Racelogic_SetupApi_VBoxSetupApi__Create (&instanceHandle, 0)); //sError ="" and instance Handle is properly addressed
sError = CDotNetGetErrorDescription(Racelogic_SetupApi_VBoxSetupApi_Connect (instanceHandle, "COM1", &serialNumber, &returnValue, ExceptionHandle)); //sError = "", serialNumber=0, returnValue=0, ExceptionHandle=0 ->The connection failed but I have no error information at all
The "Connect" function above is not working and I have no way to know why. Do you have any idea? or any "complete" example of how to use a .NET assembly?
Btw: I also tried to do the explicit linking and it doesn't work neither (the pointer obtained with GetProcAddress is NULL)
Thanks