Platform SDK: Network Management |
Windows NT/2000: The RPC run-time library handles the buffers required by the 32-bit data retrieval network management functions as follows:
The caller must allocate the buffer for the relevant information structure (or structures) and pass a pointer variable to the function. The caller does not need to specify the buffer length.
Example: NetGroupAdd
The system allocates the buffer for the returned information. The caller must pass a pointer variable to the function on input. On successful return, the pointer receives the address of the system-allocated buffer that contains the returned information. This simplifies the calling code, because the caller does not need to estimate the size of the buffer, or resize the buffer and reissue the function.
When the caller has finished processing the returned information, it must free the system-allocated memory by calling the NetApiBufferFree function. For more information about specifying buffer sizes, see Network Management Function Buffer Lengths.
Example: NetGroupEnum
Windows 95/98: The caller must provide and free all buffers required by the network management functions.