Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function determines the MIME type from the data provided.

Syntax

HRESULT FindMimeFromData(
  LPBC 
pBC,
  LPCWSTR 
pwzUrl,
  LPVOID 
pBuffer,
  DWORD 
cbSize,
  LPCWSTR 
pwzMimeProposed,
  DWORD 
dwMimeFlags,
  LPWSTR* 
ppwzMimeOut,
  DWORD 
dwReserved
);

Parameters

pBC

Address of the bind context. This can be set to NULL.

pwzUrl

Address of a string value that contains the URL of the data. This can be set to NULL if pBuffercontains the data to be sniffed.

pBuffer

Address of the buffer containing the data to be sniffed. This can be set to NULL if pwzUrlcontains a valid URL.

cbSize

Unsigned long integer value that contains the size of the buffer.

pwzMimeProposed

Address of a string value containing the proposed MIME type. This can be set to NULL.

dwMimeFlags

Not currently defined. Must be set to zero.

ppwzMimeOut

Address of a string value containing the suggested MIME type.

dwReserved

Reserved. Must be set to zero.

Return Value

This function returns one of the values shown in the following table.

Value Description

E_INVALIDARG

One or more of the arguments passed to the function were invalid.

E_OUTOFMEMORY

The function could not allocate enough memory to complete the call.

NOERROR

The call was completed successfully.

Requirements

Header urlmon.h, urlmon.idl
Library urlmon.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later