IProvideDynamicClassInfo::FreezeShape

Freezes the dynamic type information so that no more changes are permitted to the object.

HRESULT FreezeShape();

Parameters

None.

Return Values

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

Return Value

Meaning

S_OK

Success.

E_FAIL

The method failed for an unknown reason.

E_OUTOFMEMORY

Out of memory.


Comments

The host calls FreezeShape immediately after loading the run-time object, so the type information for the run-time object cannot change.

Example

The following example sets a global flag, m_fFreezeShape, to indicate that the type information cannot change any further. The flag will be cleared after the current object is destroyed and a new instance is created.

STDMETHODIMP CMyDesigner::FreezeShape
(
    void
)
{
    m_fFreezeShape = TRUE;
    return S_OK;
}