WSAStartupWithNLMHandle

Initiates the use of Winsock with an NLM handle.

Library:LibC
Standard:Novell
Service:Winsock

Syntax

  #include <winsock/ws2ext.h> 
   
  int WSPAPI WSAStartupWithNLMHandle (
     WORD        wVersionRequested,
     LPWSADATA   lpWSAData,
     void       *nlmHandle);
  

Parameters

wVersionRequested

(IN) Specifies the highest version of Windows sockets support that the caller can use. The high-order byte specifies the minor version (revision) number; the low-order byte specifies the major version number.

lpWSAData

(IN/OUT) Points to the WSADATA structure that receives the details of the Windows sockets implementation.

nlmHandle

(IN) Points to the NLM handle of the application to be associated with this instance of Winsock.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

10022

WSAEINVAL

NLM handle is invalid.

10091

WSASYSNOTREADY

The underlying network subsystem is not ready for network communication.

10092

WSAVERNOTSUPPORTED

The version of Windows Sockets support requested is not provided by this particular Windows Sockets implementation.

Remarks

The WSAStartupWithNLMHandle function has the equivalent functionality as the standard Winsock function WSAStartup, except it allows the application to designate the NLM Handle to be associated with the startup call. When WSAStartup is called on NetWare, the NLM handle of the calling process is associated with the session and all subsequent calls into Winsock must be from that NLM. In the case of a library which initializes Winsock for a calling application, library needs to register the NLM handle of the calling application, so the application can later use the Winsock calls directly.

See Also