Important: The information in this document is obsolete and should not be used for new development.
PBDTSetComment
To add a user comment for a file or a directory to the desktop database, use thePBDTSetComment
function.
FUNCTION PBDTSetComment (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.
--> ioCompletion ProcPtr A pointer to a completion routine. \xAE ioResult OSErr The result code of the function. --> ioNamePtr StringPtr A pointer to a file or directory name. --> ioDTRefNum Integer The desktop database reference number. --> ioDTBuffer Ptr A pointer to the comment text. --> ioDTReqCount LongInt The comment length. --> ioDirID LongInt The parent directory of the file or directory. DESCRIPTION
ThePBDTSetComment
function establishes the user comment associated with a file or directory in the database specified inioDTRefNum
. You specify the object name throughioNamePtr
and the parent directory ID inioDirID
. You put the comment as a plain text string in a buffer pointed to byioDTBuffer
, and you specify the length of the buffer (in bytes) inioDTReqCount
. The maximum length of a comment is 200 bytes; longer comments are truncated. Since the comment is a plain text string and not a Pascal string, the Desktop Manager relies on the value inioDTReqCount
for determining the length of the buffer.If the specified object already has a comment in the database, the new comment replaces the old.
RESULT CODES