IDebugHostModuleSignature::IsMatch 方法 (dbgmodel.h)
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 |