SAMPLE: A Simple DCOM Client Server Test Application

Article translations Article translations
Article ID: 259011 - View products that this article applies to.
This article was previously published under Q259011
Expand all | Collapse all

On This Page

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:
DCOMTest.exe
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, type regedit 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>tstSrvr
    Server: Waiting
    Server: IClassFactory:CreateInstance
    Server: IStream:Read
    Server: IStream:Write
    Server: 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 MyServerMachineName
    Client: Creating Instance...0.1696 seconds
    Client: Reading data...0.0011 seconds
    Client: Writing data...0.0005 seconds
    Client: 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.

Properties

Article ID: 259011 - Last Review: July 11, 2005 - Revision: 5.5
APPLIES TO
  • Microsoft COM+ 2.0 Standard Edition, when used with:
    • the operating system: Microsoft Windows 2000
    • Microsoft Windows NT 4.0
    • Microsoft Windows 98 Standard Edition
    • Microsoft Windows 95
Keywords: 
kbclientserver kbdcom kbfaq kbfile kbhowto kbsecurity KB259011

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com