Contents Index Topic Contents | ||
Previous Topic: RegisterFormatEnumerator Next Topic: RegisterMediaTypes |
RegisterMediaTypeClass
HRESULT RegisterMediaTypeClass( [in] LPBC pbc, [in] UINT ctypes, [in] LPCSTR *rgszTypes, [in] CLSID *rgclsID, [in] DWORD dwReserved );Registers a mapping of media types to CLSIDs to override the default mapping specified in the registry. The new mapping is used in calls to IMoniker::BindToObject when binding objects in the specified bind context.
- Returns S_OK if successful, or E_INVALIDARG if one or more parameters are invalid.
- pbc
- Address of the IBindCtx interface for the bind context in which the media types are to be registered.
- ctypes
- Number of media type strings in the rgszTypes array. This parameter cannot be zero.
- rgszTypes
- Address of an array of strings identifying the media types to be registered. None of these strings can be NULL.
- rgclsID
- Address of an array of CLSIDs corresponding to the media type strings in the rgszTypes array.
- dwReserved
- Reserved for future use; must be zero.
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 want 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.
See also RegisterMediaTypes
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.