GetDataAreaPtr

Returns a previously saved data area pointer for the current NLM

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.x, 4.x, 5.x, 6.x
Service:Library

Syntax

  #include <nwlib.h>  
   
  void *GetDataAreaPtr  (  
     LONG   libraryHandle); 
  

Parameters

libraryHandle
(IN) Specifies the handle returned by a call to RegisterLibrary.

Return Values

This function returns the data area pointer if successful. If a library has called SetNLMID before calling GetDataAreaPtr, this function can return NULL.

If an error occurs, it returns EFAILURE and sets errno to:

Value

Hex

Name

Description

22

(0x16)

EBADHNDL

Invalid library handle was passed in.

Remarks

GetDataAreaPtr returns the data area pointer saved by a previous SaveDataAreaPtr call for the current NLM (usually the NLM calling the library; however, see GetNLMID and SetNLMID) and for the specified library (specified by the libraryHandle parameter).

See Also

GetNLMID (NDK: NLM Threads Management), SaveDataAreaPtr, SetNLMID (NDK: NLM Threads Management)

Example

  #include <nwlib.h> 
    
  ClientStruct   *dataAreaPtr;  
  LONG            libraryHandle;  
  dataAreaPtr = GetDataAreaPtr (libraryHandle);