NWConvertFileHandle(3nw)


NWConvertFileHandle -- converts a file handle (NWFILE_HANDLE) to a 4- or 6-byte NetWare handle

Synopsis

   #include <nwmisc.h> 
   or 
   #include <nwcalls.h> 
   

NWCCODE N_API NWConvertFileHandle (NWFILE_HANDLE fileHandle, nuint16 handleType, pnuint8 NWHandle, NWCONN_HANDLE N_FAR * conn);

Description

The parameters are as follows:

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 the local file handle is being converted to.

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

Return values

0x0000
SUCCESSFUL

0x0006
INVALID_HANDLE 0x8801 INVALID_CONNECTION

0x8988
INVALID_FILE_HANDLE

Notices

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

If NWConvertFileHandle is called with only the shell (NETX) running, the connection handle will NOT be returned. Instead NWConvertFileHandle will return INVALID_CONNECTION. However, the NetWare handle will still be valid and conn will be set to zero.

If NULL is passed in conn, no error will be returned. If a pointer is passed in conn and the shell is running, a valid NetWare handle will be returned as well as 0x8801. .P On the Mac OS, the above remarks are not true. These are non-native file handles and can only be used with the NetWare functions.

When a connection handle is obtained, this creates a new, licensed connection handle that should be closed by NWCloseConn when no longer used.

Services

File I/O

NCP calls

None

References

NWConvertHandle(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.