IsMatch 方法将特定模块(由 IDebugHostModule 符号提供)与签名进行比较,将模块名称和版本与签名中指示的名称和版本范围进行比较。 指示给定模块符号是否与签名匹配。
语法
HRESULT IsMatch(
IDebugHostModule *pModule,
bool *isMatch
);
参数
pModule
要与模块签名进行比较的模块符号。
isMatch
此处返回给定模块符号是否与模块签名匹配的指示。
返回值
此方法返回 HRESULT,指示成功或失败。
言论
示例代码
ComPtr<IDebugHostSymbols> spSym; /* get the host's symbols interface */
ComPtr<IDebugHostModule> spModule; /* find a module */
ComPtr<IDebugHostModuleSignature> spModuleSignature;
if (SUCCEEDED(spSym->CreateModuleSignature(
L"Windows.UI.Xaml.dll",
L"6.3",
nullptr,
&spModuleSignature)))
{
bool isMatch;
if (SUCCEEDED(spModuleSignature->IsMatch(spModule.Get(), &isMatch)))
{
// isMatch indicates whether the module is a match for the signature.
// In this case, that means the module is named Windows.UI.Xaml.dll
// and the version is at least 6.3(.0.0).
}
}
要求
要求 | 价值 |
---|---|
标头 | dbgmodel.h |