GetObjectContext macro (comsvcs.h)
Retrieves a reference to the context that is associated with the current COM+ object.
For similar functionality, see IMTxAS::GetObjectContext.
Syntax
void GetObjectContext(
[out] ppIOC
);
Parameters
[out] ppIOC
A reference to IObjectContext on the object's context. If the object's component has not been imported into an MTS package or if the GetObjectContext function is called from a constructor or an IUnknown method, this parameter is set to a NULL pointer.
Return value
None
Remarks
An object's context is not accessible from an object's constructor or from any IUnknown method.
An object should never attempt to pass its IObjectContext reference to another object. If you pass an IObjectContext reference to another object, it is no longer a valid reference.
When an object obtains a reference to its IObjectContext, it must release the IObjectContext object when it is finished with it.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | comsvcs.h |
Library | ComSvcs.lib |
DLL | ComSvcs.dll |