Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Networking /
Chapter 9 - AppleTalk Filing Protocol (AFP) / AFP Reference
Data Structures


AFP Command Block Record

An AFP command block record of type AFPCommandBlock defines the structure of
the command block that you use to send either a read (afpRead) or write (afpWrite) command to the server. A command block is a data structure that is used to specify an AFP command and its parameters, which the .XPP driver sends to an AFP server to be executed. The XPP parameter block for the AFPCommand function contains a pointer to the command block. The read and write commands use different fields of this record. You pass a pointer to the AFP command block record as a field value of the XPP parameter block. The command block record fields are defined in the section describing the command that uses them.

AFPCommandBlock = 
PACKED RECORD
   cmdByte:             Byte;    {AFP command code}
   startEndFlag:        Byte;    {start/end flag; for the read }
                                 { command, identifies offset }
                                 { relative to fork}
   forkRefNum:          Integer; {fork reference number}
   rwOffset:            LongInt; {offset within fork to begin }
                                 { reading or writing}
   reqCount:            LongInt; {on input, requested size of }
                                 { data; on return, size of data }
                                 { actually read or written}
   newLineFlag:         Byte;    {new line flag}
   newLineChar:         Char;    {new line character}
END;

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996