09-09-2013 02:00 PM
Hello All,
I uploaded an ActiveX Controller to access a Barometer DLL, of which im trying get pressure data.
HRESULT error1=0;
HRESULT error2=0;
HRESULT error3=0;
HRESULT error4=0;
CAObjHandle val0=-1;
//HRESULT CVIFUNC BarometerClientDLL__BarometerClientSetserverName (CAObjHandle objectHandle, ERRORINFO *errorInfo, const char *pRetVal);
error1 = BarometerClientDLL__BarometerClientSetserverName (val0, NULL, IP_ADDRESS);
//HRESULT CVIFUNC BarometerClientDLL__BarometerClientSetserverSocket (CAObjHandle objectHandle, ERRORINFO *errorInfo,long pRetVal);
error2 = BarometerClientDLL__BarometerClientSetserverSocket (val0, NULL, PORT_NUM);
//HRESULT CVIFUNC BarometerClientDLL__BarometerClientreconnect (CAObjHandle objectHandle, ERRORINFO *errorInfo, VBOOL *pRetVal);
error3 = BarometerClientDLL__BarometerClientreconnect (val0, NULL, retVal0);
//HRESULT CVIFUNC BarometerClientDLL__BarometerClientGetpsia (CAObjHandle objectHandle,ERRORINFO *errorInfo,double *pRetVal);
error4 = BarometerClientDLL__BarometerClientGetpsia (val0, NULL, retVal);
The code compiles fine, but after each of the above lines execute, the error1-4 is set to -214702890 and the value in reads: {0x80070006="The handle is invalid."}
The Barometer DLL doesnt need any parameters or UI control so I tried setting the Object Handle to 0, and Error Info to NULL, I wasnt able to find much info on this error anywhere online and I am not using TestSteps.
Thank you for help
09-10-2013 02:08 PM
Hey VladSimontov,
Did you use the wizard to create the code for the ActiveX controller http://digital.ni.com/public.nsf/allkb/4B597F188B89B6DD862568970071F2FC or did you used this DLL from somewhere else?
Has this DLL ever worked before?
Please let me know.
09-10-2013 02:19 PM - edited 09-10-2013 02:20 PM
Yes, I used the ActiveX control wizard to set up .fp folder from a .tlb. The original program is a C# DLL. And yes the DLL is currently being used by VB6/C# applications.
Thank you!
09-11-2013 01:49 PM
Hey VladSimontov,
It could be that the ActiveX control is not supported by CVI for this DLL. Can you try on another computer too? What does this DLL supposed to do exactly?
Can you send me a screen shot of the error that you get?"the handle is invalid". Let me know. Can you call any other DLLs through ActiveX controls?