Use the search and browse feature to view Kepware's repository of more than 500 Knowledge Base articles. Narrow your results or type your query into the search field below.

Search Solutions Results By: View All Solutions

Kepware Knowledge Base: Solution


How do I Connect to OPC Client with the Widest DCOM?


Last Update: 11/7/2018

To connect to the OPC client under the widest possible set of DCOM configurations, the program should call the following function as soon as it starts up and before it opens any DCOM connections. The syntax provided is for C++/C#, and must be modified accordingly for different languages.

// Immediately after calling CoInitializeEx ()

// Allow anyone to be able to call back into us!

CoInitializeSecurity (NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_NONE, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

Note: This function is recommended if the program contains an ActiveX OPC client control.

Tags
DCOM