LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Library function error.ActiveX control error.

 

 I have a project with DataSocket and ActiveX control of the DTPicker.If I made the DataSocket of OPC for Siemens PLC s7-200 inavailable,there was no error while debugging.But if the DataSocket of OPC was available,I get the error "library function error (return value ==-43[0xffffff71]).ActiveX control error.

     how can I resolve  the problem?

Thank you.  The error as picture:

QQ截图未命名.png

0 Kudos
Message 1 of 3
(4,132 Views)

Hello zaizai - 

 

One possible reason for the error you are seeing is that the thread you are trying to call LoadPanel from has been initialized to use the Multi-Threaded apartment threading model.  An explanation of how this can happen can be found here.

 

One thing you may try to resolve the error you are seeing is to call the following function as one of the very first function calls in the thread resposible for loading the panel (certainly before calls to any other ActiveX functions are made)

 

CA_InitActiveXThreadStyleForCurrentThread(0, COINIT_APARTMENTTHREADED);

 

NickB

National Instruments  

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

thanks.I  will have a try.

 

0 Kudos
Message 3 of 3
(4,102 Views)