Share via


IDebugEngine2::GetEngineID

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Gets the GUID of the debug engine (DE).

Syntax

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

IDebugEngine2