Share via


RegisterMediaTypeClass (Windows Embedded CE 6.0)

1/6/2010

This function registers a mapping of media types to CLSIDs to override the default mapping specified in the registry.

Syntax

HRESULT RegisterMediaTypeClass(
  LPBC pbc,
  UINT ctypes,
  LPCSTR* rgszTypes,
  CLSID* rgclsID,
  DWORD dwReserved
);

Parameters

  • pbc
    [in] Address of the IBindCtx interface for the bind context in which the media types are to be registered.
  • ctypes
    [in] Unsigned integer value that contains the number of media type strings in the rgszTypes array. This parameter cannot be zero.
  • rgszTypes
    [in] Address of an array of strings identifying the media types to be registered. None of these strings can be NULL.
  • rgclsID
    [in] Address of an array of CLSIDs to associate with the media type strings in the rgszTypes array.
  • dwReserved
    [in] Reserved. Must be zero.

Return Value

Returns S_OK if successful or E_INVALIDARG if one or more parameters are invalid.

Remarks

The new mapping is used in calls to IMoniker::BindToObject when binding objects in the specified bind context.

This function is primarily used by moniker clients calling IMoniker::BindToObject to override the default registry mapping between MIME types and CLSIDs. In most cases, the default mapping provided in the registry is used. However, a Web browser might require the CLSID for its HTML viewer to be associated with .txt files without changing the default registry association for text files. The override is used for all bind operations using the specified bind context.

Requirements

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

See Also

Reference

URL Moniker Services Functions