From: Jon on 22 Sep 2006 22:34 Hello all, I am interested in converting the "kbfiltr" example in the Windows DDK from an upper keyboard filter driver i.e attaching to the i8042 port driver to another upperfilter driver (?) attaching above the keyboard class driver ( kbdclass.sys ). I was wondering if there would be a lot of work involved? It seems pretty easy. As of now, the kbfiltr filter driver attaches to the device stack by doing something like: IoAttachDeviceToDeviceStack(device, PDO); but I was thinking that I could easily attach it to the keyboard class driver by doing something like: CCHAR ntNameBuffer[64] = "\\Device\\KeyboardClass0"; STRING ntNameString; UNICODE_STRING uKeyboardDeviceName; RtlInitAnsiString( &ntNameString, ntNameBuffer ); RtlAnsiStringToUnicodeString( &uKeyboardDeviceName, &ntNameString, TRUE ); IoAttachDevice(pKeyboardDeviceObject,&uKeyboardDeviceName,&devExt->pKeyboardDevice); But once I attach to the device stack, I could easily continue intercepting keystrokes from the keyboard in the ServiceCallback routine correct? Thanks ahead of time for any comments :)
From: anton bassov on 23 Sep 2006 00:03 Jon, > But once I attach to the device stack, I could easily continue > intercepting keystrokes from the keyboard in the ServiceCallback > routine correct? > Callback is used for communications between i8042prt and kbdclass. Once kbdfilter is in between these two on the stack, it may make use of it. However, callback has nothing to do with communications between kbdclass and the system. Therefore, once a filter above kbdclass is meant to monitor communications between kbdclass and the system, it cannot make any use of a callback Anton Bassov Jon wrote: > Hello all, I am interested in converting the "kbfiltr" example in the > Windows DDK from an upper keyboard filter driver i.e attaching to the > i8042 port driver to another upperfilter driver (?) attaching above > the keyboard class driver ( kbdclass.sys ). > > I was wondering if there would be a lot of work involved? It seems > pretty easy. As of now, the kbfiltr filter driver attaches to the > device stack by doing something like: > > IoAttachDeviceToDeviceStack(device, PDO); > > but I was thinking that I could easily attach it to the keyboard class > driver by doing something like: > > CCHAR ntNameBuffer[64] = "\\Device\\KeyboardClass0"; > STRING ntNameString; > UNICODE_STRING uKeyboardDeviceName; > RtlInitAnsiString( &ntNameString, ntNameBuffer ); > RtlAnsiStringToUnicodeString( &uKeyboardDeviceName, &ntNameString, TRUE > ); > IoAttachDevice(pKeyboardDeviceObject,&uKeyboardDeviceName,&devExt->pKeyboardDevice); > > But once I attach to the device stack, I could easily continue > intercepting keystrokes from the keyboard in the ServiceCallback > routine correct? > > Thanks ahead of time for any comments > > :)
From: Jon on 23 Sep 2006 04:58 Thanks Anton. I will look for other means than to intercept key strokes.
From: Jon on 23 Sep 2006 04:58 Thanks Anton. I will look for other means than to intercept key strokes.
From: Maxim S. Shatskih on 23 Sep 2006 07:21 > but I was thinking that I could easily attach it to the keyboard class > driver by doing something like: > > CCHAR ntNameBuffer[64] = "\\Device\\KeyboardClass0"; > STRING ntNameString; > UNICODE_STRING uKeyboardDeviceName; > RtlInitAnsiString( &ntNameString, ntNameBuffer ); > RtlAnsiStringToUnicodeString( &uKeyboardDeviceName, &ntNameString, >TRUE > ); > IoAttachDevice(pKeyboardDeviceObject,&uKeyboardDeviceName,&devExt- >pKeyboardDevice); No you cannot. Use PnP instead and UpperFilters registration, forget IoAttachDevice for PnP stacks. -- Maxim Shatskih, Windows DDK MVP StorageCraft Corporation maxim(a)storagecraft.com http://www.storagecraft.com
|
Next
|
Last
Pages: 1 2 3 Prev: Windows 2003 Performance vs. Windows 2000 Next: SHELL32!_SHCreateProcess |