NWConvertFileHandle

Converts a file handle to a 4- or 6-byte NetWare handle

NetWare Server:3.11, 3.12, 3.2, 4.x, 5.x, 6.x
Platform:NLM, Windows NT, Windows 95, Windows 98
Library:Cross-Platform NetWare Calls (CAL*.*)
Service:File System

Syntax

   #include <nwmisc.h> 
   or 
   #include <nwcalls.h> 
    
   N_EXTERN_LIBRARY( NWCCODE )NWConvertFileHandle  ( 
      NWFILE_HANDLE         fileHandle,  
      nuint16               handleType,  
      pnuint8               NWHandle,  
      NWCONN_HANDLE N_FAR  *conn);
   

Delphi Syntax

   uses calwin32 
    
   Function NWConvertFileHandle 
     (fileHandle : NWFILE_HANDLE; 
      handleType : nuint16; 
      NWHandle : pnuint8; 
      Var conn : NWCONN_HANDLE 
   ) : NWCCODE;
   

Parameters

fileHandle

(IN) Specifies the name of the local file handle to be converted to a NetWare handle.

handleType

(IN) Specifies the type of handle to create:

  • 4 = Create a 4-byte NetWare handle
  • 6 = Create a 6-byte NetWare handle
NWHandle

(OUT) Points to a 4- or 6-byte NetWare Handle to which the local file handle is being converted.

conn

(OUT) Points to the connection for which the NetWare handle is valid (optional).

Return Values

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

0x0000

SUCCESSFUL

0x0006

INVALID_HANDLE

0x8801

INVALID_CONNECTION

0x890A

NLM_INVALID_CONNECTION

0x8988

INVALID_FILE_HANDLE

Remarks

The handle returned by NWConvertFileHandle should not be used to call the NWConvertHandle function. Otherwise, a new OS file handle will be created.

If NWConvertFileHandle is called with only the NETX shell running, INVALID_CONNECTION will be returned. However, the NetWare handle will still be valid and the conn parameter will be set to zero.

If a pointer is passed in the conn parameter and the NETX shell is running, a valid NetWare handle will be returned as well as 0x8801.

When a connection handle is obtained, a new licensed connection handle will be created. Close the new connection handle by calling the NWCCCloseConn function.

See Also

NWConvertHandle