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 / ns / nhello / readme.txt < prev    next >
Encoding:
Text File  |  1996-01-15  |  4.0 KB  |  142 lines

  1. NHELLO
  2.  
  3.  
  4. FILES
  5. =====
  6.  
  7. The directory samples\rpc\ns\nhello contains the following files for
  8. building the sample distributed application NHELLO:
  9.  
  10. File            Description
  11.  
  12. README.TXT      Readme file for the NHELLO sample
  13. NHELLO.IDL      Interface definition language file
  14. NHELLOC.C       Client main program
  15. NHELLOS.C       Server main program
  16. NHELLOP.C       Remote procedures
  17. NSSERV.C        NT Service program
  18. SERVICE.C       Service Control Manager interface
  19. MAKEFILE        Nmake file to build for Windows NT or Windows 95
  20. MAKEFILE.DOS    Nmake file to build for MS-DOS
  21.  
  22. The directory samples\rpc\ns\cds contains the files that describe the
  23. gateway protocol to the DCE Cell Directory Service (CDS)
  24.  
  25. -----------------------------------------------------------------------
  26. BUILDING CLIENT AND SERVER APPLICATIONS FOR MICROSOFT WINDOWS NT OR WINDOWS 95:
  27. -----------------------------------------------------------------------
  28.  
  29. The following environment variables should be set for you already.
  30.  
  31.   set CPU=i386
  32.   set INCLUDE=%SDKROOT%\h
  33.   set LIB=%SDKROOT%\lib
  34.   set PATH=%SDKROOT%\system32;%SDKROOT%\bin;
  35.  
  36. Where %SDKROOT% is the root directory for the 32-bit Windows SDK.
  37.  
  38. For mips, set CPU=mips
  39. For alpha, set CPU=alpha
  40.  
  41. Build the sample distributed application:
  42.   nmake cleanall
  43.   nmake
  44.  
  45. This builds the executable programs nhelloc.exe
  46. (client), nhellos.exe (console server), and nsserv
  47. ( NT service ).
  48.  
  49. -----------------------------------------------------------------------
  50. BUILDING THE CLIENT APPLICATION FOR MS-DOS
  51. -----------------------------------------------------------------------
  52.  
  53. After installing the Microsoft Visual C/C++ version 1.50 development
  54. environment and the 16-bit RPC SDK on a Windows NT or Windows 95
  55. computer, you can build the sample client application from Windows NT
  56. or Windows 95.
  57.  
  58.   nmake -f makefile.dos cleanall
  59.   nmake -f makefile.dos
  60.  
  61. This builds the client application nhelloc.exe.
  62.  
  63. You may also execute the Microsoft Visual C/C++ compiler under MS-DOS.
  64. This requires a two step build process.
  65.  
  66.   Step One: Compile the .IDL files under Windows NT or Windows 95
  67.      nmake -a -f makefile.dos nhello.h
  68.  
  69.   Step Two: Compile the C sources (stub and application) under MS-DOS.
  70.      nmake -f makefile.dos
  71.  
  72.  
  73. -----------------------------------------------------------------------
  74. RUNNING THE CLIENT AND SERVER APPLICATIONS
  75. -----------------------------------------------------------------------
  76.  
  77. -- NHELLOS --
  78. On the server, enter
  79.  
  80.   net start rpclocator
  81.   set start rpcss
  82.   nhellos
  83.  
  84. (You can also start the RPC Locator and RPC Service by running
  85. the Services program in Control Panel.)
  86.  
  87.  
  88. -- NSSERV --
  89. To install the service, first compile everything, and then:
  90.  
  91.     nsserv -install
  92.  
  93. Now all you have to do is start it, either using the
  94. "net start" method, the control panel Services applet, or
  95. the SC.EXE utilitie in the MSTOOLS\BIN directory:
  96.  
  97.     sc start nshelloservice
  98.  
  99. Once the service has been started, you can use the client
  100. program to verify that it really is working, using the syntax:
  101.  
  102.     nhelloc
  103.  
  104. which should cause to service to stop since it calls Shutdown()
  105.  
  106.  
  107. If, after playing with the sample you wish to remove the service,
  108. simply say:
  109.  
  110.     nsserv -remove
  111.  
  112. Other: NSSERV can be run as a console app by entering
  113.  
  114.     nsserv -debug
  115.  
  116. For more information on SERVICES see the SERVICE sample included
  117. with the Win32 SDK.
  118.  
  119.  
  120. -- NHELLOC --
  121. On the client, enter
  122.  
  123.   net start workstation
  124.   nhelloc
  125.  
  126.  
  127. Note:  The client and server applications can run on the same Microsoft
  128. Windows NT computer when you use different screen groups.  Also, only NSSERV
  129. or NHELLOS should be run at one time on the same Windows NT computer.
  130.  
  131.  
  132. Several command line switches are available to change settings for this
  133. program. For a listing of the switches available from the client
  134. program, enter:
  135.  
  136.   nhelloc -?
  137.  
  138. For a listing of switches available from the server program and the
  139. service program enter
  140.  
  141.   nhellos -?
  142.