Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: Visual Studio
Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
Retrieves a reference to the interface of the debug module.
HRESULT GetModule(
IDebugModule2 **ppModule
);
public int GetModule(
out IDebugModule2 ppModule
);
ppModule
[out] Reference to the debug module interface.
If successful, returns S_OK
; otherwise, returns an error code.
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;
}