Export (0) Print
Expand All
Expand Minimize

NSPCleanup function

The NSPCleanup function terminates the use of a particular Windows Sockets namespace service provider.

Syntax


int WSAAPI NSPCleanup(
  _In_  LPGUID lpProviderId
);

Parameters

lpProviderId [in]

A pointer to the GUID of the namespace provider to be terminated.

Return value

If no error occurs, NSPCleanup returns a value of NO_ERROR (zero). Otherwise, SOCKET_ERROR (–1) is returned and the provider must set the appropriate error code using WSASetLastError.

Error codeMeaning
WSA_NOT_ENOUGH_MEMORY

There is not enough memory available to perform this operation.

WSAEINVAL

The lpProviderId parameter does not specify a valid provider.

WSAEOPNOTSUPP

The operation is not supported. This error is returned if the namespace provider does not implement this function.

 

Remarks

The NSPCleanup function is called when an application is finished using a Windows Sockets namespace service provider. The NSPCleanup function deregisters a particular namespace provider and allows the transport service provider to free any of the namespace provider's allocated resources.

The NSPStartup function must be called successfully before using any namespace providers. It is permissible to make more than one NSPStartup call. However, for each NSPStartup call, a corresponding NSPCleanup call must also be issued. Only the final NSPCleanup for the service provider does the actual cleanup; the preceding calls decrement an internal reference count in the service provider.

This function should not return until the namespace service provider DLL can be unloaded from memory.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Ws2spi.h

See also

NSPStartup
WSASetLastError

 

 

Community Additions

ADD
Show:
© 2014 Microsoft