Microsoft KB Archive/259011

= SAMPLE: A Simple DCOM Client Server Test Application =

Article ID: 259011

Article Last Modified on 7/11/2005

-

APPLIES TO

 Microsoft COM+ 2.0 Standard Edition, when used with:  Microsoft Windows 2000 Standard Edition

 Microsoft Windows NT 4.0

 Microsoft Windows 98 Standard Edition

 Microsoft Windows 95</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q259011

<div class="summary_section">

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.

<div class="moreinformation_section">

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
<ol> 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.</li> Type MD C:\Test to create a folder.</li> Type CD C:\Test .</li> Copy following files into C:\Test:

TstSrvr.exe

Tstclnt.exe

Tstsrvr.reg

</li> At the command prompt, type regedit tstsrvr.reg. This will cause Registry Editor (Regedit.exe) to run on Tstsrvr.reg.</li> 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:

<pre class="fixed_text">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:

<pre class="fixed_text">C:\test>tstSrvr Server: Waiting Server: IClassFactory:CreateInstance Server: IStream:Read Server: IStream:Write Server: Done

</li></ol>

NOTE: Do not log off from the server.

Steps to Take on the Client Computer
<ol> Click Start, click Run , and then type cmd (for Windows NT) or command (for Windows 95/Windows 98).</li> Type C:. (This sample uses C drive, but you can use any local drive.)</li> Type MD C:\Test to create a folder.</li> Type CD C:\Test .</li> Copy the following files into C:\Test:

TstSrvr.exe

Tstclnt.exe

Tstsrvr.reg

</li> At the command prompt, type regedit tstsrvr.reg. This causes Registry Editor (Regedit.exe) to run on Tstsrvr.reg.</li> At the command prompt, type PING   (replace   with the actual computer name) to make sure that the server computer can be reached.</li> At the command prompt, type Tstclnt  . A successful run will cause the display of output similar to this:

<pre class="fixed_text">C:\test>tstclnt MyServerMachineName Client: Creating Instance...0.1696 seconds Client: Reading data...0.0011 seconds Client: Writing data...0.0005 seconds Client: Done

</li></ol>

<div class="references_section">