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 of the NSP functions must be called from within a NSPStartup/NSPCleanup pair. WSC functions do not need to be called from within a 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 of 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. |
Windows NT: Yes
Windows: Yes
Windows CE: Unsupported.
Header: Declared in ws2spi.h.