GetCLSID Method

The GetCLSID method returns the CLSID of a document type.

Syntax
HRESULT GetCLSID(
  CLSID* pClsid);
Parameters
  • pClsid
    [out] Pointer to a CLSID that contains the Class ID from the registry for document type. This is used for items with special IFilter associations to indicate the appropriate IFilter to use for that embedded document.
Error Value

For a list of error messages returned by SharePoint Portal Server Protocol Handlers, see Error Messages.

Remarks

If you do not provide an implementation for the GetDocFormat or GetCLSID methods, the Filter Daemon will make the association between the item's file extension and the Multipurpose Internet Mail Extensions (MIME) "Content Type". Implement this method when the extension(s) you are dealing with are supposed to have a different association than is indicated by the file extension or content type. For example if ".doc" items in your content source are not associated with Microsoft Word, this method should return the Class ID of the appropriate document source.

Example

To see this method in a fuller context, see Protocol Handler Sample.