home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / netds / rpc / dynept / dyneptp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-06-11  |  1.4 KB  |  44 lines

  1. /****************************************************************************
  2.                    Microsoft RPC Version 2.0
  3.            Copyright Microsoft Corp. 1992, 1993, 1994- 1996
  4.                           DynEpt Example
  5.  
  6.     FILE:       dyneptp.c
  7.  
  8.     PURPOSE:    Remote procedures that are linked with the server
  9.                 side of RPC distributed application
  10.  
  11.     FUNCTIONS:  HelloProc() - prints "What a dynamic world" or other string
  12.                 sent by client to server
  13.  
  14.     COMMENTS:   This version of the distributed application that prints
  15.                 "What a dynamic world world" (or other string) on the
  16.                 server features a client that manages its connection to
  17.                 the server.  It uses the binding handle dynept_IfHandle,
  18.                 defined in the file dynept.h.
  19.  
  20. ****************************************************************************/
  21.  
  22. #include <stdlib.h>
  23. #include <stdio.h>
  24. #include "dynept.h"    // header file generated by MIDL compiler
  25.  
  26. void HelloProc(unsigned char * pszString)
  27. {
  28.     printf("%s\n", pszString);
  29. }
  30.  
  31. void Shutdown(void)
  32. {
  33.     RPC_STATUS status;
  34.  
  35.     printf("Calling RpcMgmtStopServerListening\n");
  36.     status = RpcMgmtStopServerListening(NULL);
  37.     printf("RpcMgmtStopServerListening returned: 0x%x\n", status);
  38.     if (status) {
  39.        exit(status);
  40.     }
  41. }
  42.  
  43. /* end file dyneptp.c */
  44.