NSPStartup function

The NSPStartup function retrieves the dynamic information about a provider, such as the list of the DLL entry points.

This function is called by the client upon initialization. The NSPStartup and NSPCleanup functions must be called as pairs. All NSP functions must be called from within an NSPStartup/NSPCleanup pair. It is not required that WSC functions be called from within a NSPStartup/NSPCleanup pair.

Syntax

INT WSAAPI NSPStartup(
  LPGUID        lpProviderId,
  LPNSP_ROUTINE lpnspRoutines
);

Parameters

lpProviderId

The desired provider from which to return the entry points.

lpnspRoutines

A pointer to an NSP_ROUTINE structure that points to provider entry points if the function call is successful.

Return Value

The function should return NO_ERROR (zero) if the routine succeeds. It should return SOCKET_ERROR (–1) if the function fails and it must set the appropriate error code using WSASetLastError.

Value Description
WSA_NOT_ENOUGH_MEMORY
There is not enough memory available to perform this operation.
WSAEINVAL
One or more parameters were invalid, or missing, for this provider.
WSAEINVALIDPROCTABLE
The procedure call table is invalid.
WSAEOPNOTSUPP
The operation is not supported. This error is returned if the namespace provider does not implement this function.
WSASYSNOTREADY
The NSPStartup function cannot operate at this time because the underlying system it uses to provide network services is currently unavailable.

Remarks

For more information, see the NSP_ROUTINE structure.

Requirements

   
Windows version Windows 2000 Professional [desktop apps only] Windows 2000 Server [desktop apps only]
Target Platform Windows
Header ws2spi.h

See Also

NSPCleanup

NSP_ROUTINE

WSASetLastError