home *** CD-ROM | disk | FTP | other *** search
- NETAPI.TXT
- ==========
-
- DEVELOPING NETWORK APPLICATIONS FOR WINDOWS 3.0
-
-
- 1. Introduction
- ---------------
-
- Windows applications running in protected mode require
- special support whenever they want to make a function call
- to a piece of real-mode software. This includes calls to
- DOS, the BIOS, or a network.
-
- The main problem is referred to as "API mapping". If the
- arguments to the call include pointers to data, that data
- needs to be copied down into the first 1MB of address space
- so that the real-mode software can access it. Then the
- processor is switched into real or virtual-8086 mode so that
- the real-mode software can process the call. Finally, when
- that call returns, any data it modified is copied back up to
- the caller's protected-mode address.
-
- Fortunately, most applications interface with the network
- only indirectly, by using DOS functions to manipulate files
- on redirected drive letters, or by using DOS or BIOS calls
- to print to a remote printer using redirected printer ports.
- Windows applications can continue to perform these functions
- normally, because Windows automatically maps standard DOS
- and BIOS calls.
-
- However, some applications need to use functions that are
- specific to a particular network or networking protocol.
- Some piece of software must map these API, and in some cases
- this may require special procedures on the part of the
- programmer.
-
- The remainder of this document describe programming
- considerations for designing Windows applications which use
- the following networking protocols and networks:
-
- o Microsoft Networks and DOS network functions
-
- o NETBIOS functions
-
- o LAN Manager based networks
-
- o Novell NetWare
-
- o Ungermann-Bass Net/One
-
- o Banyan VINES
-
-
- 2. Microsoft Networks and DOS Network functions
- -----------------------------------------------
-
- Many networks on the market today are based upon the
- Microsoft Network standard, also known as MS-NET. These
- networks all support a set of standard DOS functions that
- perform network activities, such as redirecting drive
- letters.
-
- Windows automatically handles these DOS functions. However,
- in order to maintain compatibility with future Windows
- products, the application should not make the DOS call by
- executing an int 21h instruction. Instead, it should set up
- all the registers for executing the int 21h, and then make a
- far call to the Windows DOS3Call procedure.
-
- See the Programmer's Reference, Volume I for a full
- description of the DOS3Call function.
-
-
- 3. NETBIOS functions
- --------------------
-
- NETBIOS is the most widely used networking API. These
- functions are normally called using int 5Ch. Windows
- completely handles most NETBIOS functions. However, in
- order to maintain compatibility with future Windows
- products, the application should not make the NetBIOS call
- by executing an int 5Ch instruction. Instead, it should set
- up all the registers for executing the int 5Ch, and then
- make a far call to the Windows NetBIOSCall procedure.
-
- The following rarely-used NetBIOS functions are not
- supported:
-
- 71h Send.No.Ack
-
- 72h Chain.Send.No.Ack
-
- 73h Lan.Status.Alert
-
- 78h Find.Name
-
- 79h Trace
-
- See the Windows SDK Programmer's Reference Volume I for a
- full description of the NetBIOSCall function.
-
-
- 4. LAN Manager based networks
- -----------------------------
-
- Networks based on LAN Manager can be installed in either
- Basic or Enhanced versions.
-
- All versions of LAN Manager support MS-NET and NETBIOS
- functions. However, if you are running LAN Manager Enhanced
- with the API option, applications can also access a powerful
- set of networking functions.
-
- Non-Windows applications can call these functions by linking
- with a static-library provided with their network software.
- Windows apps, however, must use dynamic link libraries.
- These libraries are called NETAPI.DLL and PMSPL.DLL, and are
- distributed on every LAN Manager 2.0 Enhanced workstation.
- However, these DLLs will not run on LAN Manager 1.x, or 2.0
- Basic, so these functions may only be used on LAN Manager
- 2.0 Enhanced.
-
- Consult your LAN Manager Programmer's Reference for more
- details on writing Windows applications for LAN Manager.
-
-
- 5. Novell NetWare
- -----------------
-
- Novell NetWare supports MS-NET and optionally NETBIOS
- functions, which are described earlier in this document.
-
- In addition, it also supports the NetWare and IPX/SPX API
- sets, all based on int 21h.
-
- Windows applications can make NetWare calls, but cannot do
- so by executing the int 21h directly because this is not
- supported in all Windows operating modes. Instead, you
- should replace the int 21h instruction with a far call to
- the NetWareRequest function. This function is exported by
- name from the NetWare DLL, and should be imported in your
- .DEF file as NetWare.NetWareRequest.
-
- Windows applications cannot make IPX/SPX calls at this time,
- although Novell plans to make this support available in a
- future release. If you need more information on this
- support, contact your normal Novell support channel.
-
-
- 6. Ungermann-Bass Net/One
- -------------------------
-
- Ungermann-Bass Net/One is based upon the Microsoft Network
- standard. It supports standard MS-NET and most NETBIOS
- functions, which are described earlier in this document.
-
- Net/One also supports private extensions to the NETBIOS
- function set (functions 72h-7Dh). These functions are
- supported by the standard Windows product. You can call
- these functions as you would standard NETBIOS functions, by
- making a far call to the NetBIOSCall procedure.
-
-
- 7. Banyan VINES
- ---------------
-
- Banyan VINES supports the standard MS-NET and, optionally,
- NETBIOS functions. There is also a toolkit for applications
- which want to write directly to the VINES API.
-
- Windows applications can call the MS-NET and NETBIOS
- functions, as described above.
-
- VINES 4.0 does not support Windows applications calling the
- VINES API directly, but Banyan does intend to make this
- support available in VINES 4.1. If you need further
- information, contact your Banyan support channel.
-