Share via


GetDocFormat Method

Gets the document format represented as a Multipurpose Internet Mail Extensions (MIME) string.

HRESULT GetDocFormat(
WCHAR wszDocFormat[],
DWORD dwSize,
DWORD *pdwLength
);

Parameters

wszDocFormat

[out] A null-terminated Unicode string containing the MIME type for the current item.

dwSize

[in] DWORD representing the size of wszDocFormat.

pdwLength

[out] Pointer to the DWORD that contains the number of characters written to the wszDocFormat string, not including NULL.

Return Value

If successful, returns S_OK, otherwise, it returns an error value. For a list of error messages returned by Enterprise Search in Microsoft Office SharePoint Server 2007, see Protocol Handler Error Messages.

Remarks

If you do not provide an implementation for this method or the GetCLSID Method method, the Filter Daemon makes the association between the item's file name extension and the MIME type.

Implement this method when the extensions you are handling have a different association from what is indicated by the file name extension or content type. For example if ".doc" items in your content source are not associated with Microsoft Office Word files, this method should return the CLSID for the appropriate content type.

See Also

Concepts

Protocol Handler Reference
IUrlAccessor Interface
Enterprise Search Protocol Handlers