LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

What ActiveX Library Functions can I programmatically use to access a DLL which uses a COM interface.

I am using LabWindows/CVI programmatically and need to access a DLL which uses a COM interface. I have not had much joy using the ActiveX library functions. I have successfully used standard COM calls: CoCreateInstance(&CLSID_HSCMDriver, NULL, CLSCTX_INPROC_SERVER, &IID_IHSCMDriver, (void **) (&pUnknown));
and
pUnknown->lpVtbl->QueryInterface(pUnknown, &IID_IHSCMDriver, (void **) (&pUn)); but can not translate these into ActiveX calls.
0 Kudos
Message 1 of 2
(2,601 Views)
Hello

You can actually have CVI create a function panel from all the functions exported by the COM interface. In the project window, go to Tools >> Create Activex Controller, and select the dll from the list of the registered COM components on your machine ( you can browse to the dll too), and CVI will automatically generate all the wrapper functions for you. This will save you the trouble of defining every single function yourself.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(2,601 Views)