LabWindows/CVI

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to use COM DLL in LabWindows

Solved!
Go to solution

Hello

 

I have a COM .dll which looks like that when opened with dll export viewer:

 

20801i09C58863C2870D8D

 

I would like to use the Get4AxisPos function in LabWindows.

I understood that, as I only have the .dll, the only way of calling these functions are with the LoadLibrary() and GetProcAddress() functions.

My problem is that the Get4AxisPos function is not of type Exported Function but COM Method so I don't know how to use it in my LabWindows project!

 

My questions are: Is it possibleto use this dll in Labwindows? If yes how?

 

Thanks

 

 

0 Kudos
Message 1 of 6
(4,652 Views)
Solution
Accepted by missmarie

Use Tools|Create ActiveX Controller... in CVI to generate a function panel containing interface code that will allow you to manipulate the COM objects in the DLL. Look in Help for 'ActiveX Controller Wizard' for more information about this facility.

 

 

 

 

--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 6
(4,643 Views)

can I do that even if I only have a .dll? (no .h or .lib)

0 Kudos
Message 3 of 6
(4,639 Views)

Yes.

--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 6
(4,628 Views)

IT WORKS!

Thanks A LOT Smiley Very Happy

0 Kudos
Message 5 of 6
(4,614 Views)


Hi ,

I am new to C++ and COM  .
i need to implement a client application in C(lab windows CVI) , server is a c++ COM object.
steps followed by me
---> accessed the registered COM object with Labwindows CVI active x controller template,output was a c file which is implementation of the class names in COM (interfaces).

I can use majority of the functions directly from the generated, but i need to implement some event functions like message box events and then use it.

I have seen one method of accessing in C++ client sample ,
which implements Queryinterface function...takes the IID_Unknown as input and returns interface pointer(inhereted static_castof the required class, uses static_cast for that) as output.

when i try to follow up the same in c , i am lost  with the inheritance concept.
In short i need to send IID Unknown to the Queryinterface function and should get the interface pointer of message box type or other class type ...

Sorry for the long mail,Please guide me

Thanks in advance ,
Satish

0 Kudos
Message 6 of 6
(4,416 Views)