IUrlAccessor::GetDocFormat method (searchapi.h)
Gets the document format, represented as a Multipurpose Internet Mail Extensions (MIME) string.
Syntax
HRESULT GetDocFormat(
[out] WCHAR [] wszDocFormat,
[in] DWORD dwSize,
[out] DWORD *pdwLength
);
Parameters
[out] wszDocFormat
Type: WCHAR[]
Receives a pointer to a null-terminated Unicode string containing the MIME type for the current item.
[in] dwSize
Type: DWORD
Size of wszDocFormat in TCHARs.
[out] pdwLength
Type: DWORD*
Receives a pointer to the number of TCHARs written to wszDocFormat, not including the terminating NULL.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The wszDocFormat is used to identify the correct IFilter for the stream returned by IUrlAccessor::BindToStream. Implement this method when the URL item is supposed to have a different association than is indicated by the file name extension or content type. For example, if .doc items are not associated with Microsoft Word, this method should return the CLSID Key key of the appropriate document source.
If you do not provide an implementation of this method or the IUrlAccessor::GetCLSID method, the filter host uses the out parameters from IUrlAccessor::GetFileName to determine the Multipurpose Internet Mail Extensions (MIME) content type.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP with SP2, Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 with SP1 [desktop apps only] |
Target Platform | Windows |
Header | searchapi.h |
Redistributable | Windows Desktop Search (WDS) 3.0 |