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: More Macintosh Toolbox /
Chapter 9 - Desktop Manager / Desktop Manager Reference
Routines / Reading the Desktop Database


PBDTGetComment

To retrieve the user comments for a file or directory, use the PBDTGetComment function.

FUNCTION PBDTGetComment (paramBlock: DTPBPtr; 
                         async: Boolean): OSErr;
paramBlock
A pointer to a desktop parameter block.
async
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
\xAEioResultOSErrThe result code of the function.
-->ioNamePtrStringPtrA pointer to a file or directory name.
-->ioDTRefNumIntegerThe desktop database reference number.
-->ioDTBufferPtrA pointer to comment text (200 bytes).
\xAEioDTActCountLongIntThe comment size.
-->ioDirIDLongIntThe parent directory of the file or directory.

DESCRIPTION
The PBDTGetComment function retrieves the comment stored for a file or directory in the database specified in ioDTRefNum. You specify the filename or directory name and its parent directory ID through ioNamePtr and ioDirID. You allocate a buffer big enough to hold the largest comment, 200 bytes, and put a pointer to it in the ioDTBuffer field. The PBDTGetComment function places the comment in the buffer as a plain text string and places the length of the comment in ioDTActCount.

RESULT CODES
noErr0No error
ioErr-36I/O error
fnfErr-43File or directory doesn't exist
rfNumErr-51Reference number invalid
extFSErr-58External file system--file system identifier is nonzero
afpItemNotFound-5012Information not found

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996