xhzxlqt
驱动牛犊
驱动牛犊
  • 注册日期2005-04-26
  • 最后登录2006-03-08
  • 粉丝0
  • 关注0
  • 积分10分
  • 威望2点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:981回复:0

请帮我解释一下,下面是什么意思

楼主#
更多 发布于:2005-06-10 10:17
我还没入门,请帮我解释一下,下面是什么意思?
为什么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);
我本无心
游客

返回顶部