Share via


WSAEnumNameSpaceProviders (Windows CE 5.0)

Send Feedback

This function retrieves information about available name spaces.

INT WSAAPI WSAEnumNameSpaceProviders(LPDWORD lpdwBufferLength,LPWSANAMESPACE_INFO lpnspBuffer);

Parameters

  • lpdwBufferLength
    [in, out] On input, the number of bytes contained in the buffer pointed to by lpnspBuffer. On output (if the function fails and the error is WSAEFAULT), the minimum number of bytes to pass for the lpnspBuffer to retrieve all the requested information. The passed-in buffer must be sufficient to hold all of the name space information.
  • lpnspBuffer
    [out] Buffer that is filled with WSANAMESPACE_INFO structures. The returned structures are located consecutively at the head of the buffer. Variable-sized information referenced by pointers in the structures point to locations within the buffer located between the end of the fixed-sized structures and the end of the buffer.

Return Values

If no error occurs, this function returns the number of WSANAMESPACE_INFO structures copied into lpnspBuffer. If an error occurs, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling the WSAGetLastError function.

The following table shows the possible error codes.

Error code Description
WSAEFAULT The buffer length was too small to receive all the relevant WSANAMESPACE_INFO structures and associated information. Passes in a buffer at least as large as the value returned in lpdwBufferLength.
WSANOTINITIALIZED The ws2.dll has not been initialized. The application must first call WSAStartup before calling any Windows Sockets functions.
WSA NOT ENOUGH MEMORY There was insufficient memory to perform the operation.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winsock2.h.
Link Library: Ws2.lib.

See Also

WSAGetLastError | WSAStartup

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.