IDebugCodeContext3::GetModule
擷取偵錯模組介面的參考。
語法
參數
ppModule
[out]偵錯模組介面的參考。
傳回值
如果成功,則會傳回 S_OK
;否則,會傳回錯誤碼。
範例
下列範例示範如何針對公開 IDebugBeforeSymbolSearchEvent2 介面的 CDebugCodeContext 物件實作這個方法。
HRESULT CDebugCodeContext::GetModule(IDebugModule2** ppModule)
{
HRESULT hr = S_OK;
CComPtr<CModule> pModule;
IfFalseGo( ppModule, E_INVALIDARG );
*ppModule = NULL;
IfFailGo( this->GetModule(&pModule) );
IfFailGo( pModule->QueryInterface(IID_IDebugModule2, (void**) ppModule) );
Error:
return hr;
}