DCOM Configuration

This document will address how to configure DCOM client and server applications for Windows95 machines. Windows NT specific instructions will be specially marked. If you use Windows NT 4, you must have at least Service Pack 3 installed. This document is not intended to be a primer on how to create a DCOM program with Delphi. For a technical overview on how to use MIDAS to create a multi-tier application, see www.borland.com/midas/papers/technical/

Server install

  1. The server machine can be configured with either User-Level or Share-Level access. To view or change this setting, run the Network applet from the Control Panel and then select the Access Control page.

  2. User-Level
    If you have a Windows NT server available for name authentication, select User-Level access and specify the appropriate NT server that will provide user and group validation.

    Share-Level
    In order to use DCOM without an NT server, you must specify Share-Level Access.
  3. Install DCOM for Win95. You can find this install at http://www.microsoft.com/com/dcom95/download.htm.
  4. These steps only need to be done if you are using User-Level access:
  1. Install DCOMCNFG for Win95. This file is available at the same URL mentioned in step 2.
  2. Run DCOMCNFG. Select the Default Security page and press the Edit Default button. In the Access Permissions dialog, Grant Access to anyone that will need access to this server application. Alternatively, you can wait until after you’ve installed the server application and grant access to each specific application, as opposed to modifying the entire system’s attributes. Typically, you will grant Access to "The World".
  3. NTFor NT systems, you will grant access to "Everyone"
  4. NTSelect the application. Press the properties button. On the Identity tab, select "Interactive user". Or, assign a user that will have rights to access this NT machine.
  5. Make sure you have the SYSTEM account assigned to all access permissions (access, launch and configure).
  • NTEnable the Guest account for the NT machine in User Manger. Highlight the Guest account and select the menu item User | Properties. The checkbox "Account Disabled" must be cleared.
  • Add/change the following registry values to HKLM\Software\Microsoft\OLE:
  1. EnableRemoteConnect = "Y"
  2. LegacyAuthenticationLevel = 1 (DWORD)

Note: The LegacyAuthenticationLevel key can also be modified in DCOMCNFG. Select the Default Properties page, and set the Default Authentication Level to (None). However, you will be required to modify this entry manually if you are using share-level access, because DCOMCNFG requires user-level access in order to run.

  • Copy the following files to \WINDOWS\SYSTEM: DBCLIENT.DLL and STDVCLnn.DLL (STDVCL32.DLL for Delphi 3 -or- STDVCL40.DLL for Delphi 4)
NTCopy the files to \WINDOWS\SYSTEM32
  • Copy the server application to a local drive (not a network drive).
  • If this server application will be accessing databases, do the following:
  1. Install BDE 4.0
  2. Install SQL Links if needed.
  3. Install either the database server (if this machine will also act as the database server), or the client install for the appropriate database (if this machine will act as the middle tier).
  4. Copy the file IDPROV32.DLL to the \Program Files\Borland\Common Files\BDE directory (Delphi 3 only)
  5. Create any aliases, if necessary.
  • Copy any other files needed by the server application, including DLLs, OCXs and run-time packages.
  • Run the server application once to register it with the registry.
  • This step is only necessary if you are using DCOM95 1.0.
    Place a shortcut to RPCSS.EXE in your Startup folder. This is not absolutely required, but DCOM requires RPCSS to be loaded before it can process requests. You can also create a registry value under the following key if you need access to RPCSS immediately upon boot-up:

HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices

RPCSS="rpcss.exe"

  • Run your server application to make it available to incoming clients. The Win95 version of DCOM will not automatically launch the application across process boundaries.

Note: To be sure that all of the changes take effect, reboot after completing the entire configuration process (and restart RPCSS if necessary).

Client install

  1. Install DCOM for Win95. You can find this install at http://www.microsoft.com/com/dcom95/download.htm.
  2. Copy DBCLIENT.DLL to the \WINDOWS\SYSTEM directory.
  3. NTCopy the files to \WINDOWS\SYSTEM32
  4. If you are using Share-Level access, create a DWORD value under the key HKLM\Software\Microsoft\OLE:
  5. LegacyAuthenticationLevel = 1
  6. Install the client application, including all required files (e.g. DLLs, OCXs and run-time packages).

Note 1: The client machine can have either share-level or user-level access control. In addition, the client machine does not need to be configured to share files.

Note 2: The only time you need to register the server’s interface on the client machine is when you want to use vtable (early) binding. If you use the dispatch interface (both TRemoteServer and TMIDASConnection use dispatch), you do not need to do anything beyond the steps described above.

Note 3: When you run the client application, Delphi’s VCL will automatically register DBCLIENT and STDVCLnn, if necessary.

Error Messages:

Message Possible Reason Reference
DCOM not installed DCOM has not been installed S2, C1
Server execution failed 1) EnableRemoteConnect set to N
2) Server app not running
3) Identity for DCOM server is configured improperly
4) Server not on a local drive
5) User accessing server object does not have "Log on as Batch Job" rights.
6) Server path in registry is too long, or uses LFN.
7) DCOMCNFG Location is not set to run on this computer
S5A
S12
S3C
S7
Class not registered 1) Server app has not been registered
2) Using an older version of DBCLIENT.DLL.
S10
RPC server is unavailable 1) RPCSS is not running on the server
2) EnableRemoteConnect set to N
3) Invalid RemoteServer.ComputerName
4) Make sure TCP/IP is installed properly and you can successfully ping the server computer
S11
S5A
Interface not supported 1) User-level share is not selected
2) Permission not granted to Everyone
3) LegacyAuthenticationLevel not set
4) Guest account disabled
5) Client is trying to access an interface via vtable binding without first registering it with the client machine.
S1
S3B
S5B
S4
Access is denied 1) DCOM security not configured properly
2) Server application not on a local drive
3) SYSTEM account must have Access, Launch, and Configure privileges in DCOMCNFG
4) If using an NT-NT peer-to-peer network, make sure you are logging in using the same username and password on both machines.
S3B (NT)
S7
S3D
Error loading TypeLib/DLL A DLL could not be located S6, S8, S9
Error 80070776 1) Trying to run a multi-threaded server using D4 does not work due to inconsistencies in Win95's implementation of InterlockThreadDecrement.
2) Network error. Typically, TCP/IP has not been configured properly.
 
Invalid Class string You must specify a TRemoteServer.ServerGUID. ServerName is an optional property that specifies the ProgID.  
Unexpected failure One possible reason: Could not establish a connection to a database server.  
Catastrophic failure 1) Trying to access an object before it's created.
2) An unhandled exception is occuring on the server.
 
Not enough storage 1) SYSTEM account must have Access, Launch, and Configure privileges in DCOMCNFG
2) Ran out of memory opening CDS
S3D
Interface not found Trying to do early-binding when not using DCOM (i.e. TSocketConnection)  

Related Links

Link Description
Q158508 COM Security FAQ
Q165101 Use Win95 as a DCOM server
Q165300 Remote COM Calls Fail Because RPCSS is not started
COM Home Resources, documentation, links and more for COM and DCOM
ActiveX SDK Information on COM interfaces, security, and more

Last update: October 2, 1998

  Blog | DCOM | MIDAS | BDP | Struts
Speeches | Articles | Books | Links
Training | Mentoring | Support | Press Releases