RegisterMediaTypeClass

王朝百科·作者佚名  2010-03-31
窄屏简体版  字體:   |    |    |  超大  

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 toIMoniker::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 theIBindCtx 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 callingIMoniker::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

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航