Condividi tramite


Metodo IDebugClient::SetEventCallbacks (dbgeng.h)

Il metodo SetEventCallbacks registra un oggetto callback eventi con questo client.

Sintassi

HRESULT SetEventCallbacks(
  [in, optional] PDEBUG_EVENT_CALLBACKS Callbacks
);

Parametri

[in, optional] Callbacks

Specifica il puntatore dell'interfaccia all'oggetto callback eventi da registrare con questo client.

Valore restituito

A seconda dell'implementazione del metodo IDebugEventCallbacks::GetInterestMask nell'oggetto specificato da Callback, è possibile restituire altri valori, come descritto nella sezione Osservazioni.

Codice restituito Descrizione
S_OK
Il metodo ha avuto esito positivo.

Osservazioni

Se il valore di callback non è null, viene chiamato il metodo IDebugEventCallbacks::GetInterestMask. Se il valore restituito non è S_OK, SetEventCallbacks e SetEventCallbacksWide non hanno alcun effetto e restituiscono questo valore.

Ogni client può avere al massimo un IDebugEventCallbacks o oggetto IDebugEventCallbacksWide registrato per ricevere eventi .

L'interfaccia IDebugEventCallbacks estende l'interfaccia COM IUnknown. Quando SetEventCallbacks e SetEventCallbacksWide hanno esito positivo, chiamano il metodo IUnknown::AddRef dell'oggetto specificato da Callbacks. Il metodo IUnknown::Release di questo oggetto verrà chiamato la volta successiva che SetEventCallbacks o viene chiamato setEventCallbacksWide su questo client o quando questo client viene eliminato.

Per altre informazioni sui callback, vedere callback.

Fabbisogno

Requisito Valore
piattaforma di destinazione Desktop
intestazione dbgeng.h (include Dbgeng.h)

Vedere anche

GetEventCallbacks

IDebugClient

IDebugClient2

IDebugClient3

IDebugClient4

IDebugClient5

IDebugEventCallbacks