Condividi tramite


Metodo IDebugHostSymbols::FindModuleByLocation (dbgmodel.h)

Il metodo FindModuleByLocation esaminerà il contesto host specificato e determinerà quale modulo contiene l'indirizzo specificato dalla posizione specificata. Verrà quindi restituita un'interfaccia a tale modulo.

Sintassi

HRESULT FindModuleByLocation(
  IDebugHostContext *context,
  Location          moduleLocation,
  IDebugHostModule  **module
);

Parametri

context

Questo contesto host verrà cercato un modulo caricato contenente l'indirizzo specificato dall'argomento moduleLocation.

moduleLocation

Il modulo nel contesto specificato che contiene l'indirizzo specificato da questo argomento verrà restituito (o il metodo avrà esito negativo).

module

Se il modulo viene trovato, verrà restituita un'interfaccia per il modulo.

Valore restituito

Questo metodo restituisce HRESULT che indica l'esito positivo o negativo.

Osservazioni

codice di esempio

ComPtr<IDebugHost> spHost; /* get the host */

ComPtr<IDebugHostSymbols> spSym;
if (SUCCEEDED(spHost.As(&spSym)))
{
    // Find the module which contains the address 0x7f638000 in the current 
    // UI context (process) of the debug host
    ComPtr<IDebugHostModule> spModule;
    if (SUCCEEDED(sySym->FindModuleByLocation(USE_CURRENT_HOST_CONTEXT, 
                                              0x7f638000, 
                                              &spModule)))
    {
        // spModule is the module which contains the VA 0x7f638000
    }
}

Fabbisogno

Requisito Valore
intestazione dbgmodel.h

Vedere anche

interfaccia IDebugHostSymbols