GetDocAnnotation method
This method is intended for use with C/C++.
- Method
- short GetDocAnnotation(
- Parameters
- Index
- Specifies the zero-based index of the annotation to be returned. It must be a number greater than or equal to zero and less than the value returned by GetNumDocAnnotations.
- pText
- Points to a string to receive the text of the annotation.
- pUserId
- Points to a string to receive the user ID for the annotation.
- pDateTime
- Points to a string to receive the date and time for the annotation.
- pPage
- Points to a variable to receive the document page number for the annotation. On return, this variable is set to type VT_I4.
- pPublic
- Points to a variable to receive a Boolean flag indicating whether the annotation is public or private. On return, this variable is set to type VT_I2.
- pCanBeCopied
- Points to a variable to receive a Boolean flag indicating whether the annotation can be copied to another server. On return, this variable is set to type VT_I2.
- Description
- The annotation data is retrieved.
- Return Value
- Refer to return code.
- See Also
- GetNumDocAnnotations and GetAnnotationForDoc methods
The following example retrieves an annotation for a document.
VARIANT num_notes, page, ispublic, canbecopied;
CArsOle * pArsCtrl;
short rc, j;
char * pText, userid[100], datetime[200];
rc = pArsCtrl->GetNumDocAnnotations( &num_notes );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
pText = new char[35000];
for ( j = 0; j < num_notes.iVal; j++ )
{
rc = pArsCtrl->GetDocAnnotation( j,
(LPUNKNOWN)pText,
(LPUNKNOWN)userid,
(LPUNKNOWN)datetime,
&page,
&ispublic,
&canbecopied );
if ( rc != ARS_OLE_RC_SUCCESS )
ERROR;
// Process annotation
}
delete pText;