IDebugEngine2::GetEngineID
Obtém o GUID do mecanismo de depuração (DE).
Sintaxe
Parâmetros
pguidEngine
[saiu] Retorna o GUID do DE.
Valor de retorno
Se tiver êxito, retornará S_OK
. Caso contrário, retornará um código de erro.
Comentários
Alguns exemplos de GUIDs típicos são guidScriptEng
, guidNativeEng
ou guidSQLEng
. Novos mecanismos de depuração criarão seu próprio GUID para identificação.
Exemplo
O exemplo a seguir mostra como implementar esse método para um objeto simples CEngine
que implementa a interface 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;
}
}