LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get a return value from an ActiveX method

I have an ActiveX-control with the following interface

[code]

[   uuid(C1396B5A-D5E8-4B66-A353-BF66A13B1F58),   version(1.0)

] library ActiveX2Go {

  importlib("stdole2.tlb");

  interface IDisplaySomething;   coclass DisplaySomething;

[     uuid(3E8BB15D-2E76-4285-8950-90DE79CF6931),     helpstring("Interface für DisplaySomething Objekt"),     oleautomation   ]   interface IDisplaySomething: IUnknown   {     [id(0x00000065)]     unsigned int _stdcall DisplayMessage([in] unsigned int Input);   };

  [     uuid(37DB85BC-F974-4647-A6A4-1024873CB1A3),     helpstring("DisplaySomething")   ]   coclass DisplaySomething   {     [default] interface IDisplaySomething;   };

};

[/code]

According to what this looks like, the function DisplayMessage takes an unsigned integer and returns an unsigned integer. Yet the method call node in the attached VI (LV 8.6) refuses to emit any return value while recognizing the interface and method. Can anyone tell me what I'm doing wrong?

 

Thank you.

Download All
0 Kudos
Message 1 of 4
(2,401 Views)

Hi,

 

this is kais from germany.

I saw your VI, I was not sure if you have selected any ActiveX Class. See my Screenshot.

 

 

Kais Mekacher
Applications Engineer
Germany - Munich
0 Kudos
Message 2 of 4
(2,371 Views)

Yes, I selected the class I created (ActiveX2Go seemed to be catchy enough to remember across languages).

0 Kudos
Message 3 of 4
(2,368 Views)

you said: you've created a class. can you send me this class to reproduce the same Issue?

Did you use an NI Tool to create your Class? 

Can you describe your Problem with more Information? OS, Software Version, Tools used.

 

Best regards

Kais Mekacher
Applications Engineer
Germany - Munich
0 Kudos
Message 4 of 4
(2,350 Views)