NWADReadRecord

Reads a specified record

Local Servers:blocking
Remote Servers:blocking
NetWare Server:4.1 and above
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform Auditing (AUD*.*)
Service:Auditing

Syntax

   #include <nwaudit.h> 
   or 
   #include <nwnet.h> 
    
   N_EXTERN_LIBRARY NWRCODE  NWADReadRecord  ( 
      nptr       recordHandle,  
      nuint16    maxSize,  
      nint16     direction,  
      pnuint8    buffer,  
      pnuint16   bufferSize,  
      pnuint8    eofFlag,  
      pnuint32   offsetPtr); 
   
   

Pascal Syntax

   uses audwin32 
    
   Function NWADReadRecord 
     (recordHandle : nptr;       
      maxSize : nuint16; 
      direction : nint16; 
      Var buffer : nuint8; 
      Var bufferSize : nuint16; 
      Var eofFlag : nuint8; 
      Var offsetPtr : nuint32 
   ) : NWRCODE; 
   
   

Parameters

recordHandle
(IN) Specifies the record handle allocated in NWADOpenRecordFile.
maxSize
(IN) Specifies the size of the buffer passed into the call. NWADReadRecord will write beyond the end of the specified buffer size. Typically, size is 512 bytes.
direction
(IN) Specifies whether to get the previous or the next record:
  • -1 = Get previous record
  • 1 = Get next record
buffer
(IN/OUT) Points to a buffer to contain the record.
bufferSize
(OUT) Points to the size of data contained in the buffer.
eofFlag
(OUT) Points to a flag indicating whether the end of the file has been reached:
  • 1 = End of file
  • 0 = More file to be read
offsetPtr
(IN) Points to a book marker indicating where the previously read record is located.

Return Values

These are common return values; see Return Values (Return Values for C) for more information.

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8983

Auditing Hardware Error

0x8984

Auditing Not Supported

0x8997

Auditing Not Enabled

0x8998

VOLUME_DOES_NOT_EXIST

0x89DE

PASSWORD_HAS_EXPIRED_NO_GRACE

Remarks

Either an end of file flag or -1 is a valid signal to NWADReadRecord to stop reading from the specified file.

NCP Calls

See Also

NWADOpen, NWADOpenRecordFile, NWADCloseRecordFile