下面的代碼輸出reportAllDataRanges = 0C++操作員用枚舉評估爲假
BOOLEAN updateDataRanges = IsFirstUpdate || (m_uiDataRangeMode & IAdapterCommon::UpdatePinDataRanges);
BOOLEAN updateConstrainedDataRanges = m_uiDataRangeMode & IAdapterCommon::UpdatePinConstrainedDataRanges;
BOOLEAN reportAllDataRanges = m_uiDataRangeMode & IAdapterCommon::ReportAllDataRanges;
DPF_ENTER(("[CAdapterCommon::UpdatePinDescriptor(%p, %lu)] - m_uiDataRangeMode = %lu, updateDataRanges = %lu, updateConstrainedDataRanges = %lu, reportAllDataRanges = %lu, a & b = %lu, b = %lu", PinDescriptor, IsFirstUpdate, m_uiDataRangeMode, updateDataRanges, updateConstrainedDataRanges, reportAllDataRanges, m_uiDataRangeMode & IAdapterCommon::ReportAllDataRanges, IAdapterCommon::ReportAllDataRanges));
[CAdapterCommon::UpdatePinDescriptor(FFFFF8064CCE42F0, 1)] - m_uiDataRangeMode = 3070, updateDataRanges = 1, updateConstrainedDataRanges = 64, reportAllDataRanges = 0, a & b = 512, b = 512
typedef enum : UINT32
{
None = 0,
UseDataRanges = 1 << 0,
UseDiscreteDataRanges = 1 << 1,
RaiseUpdateEvent = 1 << 2,
RaiseUpdatePinDescriptor = 1 << 3,
DoNotUpdateOriginalDescriptor = 1 << 4,
UpdatePinDataRanges = 1 << 5,
UpdatePinConstrainedDataRanges = 1 << 6,
UseDataRangeIntersection = 1 << 7,
UseProposedDataFormat = 1 << 8,
ReportAllDataRanges = 1 << 9,
DataRangeIntersectionAcceptAllRanges = 1 << 10,
SupportedDataRangesFirst = 1 << 11,
} DataRangeModeEnum;
不應該
BOOLEAN value = 3070 & 512;
評價爲TRUE? (大於零)?
請提供[MCVE]。作爲@ M.M。指出,我們不知道「BOOLEAN」是什麼。 – clcto
BOOLEAN是UCHAR。我相信這解釋了一切!感謝你們!!! (我在做Windows Kernel驅動程序開發):) –