Partager via


IDebugCodeContext3::GetModule

Retrieves a reference to the interface of the debug module.

HRESULT GetModule( 
   IDebugModule2 **ppModule
);
public int GetModule( 
   out IDebugModule2 ppModule
);

Parameters

  • ppModule
    [out] Reference to the debug module interface.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Example

The following example shows how to implement this method for a CDebugCodeContext object that exposes the IDebugBeforeSymbolSearchEvent2 interface.

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;
}

See Also

Reference

IDebugCodeContext3