阅读:981回复:0
请帮我解释一下,下面是什么意思
我还没入门,请帮我解释一下,下面是什么意思?
为什么USBFilter与KeyBoadFilter里的new 不一样,不是new 的类对象?New里面在到底该怎么用?new 后面为什么不用分号? // NOTE: The following parameters to placement new // may have to be changed for a particular USB filter driver. // For an upper filter, it is important to match the DeviceType, // Characteristics, and DeviceFlags of the function // driver DEVICE_OBJECT. UsbFilterDevice * pFilterDevice = new ( static_cast<PCWSTR>(NULL), FILE_DEVICE_UNKNOWN, static_cast<PCWSTR>(NULL), 0, DO_DIRECT_IO ) // Create the device object. Note that we used a form of \"placement\" new, // that is a member operator of KDevice. This form will use storage // allocated by the system in the device object\'s device to store our // class instance. KbfilterDevice * pDevice = new ( static_cast<PCWSTR>(KUnitizedName(L\"KbfilterDevice\", m_Unit)), FILE_DEVICE_UNKNOWN, NULL, 0, 0 //Don\'t specify the flags now. They will be set //when the filter is attached. ) KbfilterDevice(Pdo, m_Unit); |
|
|