Platform SDK: Windows Sockets |
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. NSPStartup and NSPCleanup must be called as pairs. All the NSP functions must be called from within an NSPStartup/NSPCleanup pair. WSC functions do not need to be called from within an NSPStartup/NSPCleanup pair either.
int NSPStartup ( LPGUID lpProviderId, LPNSP_ROUTINE lpnspRoutines );
The following data types are needed for this call.
typedef struct _NSP_ROUTINE { DWORD cbSize; DWORD dwMajorVersion; DWORD dwMinorVersion; INT ( *NSPCleanup) ; INT ( *NSPLookupServiceBegin) ; INT ( *NSPLookupServiceNext) ; INT ( *NSPLookupServiceEnd) ; INT ( *NSPSetService) ; INT ( *NSPInstallServiceClass) ; INT ( *NSPRemoveServiceClass) ; INT ( *NSPGetServiceClassInfo) ; } NSP_ROUTINE, *PNSP_ROUTINE, *LPNSP_ROUTINE;
Note In the header file this structure contains complete prototypes for all the NSP pointers.
The function should return NO_ERROR (zero) if the routine succeeds. It should return SOCKET_ERROR (–1) if the routine fails and it must set the appropriate error code using SetLastError.
WSAEINVAL | One or more parameters were invalid or missing for this provider. |
WSA_NOT_ENOUGH_MEMORY | Not enough free memory available to perform this operation. |
Version: Requires Windows Sockets 2.0.
Header: Declared in Ws2spi.h.