好久没来了。。刚把自己手头的事搞完看了下自己记录的你的问题!
pSerObj->BindFlags = THREAD_IN_PDD; // PDD create thread when device is first attached.
//——这个pSerObj->dwIntID 在线程中用到,奇怪的是怎么会是注册表DeviceArrayIndex的值呢?
pSerObj->dwIntID = DeviceArrayIndex; // Only it is useful when set set THREAD_AT_MDD. We use this to transfer DeviceArrayIndex
其实你搜一下就发现
SerInit(
ULONG Identifier, // @parm Device identifier.
PVOID pMddHead, // @parm First argument to mdd callbacks.
PHWOBJ pHWObj // @parm Pointer to our own HW OBJ for this device