How to Set Up and Run the RNR Sample Included in the Win32 SDK

Last reviewed: September 29, 1995
Article ID: Q131505
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) versions 3.5, 3.51

SUMMARY

This article explains how to set up and operate the Service Registration and Resolution (RNR) sample over the TCP and SPX network protocols. The RNR sample comes with the Microsoft Win32 (SDK) versions 3.5 and 3.51. It illustrates the use of the service registration and resolution APIs.

MORE INFORMATION

How to Set Up the RNR Sample

Run rnrsetup /ADD on each client and on the server to call the SetService API with SERVICE_ADD_TYPE. This call stores the service name type, its associated GUID, and relevant addressing information for the specified name spaces in the registry path:

   \HKEY_LOCAL_MACHINE
     \CurrentControlSet
       \Control
         \ServiceProvider
           \ServiceTypes

This information is then retrieved by GetTypeByName() and GetAddressByName() calls respectively to identify the server's address.

How to Operate the RNR Sample

  1. Start rnrsrv on one machine. After setting listening ports on the available protocols, the RNR server executes the SetService() call with the SERVICE_REGISTER flag to register the network service with the specified name spaces. For example, it enables advertising the EchoExample service name on the SAP protocol.

  2. On the other machine, start rnrclnt using the following syntax:

    rnrclnt /?

    Usage: rnrclnt [/name:SVCNAME] [/type:TYPENAME] [/size:N]

                 [/count:N]  [/rcvbuf:N] [/sndbuf:N]
    
        - TYPENAME is initially passed to GetTypeByName() call to return
          the GUID value. The GUID value and SVCNAME is then passed to
          GetAddressByName() to return the address of the server that
          the client can connect to. TYPENAME is defined as EchoExample
          for the RNR sample.
    
        - SVCNAME specifies which EchoExample server to connect to. If
          SVCNAME is specified as the server name in the Internet domain,
          the TCP protocol will be used. If SVCNAME is specified as
          EchoServer (the RNR service name advertised on SAP), the SPX
          protocol will be used.
    
        - The other parameters to the rnrclnt have appropriate default
          values and are self explanatory.
    


Additional reference words: 3.50 3.51
KBCategory: kbnetwork kbnetwork
KBSubcategory: NtwkWinsock


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.