NWAFPOpenFileFork(3nw)


NWAFPOpenFileFork -- opens AFP file fork from DOS environment

Synopsis

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

NWCCODE NWAPI NWAFPOpenFileFork (NWCONN_HANDLE conn, nuint16 volNum, nuint32 AFPEntryID, nuint8 forkIndicator, nuint8 accessMode, pnstr8 AFPPathString, pnuint32 fileID, pnuint32 forkLength, pnuint8 NWHandle, NWFILE_HANDLE N_FAR * DOSFileHandle);

Description

The parameters are as follows:

conn
(IN) Specifies the NetWare server connection handle.

volNum
(IN) Specifies the volume number of the directory entry location.

AFPEntryID
(IN) Specifies the AFP base ID.

forkIndicator
(IN) Specifies the data or resource fork indicator (0=data; 1=resource).

accessMode
(IN) Specifies the file access mode indicator. (AR_READ and/or AR_WRITE should be set.)

AFPPathString
(IN) Points to the AFP directory path relative to AFPEntryID.

fileID
(OUT) Points to the file entry ID.

forkLength
(OUT) Points to the length of the opened fork.

NWHandle
(OUT) Points to the 6-byte NetWare file handle.

DOSFileHandle
(OUT) Points to the file handle.

Return values

0x0000
SUCCESSFUL

0x8801
INVALID_CONNECTION

0x8980
FILE_IN_USE_ERROR

0x8981
NO_MORE_FILE_HANDLES

0x8988
INVALID_FILE_HANDLE

0x8983
IO_ERROR_NETWORK_DISK

0x8993
NO_READ_PRIVILEGES

0x8994
NO_WRITE_PRIVILEGES_OR_READONLY

0x8996
SERVER_OUT_OF_MEMORY

0x8998
VOLUME_DOES_NOT_EXIST

0x8999
DIRECTORY_FULL

0x899C
Invalid AFP Path String

0x89A1
DIRECTORY_IO_ERROR

0x89A2
READ_FILE_WITH_RECORD_LOCKED

0x89FD
BAD_STATION_NUMBER

0x89FF
LOCK_ERROR, NO_FILES_FOUND_ERROR

Notices

If a file does not exist, NWAFPOpenFileFork creates the file and then opens it.

These constants are used by NWAFPOpenFileFork to identify access rights attributes.

0x0001
AR_READ

0x0002
AR_WRITE

0x0001
AR_READ_ONLY

0x0002
AR_WRITE_ONLY

0x0004
AR_DENY_READ

0x0008
AR_DENY_WRITE

0x0010
AR_COMPATIBILITY

0x0040
AR_WRITE_THROUGH

0x0100
AR_OPEN_COMPRESSED

Services

AppleTalk Filing Protocol

NCP calls

0x2222 35 08 AFP Open File Fork

References

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