33

The NT 4 DDK wrongly states that RemoveHeadList and RemoveTailList return NULL if the list is empty.

34

See Chapter 19 for the best way to talk to a parallel port in NT and W2000.

35

You might want to add another IOCTL that tells you which resources a device is using, so applications know which WdmIo device to use.

36

Or for that matter, an application must not fire off several overlapped requests at the same time.

37

If there is more than one WdmIo device, each device has a device queue that can be processed simultaneously by WdmIoStartIo.

38

Note that the IoStartNextPacket implementation will, in fact, call WdmIoStartIo recursively (if there is another IRP in the queue). In the worst case, this recursive technique could overflow the kernel stack. One of the DDK examples shows a way of avoiding this problem by not queuing an IRP if the queue is 'full'. 

39

At the last moment, I have moved this code back into WdmIoStartIo. RunCmds may not run at DIRQL and it is incorrect to allocate nonpaged memory above DISPATCH_LEVEL. 

40

In fact, the I/O Manager could work out if an IRP is in the device queue.

41

You may also decide to queue IRPs while a device is asleep. The example drivers in this book opt to wake up the device when an I/O request arrives.

42

Note that the interrupt level is not the same as the IRQ number. IRQ7 has interrupt level 20.

43

Actually, the commands could take a long time to run if the Win32 application includes large delay commands. However, moving the command processing to the DPC would not help, as a Critical section routine would have to be run, bringing the IRQL back up the DIRQL.

44

The LockDevice and UnlockDevice routines are still used and so have been moved from Pnp.cpp into Init.cpp. 

45

I do not know where they go in Windows 98.

46

You can also access the HID class driver in a user-mode client application.

47

The only alternative is to remove the parport, parallel, and parvdm drivers, which would stop any existing parallel port access. 

48

See Chapter 23 for details of IoGetDeviceObjectPointer

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×