IDebugEngine2::GetEngineID
如需 Visual Studio 2017 的最新文件請參閱 Visual Studio 2017 文件。
取得偵錯引擎 (DE) 的 GUID。
語法
HRESULT GetEngineID(
GUID* pguidEngine
);
int GetEngineID(
out Guid pguidEngine
);
參數
pguidEngine
[out]傳回 DE GUID。
傳回值
如果成功,傳回S_OK
; 否則傳回錯誤碼。
備註
一些典型的 Guid 的範例包括guidScriptEng
, guidNativeEng
,或guidSQLEng
。 新的偵錯引擎會建立自己的 GUID 識別。
範例
下列範例示範如何實作這種簡單的方式CEngine
實作物件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;
}
}