home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / d / d020_1_2 / 4.ddi / NETAPI.TXT < prev    next >
Encoding:
Text File  |  1990-06-01  |  6.2 KB  |  179 lines

  1.                              NETAPI.TXT
  2.                              ==========
  3.  
  4.             DEVELOPING NETWORK APPLICATIONS FOR WINDOWS 3.0
  5.  
  6.  
  7. 1. Introduction
  8. ---------------
  9.  
  10. Windows applications running in protected mode require
  11. special support whenever they want to make a function call
  12. to a piece of real-mode software.  This includes calls to
  13. DOS, the BIOS, or a network.
  14.  
  15. The main problem is referred to as "API mapping".  If the
  16. arguments to the call include pointers to data, that data
  17. needs to be copied down into the first 1MB of address space
  18. so that the real-mode software can access it.  Then the
  19. processor is switched into real or virtual-8086 mode so that
  20. the real-mode software can process the call.  Finally, when
  21. that call returns, any data it modified is copied back up to
  22. the caller's protected-mode address.
  23.  
  24. Fortunately, most applications interface with the network
  25. only indirectly, by using DOS functions to manipulate files
  26. on redirected drive letters, or by using DOS or BIOS calls
  27. to print to a remote printer using redirected printer ports.
  28. Windows applications can continue to perform these functions
  29. normally, because Windows automatically maps standard DOS
  30. and BIOS calls.
  31.  
  32. However, some applications need to use functions that are
  33. specific to a particular network or networking protocol.
  34. Some piece of software must map these API, and in some cases
  35. this may require special procedures on the part of the
  36. programmer.
  37.  
  38. The remainder of this document describe programming
  39. considerations for designing Windows applications which use
  40. the following networking protocols and networks:
  41.  
  42.         o Microsoft Networks and DOS network functions
  43.  
  44.         o NETBIOS functions
  45.  
  46.         o LAN Manager based networks
  47.  
  48.         o Novell NetWare
  49.  
  50.         o Ungermann-Bass Net/One
  51.  
  52.         o Banyan VINES
  53.  
  54.  
  55. 2. Microsoft Networks and DOS Network functions
  56. -----------------------------------------------
  57.  
  58. Many networks on the market today are based upon the
  59. Microsoft Network standard, also known as MS-NET.  These
  60. networks all support a set of standard DOS functions that
  61. perform network activities, such as redirecting drive
  62. letters.
  63.  
  64. Windows automatically handles these DOS functions.  However,
  65. in order to maintain compatibility with future Windows
  66. products, the application should not make the DOS call by
  67. executing an int 21h instruction.  Instead, it should set up
  68. all the registers for executing the int 21h, and then make a
  69. far call to the Windows DOS3Call procedure.
  70.  
  71. See the Programmer's Reference, Volume I for a full
  72. description of the DOS3Call function.
  73.  
  74.  
  75. 3. NETBIOS functions
  76. --------------------
  77.  
  78. NETBIOS is the most widely used networking API.  These
  79. functions are normally called using int 5Ch.  Windows
  80. completely handles most NETBIOS functions.  However, in
  81. order to maintain compatibility with future Windows
  82. products, the application should not make the NetBIOS call
  83. by executing an int 5Ch instruction.  Instead, it should set
  84. up all the registers for executing the int 5Ch, and then
  85. make a far call to the Windows NetBIOSCall procedure.
  86.  
  87. The following rarely-used NetBIOS functions are not
  88. supported:
  89.  
  90.         71h    Send.No.Ack
  91.  
  92.         72h    Chain.Send.No.Ack
  93.  
  94.         73h    Lan.Status.Alert
  95.  
  96.         78h    Find.Name
  97.  
  98.         79h    Trace
  99.  
  100. See the Windows SDK Programmer's Reference Volume I for a
  101. full description of the NetBIOSCall function.
  102.  
  103.  
  104. 4. LAN Manager based networks
  105. -----------------------------
  106.  
  107. Networks based on LAN Manager can be installed in either
  108. Basic or Enhanced versions.
  109.  
  110. All versions of LAN Manager support MS-NET and NETBIOS
  111. functions.  However, if you are running LAN Manager Enhanced
  112. with the API option, applications can also access a powerful
  113. set of networking functions.
  114.  
  115. Non-Windows applications can call these functions by linking
  116. with a static-library provided with their network software.
  117. Windows apps, however, must use dynamic link libraries.
  118. These libraries are called NETAPI.DLL and PMSPL.DLL, and are
  119. distributed on every LAN Manager 2.0 Enhanced workstation.
  120. However, these DLLs will not run on LAN Manager 1.x, or 2.0
  121. Basic, so these functions may only be used on LAN Manager
  122. 2.0 Enhanced.
  123.  
  124. Consult your LAN Manager Programmer's Reference for more
  125. details on writing Windows applications for LAN Manager.
  126.  
  127.  
  128. 5. Novell NetWare
  129. -----------------
  130.  
  131. Novell NetWare supports MS-NET and optionally NETBIOS
  132. functions, which are described earlier in this document.
  133.  
  134. In addition, it also supports the NetWare and IPX/SPX API
  135. sets, all based on int 21h.
  136.  
  137. Windows applications can make NetWare calls, but cannot do
  138. so by executing the int 21h directly because this is not
  139. supported in all Windows operating modes.  Instead, you
  140. should replace the int 21h instruction with a far call to
  141. the NetWareRequest function.  This function is exported by
  142. name from the NetWare DLL, and should be imported in your
  143. .DEF file as NetWare.NetWareRequest.
  144.  
  145. Windows applications cannot make IPX/SPX calls at this time,
  146. although Novell plans to make this support available in a
  147. future release.  If you need more information on this
  148. support, contact your normal Novell support channel.
  149.  
  150.  
  151. 6. Ungermann-Bass Net/One
  152. -------------------------
  153.  
  154. Ungermann-Bass Net/One is based upon the Microsoft Network
  155. standard.  It supports standard MS-NET and most NETBIOS
  156. functions, which are described earlier in this document.
  157.  
  158. Net/One also supports private extensions to the NETBIOS
  159. function set (functions 72h-7Dh).  These functions are
  160. supported by the standard Windows product.  You can call
  161. these functions as you would standard NETBIOS functions, by
  162. making a far call to the NetBIOSCall procedure.
  163.  
  164.  
  165. 7. Banyan VINES
  166. ---------------
  167.  
  168. Banyan VINES supports the standard MS-NET and, optionally,
  169. NETBIOS functions.  There is also a toolkit for applications
  170. which want to write directly to the VINES API.
  171.  
  172. Windows applications can call the MS-NET and NETBIOS
  173. functions, as described above.
  174.  
  175. VINES 4.0 does not support Windows applications calling the
  176. VINES API directly, but Banyan does intend to make this
  177. support available in VINES 4.1.  If you need further
  178. information, contact your Banyan support channel.
  179.