ITcModuleInstance2::SetModuleContext
Searches for the context ID in the module and accepts the passed object ID only if it belongs to a valid target task of that context. When a change is made, the stored target object ID is updated and the element is marked as changed.
Signature
HRESULT SetModuleContext(UINT index, ULONG poid);
Parameter
Name | Type | Description |
|---|---|---|
index | UINT | [in] Context ID. |
poid | ULONG | [in] Object ID of the target context or target task. |
Return value
Name | Type | Description |
|---|---|---|
(HRESULT) | HRESULT |
|
Error codes
-
E_INVALIDARG: The context ID does not exist. -
E_FAIL: The context ID exists, but the target object ID does not match any valid target task. -
E_NOTIMPL: This specific element type does not support context access.