Edit

Share via


IDebugSourceServerModule::GetSourceServerData

Retrieves an array of source server information.

Syntax

public int GetSourceServerData(
    out uint  pDataByteCount,
    out int[] ppData
);

Parameters

pDataByteCount
[out] Number of bytes in the data array.

ppData
[out] Reference to the data array.

Return Value

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

Example

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

HRESULT CModule::GetSourceServerData(ULONG* pDataByteCount, BYTE** ppData)
{
    HRESULT hr = S_OK;
    CComPtr<ISymUnmanagedReader> pSymReader;
    CComPtr<ISymUnmanagedSourceServerModule> pSourceServerModule;

    IfFalseGo( pDataByteCount && ppData, E_INVALIDARG );
    *pDataByteCount = 0;
    *ppData = NULL;

    IfFailGo( this->GetUnmanagedSymReader( &pSymReader ) );
    IfFailGo( pSymReader->QueryInterface( &pSourceServerModule ) );

    IfFailGo( pSourceServerModule->GetSourceServerData( pDataByteCount, ppData ) );

Error:

    return hr;
}

See also