IDebugEngine2::GetEngineIDIDebugEngine2::GetEngineID

Obtient le GUID du moteur de débogage (DE).Gets the GUID of the debug engine (DE).

SyntaxeSyntax

HRESULT GetEngineID(   
   GUID* pguidEngine  
);  
int GetEngineID(   
   out Guid pguidEngine  
);  

ParamètresParameters

pguidEngine
[out] Retourne le GUID de la DE.[out] Returns the GUID of the DE.

Valeur de retourReturn Value

En cas de réussite, retourne S_OK; sinon, retourne un code d’erreur.If successful, returns S_OK; otherwise, returns an error code.

NotesRemarks

Voici quelques exemples de type GUID guidScriptEng, guidNativeEng, ou guidSQLEng.Some examples of typical GUIDs are guidScriptEng, guidNativeEng, or guidSQLEng. Des moteurs de débogage créera leur propre GUID d’identification.New debug engines will create their own GUID for identification.

ExempleExample

L’exemple suivant montre comment implémenter cette méthode pour une simple CEngine objet qui implémente le IDebugEngine2 interface.The following example shows how to implement this method for a simple CEngine object that implements the IDebugEngine2 interface.

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;    
   }    
}    

Voir aussiSee Also

IDebugEngine2IDebugEngine2