Compartilhar via


IClassActivator::GetClassObject (Compact 2013)

3/26/2014

This method retrieves a class object. It is similar to CoGetClassObject.

Syntax

HRESULT GetClassObject(
  REFCLSID* pClassID,
  DWORD dwClsContext,
  LCID locale,
  REFIID riid,
  void** ppv 
);

Parameters

  • pClassID
    [in] Points to the CLSID that Identifies the class whose class object is to be retrieved.
  • dwClsContext
    [in] Context in which the class is expected to run; values are taken from the CLSCTX enumeration.
  • locale
    [in] Any LCID constant as defined in WINNLS.H.
  • riid
    [in] IID of the interface on the object to which a pointer is desired.
  • ppv
    [out] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppv contains the requested interface pointer.

Return Value

This method supports the standard return value E_FAIL, as well as the following:

  • S_OK
    The CLSID was successfully returned.

Remarks

This method returns the class identifier (CLSID) for an object, used in later operations to load object-specific code into the caller's context.

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

Requirements

Header

objidl.h,
objidl.idl

Library

ole32.lib,
uuid.lib

See Also

Reference

IClassActivator
CoGetClassObject