GetDocFormat Method

The GetDocFormat method returns the document format represented as a Multipurpose Internet Mail Extensions (MIME) string.

Syntax
HRESULT GetDocFormat(
  WCHAR wszDocFormat[],
  DWORDdwSize,
  DWORD*pdwLength);
Parameters
  • wszDocFormat
    [out, length_is(*pdwLength), size_is(dwSize)] Pointer to a wszDocFormat that contains a string buffer where the MIME type for the current item will be written.
  • dwSize
    [in] Pointer to a DWORD that contains the size of the wszDocFormat string buffer.
  • pdwLength
    [in] Pointer to a DWORD that contains the number of characters written to the wszDocFormat string buffer.
Error Value

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

Remarks

The Filter Daemon makes the association between the item's file extension and the MIME "Content Type" if you do not provide an implementation for GetDocFormat or GetCLSID. Implement this method when the extension(s) you are dealing with are supposed to have a different association than what 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 MIME string of the appropriate document source.

Example

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