LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling ActiveX function

I am using an ActiveX function that has following format (in C++)
 
HRESULT GetLuminanceImage([in] long aMax,
[out,size_is(aMax)] float fBuffer[],
[out, retval]short *sRet);
 
How can I call this function in labview.
I need to know how to define the parmaters in Call library function node in Labview
 
Thanks in advance.
-SK

Message Edited by CKSlv on 01-20-2006 03:11 PM

0 Kudos
Message 1 of 3
(2,822 Views)
Ah, you don't want to use the Call Library Node, because it isn't a C function. Instead, use the ActiveX pallette with Automation Open, Invoke Node, Property Node, etc.
 
Note that to use these calls, your ActiveX class must have a TypeLibrary. However, since your snippet is of IDL, I don't think that will be a problem. Also, all the data marshalling will be handled for you automatically by LabVIEW as long as you stay within the OLE Automation types, which again you have.
Message 2 of 3
(2,800 Views)

Hi Lycangeek ,

 

I got stuck in the same kind of problem , I am using Automation open to load my COM library.

 

My Com dll is having an exposed function like

 

CAN_Write([in]long ID,[in] long DLC, [in,size_is(DLC) unsigned char* Data,[out,retval]long *pRetStat);

 

But when i am calling this function using automation invoke node in labview the Data is not a pointer reference its just accepting unsigned char Data . Can you please let me know how shall i pass the data to this array?? Or shall i need to change my DLL function...

 

Thanks in Advance.

0 Kudos
Message 3 of 3
(2,542 Views)