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.
Retrieves the name of the module currently being debugged.
HRESULT GetModuleName(
BSTR *pbstrModuleName
);
public int GetModuleName (
string pbstrModuleName
);
Parameters
- pbstrModuleName
[out] Name of the module.
Return Value
If successful, returns S_OK; otherwise, returns an error code.
Example
The following example shows how to implement this method for a CDebugBeforeSymbolSearchEventBase object that exposes the IDebugBeforeSymbolSearchEvent2 interface.
STDMETHODIMP CDebugBeforeSymbolSearchEventBase::GetModuleName(BSTR *pbstrModuleName)
{
HRESULT hRes = E_FAIL;
if (m_bstrModuleName)
{
*pbstrModuleName = SysAllocString( m_bstrModuleName);
if (*pbstrModuleName)
{
hRes = S_OK;
}
}
return ( hRes );
}