SAMPLE: A Simple DCOM Client Server Test Application

This article was previously published under Q259011
SUMMARY
This article provides a simple client/server test application that enables you to check if DCOM is working between two computers when security is turned off.
MORE INFORMATION
The following file is available for download from the Microsoft Download Center:
For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

This self extracting file contains three files: TstSrvr.exe, Tstclnt.exe, and Tstsrvr.reg.

Steps to Take on the Server Computer

  1. Click Start, click Run, and then type cmd (for Windows NT) or command (for Windows 95/Windows 98).

    Note This sample uses C drive, but you can use any local drive.
  2. Type MD C:\Test to create a folder.
  3. Type CD C:\Test.
  4. Copy following files into C:\Test:
    TstSrvr.exe
    Tstclnt.exe
    Tstsrvr.reg
  5. At the command prompt, typeregedit tstsrvr.reg. This will cause Registry Editor (Regedit.exe) to run on Tstsrvr.reg.
  6. Click Start, click Run, and type C:\Test\TstSrvr.exe.When Regedit has finished running, the server command window will flash and display the following output:
    Server: Waiting						
    Then, the server command window waits for the client program to start. If the client is started, the command window will flash and display output similar to the following:
    C:\test>tstSrvrServer: WaitingServer: IClassFactory:CreateInstanceServer: IStream:ReadServer: IStream:WriteServer: Done						
NOTE: Do not log off from the server.

Steps to Take on the Client Computer

  1. Click Start, click Run, and then type cmd (for Windows NT) or command (for Windows 95/Windows 98).
  2. Type C:. (This sample uses C drive, but you can use any local drive.)
  3. Type MD C:\Test to create a folder.
  4. Type CD C:\Test.
  5. Copy the following files into C:\Test:
    TstSrvr.exe
    Tstclnt.exe
    Tstsrvr.reg
  6. At the command prompt, type regedit tstsrvr.reg. This causes Registry Editor (Regedit.exe) to run on Tstsrvr.reg.
  7. At the command prompt, type PING <server computer name> (replace <server computer name> with the actual computer name) to make sure that the server computer can be reached.
  8. At the command prompt, type Tstclnt <server computer name>.A successful run will cause the display of output similar to this:
    C:\test>tstclnt MyServerMachineNameClient: Creating Instance...0.1696 secondsClient: Reading data...0.0011 secondsClient: Writing data...0.0005 secondsClient: Done						
REFERENCES
The Test sample is based on the simple DCOM sample that is included with the platform SDK. Please refer to the Platform SDK simple sample for more details on the code for this sample.
DCOMTest
Eigenschaften

Artikelnummer: 259011 – Letzte Überarbeitung: 07/11/2005 17:22:09 – Revision: 5.5

Microsoft COM+ 2.0 Standard Edition

  • kbclientserver kbdcom kbfaq kbfile kbhowto kbsecurity KB259011
Feedback