Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Network Management Function Buffers

The RPC run-time library handles the buffers required by the 32-bit data retrieval network management functions as follows:

  • Sending data to the server (data specified by [in] parameters).

    The caller must allocate and deallocate 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

  • Retrieving data from the server (data specified by [out] parameters).

    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

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.