The following function allows you to configure your DCOM client settings. The settings in the function below are also used by our dOPC Explorer as the default setting.
uses
ActiveX;
function CallSecurityInit: HResult;
const
RPC_C_AUTHN_LEVEL_NONE = 1;
RPC_C_IMP_LEVEL_IMPERSONATE = 3;
EOAC_NONE = 0;
begin// this is for DCOM:// without this, callbacks from the server may get blocked, depending on// DCOM configuration settings
result := CoInitializeSecurity(
nil, // points to security descriptor
-1, // count of entries in asAuthSvcnil, // array of names to registernil, // reserved for future use
RPC_C_AUTHN_LEVEL_NONE, // the default authentication level for proxies
RPC_C_IMP_LEVEL_IMPERSONATE,// the default impersonation level for proxiesnil, // used only on Windows 2000
EOAC_NONE, // additional client or server-side capabilitiesnil// reserved for future use
);
end;