Platform SDK: Network Management

Network Management Function Buffer Lengths

Applications that specify buffer sizes when calling network management enumeration functions (and various data retrieval functions) must specify buffers large enough to hold the returned information structure (or structures) plus the strings to which their members point. If you do not specify a large enough buffer to receive all the available entries, the function returns ERROR_MORE_DATA. Enumeration calls do not return partial entries.

Windows NT/2000: The network management functions take an advisory maximum data-length parameter, prefmaxlen. This parameter allows an application to suggest the number of bytes the server should return from a function call.

If you specify the value MAX_PREFERRED_LENGTH in the prefmaxlen parameter, the network management functions allocate the amount of memory required for the data.

Windows 95/98: The caller must provide and free all buffers required by the network management functions.

For more information, see Network Management Function Buffers.