I have two Win 2000 services. One is a COM server, the other a client. I can’t get the client to access the COM server across the a NT/2000 LAN network. The following call is used by the client:
HRESULT hR = CoCreateInstanceEx(uuidof(CFred),
NULL,
CLSCTX_REMOTE_SERVER,
&ServerInfo,
1,
&MultiQi);
… which fails with HRESULT: ‘E_ACCESSDENIED’. I’ve tried a variety of different COM server settings. None seem to work. Both services do not use the Local System account. They are logged in to the local machine. The COM server has the following class registration:
hR = CoRegisterClassObject( __uuidof(CFred),
&CF,
CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE,
&hFredCF);
I’ve tried a few CLSCTX_REMOTE server in this call as well for the server – with the same result. According to page 316 of Microsoft’s Inside DCOM book, ‘CoCreateInstanceEx’ isn’t necessarily needed if you have used the DCOMCNFG.EXE utility to specify which computer the component should be started on. Using this utility I have also set the access and launch permissions for the object so that ‘Everyone’ has access on both machines. This has no effect.
The client and server work fine when running locally on the same machine. The problems occur when running remotely.
Any ideas?
HRESULT hR = CoCreateInstanceEx(uuidof(CFred),
NULL,
CLSCTX_REMOTE_SERVER,
&ServerInfo,
1,
&MultiQi);
… which fails with HRESULT: ‘E_ACCESSDENIED’. I’ve tried a variety of different COM server settings. None seem to work. Both services do not use the Local System account. They are logged in to the local machine. The COM server has the following class registration:
hR = CoRegisterClassObject( __uuidof(CFred),
&CF,
CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE,
&hFredCF);
I’ve tried a few CLSCTX_REMOTE server in this call as well for the server – with the same result. According to page 316 of Microsoft’s Inside DCOM book, ‘CoCreateInstanceEx’ isn’t necessarily needed if you have used the DCOMCNFG.EXE utility to specify which computer the component should be started on. Using this utility I have also set the access and launch permissions for the object so that ‘Everyone’ has access on both machines. This has no effect.
The client and server work fine when running locally on the same machine. The problems occur when running remotely.
Any ideas?