Click to return to the Networking, Protocols     
FindMediaTypeClass Functi...     GetClassFileOrMime Functi...     URL Monikers Functions    
Web Workshop  |  Networking, Protocols & Data Formats

FindMimeFromData Function


Determines the MIME type from the data provided.

Syntax

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 pBuffer contains the data to be sniffed.
pBuffer
Address of the buffer containing the data to be sniffed. This can be set to NULL if pwzUrl contains 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. This must be set to zero.
ppwzMimeOut
Address of a string value containing the suggested MIME type.
dwReserved
Reserved. This must be set to zero.

Return Value

Returns one of the following values:

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.

Function Information

Windows NT Use version 4.0. Implemented as a Unicode function.
Windows Use Windows 95 and later. Implemented as a Unicode function.
Header Urlmon.h
Import Library Urlmon.lib
Minimum availability Internet Explorer 4.0

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.