LAN Server, Warp Server and DSS provide support for both 16-bit and 32-bit applications. Support for both types of applications allows a gradual change of LAN Server APIs into 32-bit worker routines without requiring 32-bit applications to change.
The new APIs were created with pure 32-bit programming in mind. In most cases, however, the 32-bit API is an entry point to 16-bit code. This implies that you must use a compiler, such as IBM C Set/2, with these characteristics:
The second characteristic has a further implication. Just as in the 16-bit world, buffer sizes are limited to 64KB in length. No matter how large a buffer you supply, an API rarely returns more than 64KB of data at a time. The exceptions are Net32AliasEnum and Net32UserEnum (OS/2 only), which can return more than 64KB of data.
Note: In DSS, all Net32User and Net32Group APIs support buffers larger than 64KB.
A 32-bit application that uses the Net32 or the Dos32 APIs must define the constant PURE_32 (not INCL_32) before including any LAN Server header files. The constant INCL_32 is for mixed-model programs only. The 32-bit API interfaces are slightly different from the 16-bit interfaces. The main highlights of the new APIs are:
Note: Applications must be compiled with the compiler option that defaults char to unsigned char.
All data structures and their alignment are unchanged (except that char becomes unsigned char). Some 4-byte elements might be aligned on 16-bit WORD boundaries rather than 32-bit DWORD boundaries. This is a compromise between the speed of execution of the API code and application code.
The Net32XXX APIs return 16-bit return codes.
Note: Not all 16-bit APIs have 32-bit entry points. For example, because 16- and 32-bit file handles are incompatible, there are no Net32Handle APIs. In addition, all the APIs in the following categories have no thunked counterparts:
Named Pipe Print Destination
Print Job
Print Queue
Spooler