Compartir a través de


IDebugBeforeSymbolSearchEvent2::GetModuleName

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

See Also

Reference

IDebugBeforeSymbolSearchEvent2