Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DCOM Client/Server across an NT/2000 LAN problem

Status
Not open for further replies.

AndyMidd

Programmer
Feb 27, 2002
1
GB
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?
 
I know this was posted almost a month ago, so it may already be solved. Have you tried using CLSCTX_LOCAL_SERVER in the client instead? We have a DCOM server on Win NT, using Windows 98 and Windows NT machines for clients, on separate machines from the server, and that is how it worked. The server object is a dll. I don't know any details on whether Windows 2000 machines handles anything differently. I got this help from - COM Macro Architecture Topology.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top