ICatRegister::RegisterClassReqCategories (Compact 2013)

3/26/2014

This method registers the class as requiring one or more component categories.

Syntax

HRESULT RegisterClassReqCategories(
  REFCLSID rclsid, 
  ULONG cCategories, 
  CATID rgcatid[]
);

Parameters

  • rclsid
    [in] Class identifier of the relevant class for which category information will be set.
  • cCategories
    [in] Number of category CATIDs to associate as category identifiers for the class.
  • rgcatid
    [in] Array of cCategories CATID to associate as category identifiers for the class.

Return Value

If the method succeeds, the return value is S_OK.

If one or more arguments are incorrect, the method returns E_INVALIDARG.

Remarks

In case of an error, this function does not ensure that the Registry is restored to the state prior to the call. This function can only be called by the owner of a class, usually as part of the installation of the component.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header

comcat.h,
comcat.idl

Library

ole32.lib,
uuid.lib

See Also

Reference

ICatRegister
ICatRegister::RegisterCategories
ICatRegister::RegisterClassImplCategories
ICatRegister::UnRegisterCategories
ICatRegister::UnRegisterClassImplCategories
ICatRegister::UnRegisterClassReqCategories