获取调试引擎的 GUID (DE)。
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;
}
}