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 / interop / readme.txt < prev    next >
Encoding:
Text File  |  1996-01-17  |  4.3 KB  |  160 lines

  1. INTEROP
  2.  
  3.  
  4. The INTEROP program demonstrates portability between OSF DCE RPC and 
  5. Microsoft RPC.
  6.  
  7. SUMMARY
  8. =======
  9.  
  10. The INTEROP program sends simple messages (strings) from the client to the 
  11. server. The most important part of INTEROP is the header file dceport.h. 
  12. This header file maps OSF DCE RPC APIs and data structures to the
  13. Microsoft RPC equivalents.
  14.  
  15. FILES
  16. =====
  17.  
  18. The directory samples\rpc\interop contains the following files for building
  19. the distributed application INTEROP:
  20.  
  21. File          Description
  22.  
  23. README.TXT    Readme file for the INTEROP sample
  24. MSG.IDL       Interface definition language file
  25. MSG.ACF       Attribute configuration file
  26. DCEPORT.H     Maps OSF APIs and structures to Microsoft RPC equivalents
  27. CLIENT.C      Client main program
  28. SERVER.C      Server main program
  29. MIDLUSER.C    Memory management routines for Microsoft RPC
  30. MANAGER.C     Client-side utility routines
  31. MAKEFILE      Nmake file to build for Windows NT or Windows 95
  32. MAKEFILE.DOS  Nmake file to build for MS-DOS
  33. MAKEFILE.DOS  Makefile to build for DCE platform
  34.  
  35. ------------------------------------
  36. Building on Windows NT or Windows 95
  37. ------------------------------------
  38.  
  39. The following environment variables should be already set for you: 
  40.  
  41.   set CPU=i386
  42.   set INCLUDE=%SDKROOT%\h
  43.   set LIB=%SDKROOT%\lib
  44.   set PATH=%SDKROOT%\system32;%SDKROOT%\bin
  45.  
  46. where %SDKROOT% is the root directory for the 32-bit Windows SDK.
  47.  
  48. For mips, set CPU=mips
  49. For alpha, set CPU=alpha
  50.  
  51. Build the sample distributed application:
  52.  
  53.   nmake cleanall
  54.   nmake
  55.  
  56. --------------------------
  57. Building on MS-DOS Systems
  58. --------------------------
  59.  
  60. After installing the Microsoft Visual C/C++ version 1.50 development
  61. environment and the 16-bit RPC SDK on a Windows NT or Windows 95
  62. computer, you can build the sample client application from Windows NT
  63. or Windows 95:
  64.  
  65.   nmake -f makefile.dos cleanall
  66.   nmake -f makefile.dos
  67.  
  68. This builds the client application callc.exe.
  69.  
  70. You may also execute the Microsoft Visual C/C++ compiler under MS-DOS.
  71. This requires a two-step build process.
  72.  
  73.   Step One: Compile the .IDL files under Windows NT or Windows 95:
  74.  
  75.      nmake -a -f makefile.dos msg.h
  76.  
  77.   Step Two: Compile the C sources (stub and application):
  78.  
  79.      nmake -f makefile.dos
  80.  
  81. Building on DCE Systems
  82. -----------------------
  83.  
  84. You need to copy the following files to the DCE machine:
  85.  
  86. client.c
  87. server.c
  88. manager.c
  89. msg.idl
  90. msg.acf
  91. makefile.dce
  92.  
  93.   make -f makefile.dce cleanall all
  94.  
  95. Note: You will probably need to change the CFLAGS and LIBS
  96. variables in makefile.dce to match your platform.
  97.  
  98. Using the program:
  99. ------------------
  100.  
  101. The basic example:
  102.  
  103. Run:
  104.   server
  105. on the server machine.
  106.  
  107. Run:
  108.   client -n <server name> -s "Hi, I'm a client"
  109. on the client machine to send the message.
  110.  
  111. Run:
  112.   client -n <server name> -s "Okay, stop this example" -x
  113. on the client machine to send the message and cause the server to stop.
  114.  
  115. You can use fixed endpoints by adding the -e switch:
  116.  
  117. server -e 3452
  118. client -e 3452 -n <server name> -s "Hi, I'm a client"
  119. client -e 3452 -n <server name> -s "Okay, stop this example" -x
  120.  
  121. You can run the demo over a different protocol by adding a -t switch
  122. to both the client and server:
  123.  
  124. server -t ncacn_np
  125. client -t ncacn_np -n <server name> -s "Hi, I'm a client"
  126. client -t ncacn_np -n <server name> -s "Okay, stop this example" -x
  127.  
  128. Options:
  129. --------
  130.  
  131. The -h switch displays a usage message.
  132.  
  133. The -s <message> switch is used to change with message sent from the client
  134.     to the server.  Without it the message "Hello World" is sent.
  135.  
  136. The -n <server_name> switch is used for specifying a server machine.
  137.     Without it the server is assumed to run on the same machine.
  138.  
  139. The -e <endpoint> switch is used to specify a fixed endpoint to be used.
  140.     Without it a dynamic endpoint will be used and registered with the
  141.     endpoint mapper.
  142.  
  143. The -t <protseq> switch is used to specify which protocol to use.  Without
  144.     it the protocol sequence "ncacn_ip_tcp" will be used.
  145.  
  146. ----------------------
  147. RUNNING ON WINDOWS 95:
  148. ----------------------
  149.  
  150. If you wish to run the server on Windows 95, you will need to use
  151. the LRPC protocol.
  152.  
  153. To start the server, enter:
  154.  
  155.  server -t ncalrpc
  156.  
  157. To start the client (from the same machine), enter:
  158.  
  159.  client -t ncalrpc
  160.