GetRuntimeClassID Method

Returns the class ID of the run-time object corresponding to the design-time control.

Visual Basic Syntax

Not needed in Visual Basic.

Visual C++ Syntax

HRESULT GetRuntimeClassID(CLSID *pClsid);

Parameter

pClsid

[out] CLSID of the run-time object created by the ActiveX designer.

Return Values

The return value obtained from the returned HRESULT is one of the following:

Return Value Meaning
S_OK

Success.

E_FAIL

The method failed for an unknown reason.

E_NOTIMPL

The run-time and design-time objects are the same.


Remarks

The host calls GetRuntimeClassID to get the CLSID of the run-time object. The CLSID is also marked in the registry entry for the ActiveX designer under the Instance CLSID heading. Typically DTCs have no run time object, so use E_NOTIMPL.

Visual C++ Example

In the following example, the CLSID is retained as a constant and returned upon request through GetRuntimeClassID:

STDMETHODIMP CMyDesigner::GetRuntimeClassID(CLSID *pclsid)
{
return E_NOTIMPL;
}