NSPStartup

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   
);
 

Parameters

lpProviderId
[in] Indicates the desired provider for which to return the entry points.
lpnspRoutines
[out] Pointer to all of the Provider entry points.

Data Types

The following data types are needed for this call.

NSP_ROUTINE
The NSP_ROUTINE structure contains information regarding all of the functions implemented by a given provider.
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; 
 
cbSize
Size of this structure.
dwMajorVersion
The major version of the service provider specification supported by this provider.
dwMinorVersion
The minor version of the service provider specification supported by this provider.
*NSP*.*
Pointers to the various NSP functions. Every entry must point to a valid function. If the provider does not implement this function, it should simply return WSAENOTIMPLEMENTED.

Note In the header file this structure contains complete prototypes for all of the NSP pointers.

Return Values

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.

QuickInfo

  Windows NT: Yes
  Windows: Yes
  Windows CE: Unsupported.
  Header: Declared in ws2spi.h.