LPNSPCLEANUP callback function (ws2spi.h)
The NSPCleanup function terminates the use of a particular Windows Sockets namespace service provider.
Syntax
LPNSPCLEANUP Lpnspcleanup;
INT Lpnspcleanup(
[in] LPGUID lpProviderId
)
{...}
Parameters
[in] lpProviderId
A pointer to the GUID of the namespace provider to be terminated.
Return value
If no error occurs, then 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 code | Meaning |
---|---|
WSA_NOT_ENOUGH_MEMORY | There is not enough memory available to perform this operation. |
WSAEINVAL | The lpProviderId parameter doesn't 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
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | ws2spi.h |