Partager via


IDebugEngine2::GetEngineID

Gets the GUID of the debug engine (DE).

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

Parameters

  • pguidEngine
    [out] Returns the GUID of the DE.

Return Value

If successful, returns S_OK; otherwise, returns an error code.

Remarks

Some examples of typical GUIDs are guidScriptEng, guidNativeEng, or guidSQLEng. New debug engines will create their own GUID for identification.

Example

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

See Also

Reference

IDebugEngine2