Use the search 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.

Alternatively, if you are unable to find a solution, we have an additional resource - our PTC eSupport Portal . If you are prompted to log into the eSupport Portal, you can use your My Kepware credentials. Need a My Kepware account? Create one here .

Search Solution 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