IObjectControl::Activate Method Example
#include <mtx.h> IObjectContext* m_pObjectContext; HRESULT MyObject::Activate() { // Get a reference to the object's context here, // so it can be used by any method that may be // called during this activation of the object. HRESULT hr = GetObjectContext(&m_pObjectContext); if (SUCCEEDED(hr)) return S_OK; return hr; }