NWAFPCreateFile

Creates an AFP file

Local Servers:blocking
Remote Servers:blocking
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:AFP

Syntax

  #include <nwafp.h> 
  or 
  #include <nwcalls.h> 
   
  NWCCODE NWAPI  NWAFPCreateFile  ( 
     NWCONN_HANDLE   conn,  
     nuint16         volNum,  
     nuint32         AFPEntryID,  
     nuint8          delExistingFile,  
     pnuint8         finderInfo,  
     pnstr8          AFPPathString,  
     pnuint32        newAFPEntryID);
  

Delphi Syntax

  uses calwin32 
   
  Function NWAFPCreateFile 
    (conn : NWCONN_HANDLE; 
     volNum : nuint16; 
     AFPEntryID : nuint32; 
     delExistingFile : nuint8; 
     finderInfo : pnuint8; 
     AFPPathString : pnstr8; 
     newAFPEntryID : pnuint32 
  ) : NWCCODE;
  

Parameters

conn
(IN) Specifies the NetWare server connection handle.
volNum
(IN) Specifies the volume number of the directory’s entry location.
AFPEntryID
(IN) Specifies the AFP base ID.
delExistingFile
(IN) Specifies whether to delete the file of the same name (0 = do not delete).
finderInfo
(IN) Points to AFPFILEINFO containing the finder information for the new file.
AFPPathString
(IN) Points to the AFP directory path relative to AFPEntryID.
newAFPEntryID
(OUT) Points to the ID of the newly created directory.

Return Values

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

0x0000

SUCCESSFUL

0x8801

INVALID_CONNECTION

0x8805

NET_RECV_ERROR

0x890A

NLM_INVALID_CONNECTION

0x8980

ERR_LOCK_FAIL

0x8981

NO_MORE_FILE_HANDLES

0x8983

IO_ERROR_NETWORK_DISK

0x8984

NO_CREATE_PRIVILEGES

0x8987

WILD_CARDS_IN_CREATE_FILE_NAME

0x8988

INVALID_FILE_HANDLE

0x898A

NO_DELETE_PRIVILEGES

0x898D

SOME_FILES_AFFECTED_IN_USE

0x898E

NO_FILES_AFFECTED_IN_USE

0x898F

SOME_FILES_AFFECTED_READ_ONLY

0x8990

NO_FILES_AFFECTED_READ_ONLY

0x8993

NO_READ_PRIVILEGES

0x8996

SERVER_OUT_OF_MEMORY

0x8998

VOLUME_DOES_NOT_EXIST

0x8999

DIRECTORY_FULL

0x899B

BAD_DIRECTORY_HANDLE

0x899C

INVALID_PATH

0x899E

INVALID_FILENAME

0x89A1

DIRECTORY_IO_ERROR

0x89A2

READ_FILE_WITH_RECORD_LOCKED

0x89FD

BAD_STATION_NUMBER

0x89FF

NO_FILES_FOUND_ERROR

0x89FF

File Exists Error

Remarks

The file resulting from NWAFPCreateFile is not opened; it is created as a normal Read/Write file with the system and hidden bits cleared.

For AFPPathString, byte 0 must be the length of the file name. The file name begins at byte 1 of the string. (Only include the file name—not the full path name—when calling NWAFPCreateFile.)

NCP Calls

See Also

NWOpenNSEntry, NWOpenDataStream (Multiple and Inter-File Services), NWAFPDelete, NWAFPRename