IDebugEngine2::GetEngineID
Pobiera identyfikator GUID aparatu debugowania (DE).
Składnia
Parametry
pguidEngine
[out] Zwraca identyfikator GUID de.
Wartość zwracana
Jeśli operacja powiedzie się, zwraca wartość S_OK
; w przeciwnym razie zwraca kod błędu.
Uwagi
Niektóre przykłady typowych identyfikatorów GUID to guidScriptEng
, guidNativeEng
lub guidSQLEng
. Nowe aparaty debugowania będą tworzyć własne identyfikatory GUID do identyfikacji.
Przykład
W poniższym przykładzie pokazano, jak zaimplementować tę metodę dla prostego CEngine
obiektu, który implementuje interfejs IDebugEngine2 .
HRESULT CEngine::GetEngineId(GUID *pguidEngine) {
if (pguidEngine) {
// Set pguidEngine to guidBatEng, as defined in the Batdbg.idl file.
// Other languages would require their own guidDifferentEngine to be
//defined in the Batdbg.idl file.
*pguidEngine = guidBatEng;
return NOERROR; // This is typically S_OK.
} else {
return E_INVALIDARG;
}
}