IDebugComPlusSymbolProvider::IsHiddenCodeIDebugComPlusSymbolProvider::IsHiddenCode
지정 된 디버거 주소에서 코드를 숨길지 여부를 결정 합니다.Determines if the code at the specified debugger address is hidden.
구문Syntax
HRESULT IsHiddenCode(
IDebugAddress* pAddress
);
int IsHiddenCode(
IDebugAddress pAddress
);
매개 변수Parameters
pAddress
진행 Idebugaddress 인터페이스로 표시 되는 디버그 주소입니다.[in] The debug address that is represented by an IDebugAddress interface.
Return ValueReturn Value
코드가 숨겨진 경우는를 반환 하 S_OK
고 그렇지 않으면를 반환 S_FALSE
합니다.If the code is hidden, returns S_OK
; otherwise, returns S_FALSE
.
예제Example
다음 예제에서는 IDebugComPlusSymbolProvider 인터페이스를 노출 하는 Cdebug기호 공급자 개체에 대해이 메서드를 구현 하는 방법을 보여 줍니다.The following example shows how to implement this method for a CDebugSymbolProvider object that exposes the IDebugComPlusSymbolProvider interface.
HRESULT CDebugSymbolProvider::IsHiddenCode(
IDebugAddress* pAddress
)
{
HRESULT hr = S_OK;
CDEBUG_ADDRESS address;
CComPtr<CModule> pModule;
ASSERT(IsValidObjectPtr(this, CDebugSymbolProvider));
ASSERT(IsValidInterfacePtr(pAddress, IDebugAddress));
METHOD_ENTRY( CDebugSymbolProvider::IsHiddenCode );
IfFalseGo( pAddress, S_FALSE );
IfFailGo( pAddress->GetAddress( &address ) );
ASSERT(address.addr.dwKind == ADDRESS_KIND_METADATA_METHOD);
IfFalseGo( address.addr.dwKind == ADDRESS_KIND_METADATA_METHOD, S_FALSE );
IfFailGo( GetModule( address.GetModule(), &pModule) );
if (!pModule->IsHiddenCode( address.addr.addr.addrMethod.tokMethod,
address.addr.addr.addrMethod.dwVersion,
address.addr.addr.addrMethod.dwOffset ))
{
// S_FALSE indicates this sequence point is not hidden
hr = S_FALSE;
}
Error:
METHOD_EXIT( CDebugSymbolProvider::IsHiddenCode, hr );
if (!SUCCEEDED(hr))
{
hr = S_FALSE;
}
return hr;
}