GetDocType method

This method is intended for use with C/C++.

Method
short GetDocType(
long Index,
VARIANT * pType,
LPUNKNOWN pExtension )
Parameters
Index
Specifies the zero-based index of a document within the document list of the active folder. If this value is less than zero, then the open document is used.
pType
Points to a variable to receive the document type of the specified document. The document type is one of the document type values found in ARSOLEEX.H, such as ARS_OLE_DOC_TYPE_AFP.
pExtension
Points to a string to receive the file extension of the document. This value is returned only if the document type is ARS_OLE_DOC_TYPE_USER_DEF.
Description
Retrieves the document type. If the document type is ARS_OLE_DOC_TYPE_USER_DEF, then the file extension is also retrieved.
Return Value
Refer to return codes.
See Also
GetTypeForDoc
The following example retrieves the document type for the third item in the document list.
 VARIANT type;
 char ext[ 20 ];
 CArsOle * pArsCtrl;
 short rc;
   .
   .
   .

 rc = pArsCtrl->GetDocType( 2, &type, extension  );
 if ( rc != ARS_OLE_RC_SUCCESS )
   ERROR;

   .
   .
   .