Prev: added FltRegisterFilter to the WDK kbdFilter example..get linker e
Next: Retired Categories in Windows Logo Submission
From: unclepauly on 12 May 2010 11:06 hi and thanks for replying ! well i am (trying to) write a mini keyboard filter driver. i have no experience doing this, i started it all yesterday. anyway like i say i have got the WDK mini keyboard filter driver example up and running, ive got it logging to debugview just fine. what i need to do is really simple, just disable/enable the keyboard. i am disabling it by consuming all the packets in the KbFilter_ServiceCallback, where i just do a test for some global flag...ie if(g_DISABLE) //drop all the packets else //just send the IRP up the stack so now the question is, how do i set the driver's global flag from a normal user/gui application ? so this is where i am at now, and the way i am going about it is by using the Fltxxxxx functions that i found on msdn : http://msdn.microsoft.com/en-us/library/ff539277(VS.85).aspx then when i added these functions to the kbfiltr sample, i got the linker error as i said my orignial post. but i have solved that now though ! in the makefile i had "LIBRARIES=...." and it should have been "TARGETLIBS=....". so its built now. so it looks like #pragma comment(lib, "lib.lib") doesn't work for drivers ? anyway... but now that ive got your attention :o) if you read the above and think my approach is wrong please let me know.. thank you. "Scott Noone" wrote: > Keyboard filter drivers and file system minifilters are entirely different > beasts. What are you trying to do? > > -scott > > -- > Scott Noone > Consulting Associate > OSR Open Systems Resources, Inc. > http://www.osronline.com >
From: Scott Noone on 12 May 2010 13:33 The Flt API are for file system minifilters, so unless you're writing a Filter Manager minifilter that filters file system activity then you need to stay away from them. The kbfiltr sample in the latest WDK shows how to communicate with the filter driver from a user mode application. -scott -- Scott Noone Consulting Associate OSR Open Systems Resources, Inc. http://www.osronline.com "unclepauly" <unclepauly(a)discussions.microsoft.com> wrote in message news:C2C34593-F70D-44CD-A6DF-A179A437612A(a)microsoft.com... > hi and thanks for replying ! well i am (trying to) write a mini keyboard > filter driver. i have no experience doing this, i started it all > yesterday. > anyway like i say i have got the WDK mini keyboard filter driver example > up > and running, ive got it logging to debugview just fine. what i need to do > is > really simple, just disable/enable the keyboard. i am disabling it by > consuming all the packets in the KbFilter_ServiceCallback, where i just do > a > test for some global flag...ie > > if(g_DISABLE) > //drop all the packets > else > //just send the IRP up the stack > > so now the question is, how do i set the driver's global flag from a > normal > user/gui application ? so this is where i am at now, and the way i am > going > about it is by using the Fltxxxxx functions that i found on msdn : > http://msdn.microsoft.com/en-us/library/ff539277(VS.85).aspx > > then when i added these functions to the kbfiltr sample, i got the linker > error as i said my orignial post. but i have solved that now though ! in > the > makefile i had "LIBRARIES=...." and it should have been "TARGETLIBS=....". > so > its built now. so it looks like #pragma comment(lib, "lib.lib") doesn't > work > for drivers ? anyway... > > but now that ive got your attention :o) if you read the above and think > my > approach is wrong please let me know.. > thank you. > > > > "Scott Noone" wrote: > >> Keyboard filter drivers and file system minifilters are entirely >> different >> beasts. What are you trying to do? >> >> -scott >> >> -- >> Scott Noone >> Consulting Associate >> OSR Open Systems Resources, Inc. >> http://www.osronline.com >>
From: Maxim S. Shatskih on 12 May 2010 13:41 > The Flt API are for file system minifilters, so unless you're writing a > Filter Manager minifilter that filters file system activity then you need to > stay away from them. Nevertheless, tcpip.sys in Vista+ uses fltmgr!FltGetFileNameInformationUnsafe -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: Doron Holan [MSFT] on 12 May 2010 17:18 use the KMDF versoin of this sample which enumerates a raw PDO. that raw PDO can talk to the app d -- This posting is provided "AS IS" with no warranties, and confers no rights. "unclepauly" <unclepauly(a)discussions.microsoft.com> wrote in message news:C2C34593-F70D-44CD-A6DF-A179A437612A(a)microsoft.com... > hi and thanks for replying ! well i am (trying to) write a mini keyboard > filter driver. i have no experience doing this, i started it all > yesterday. > anyway like i say i have got the WDK mini keyboard filter driver example > up > and running, ive got it logging to debugview just fine. what i need to do > is > really simple, just disable/enable the keyboard. i am disabling it by > consuming all the packets in the KbFilter_ServiceCallback, where i just do > a > test for some global flag...ie > > if(g_DISABLE) > //drop all the packets > else > //just send the IRP up the stack > > so now the question is, how do i set the driver's global flag from a > normal > user/gui application ? so this is where i am at now, and the way i am > going > about it is by using the Fltxxxxx functions that i found on msdn : > http://msdn.microsoft.com/en-us/library/ff539277(VS.85).aspx > > then when i added these functions to the kbfiltr sample, i got the linker > error as i said my orignial post. but i have solved that now though ! in > the > makefile i had "LIBRARIES=...." and it should have been "TARGETLIBS=....". > so > its built now. so it looks like #pragma comment(lib, "lib.lib") doesn't > work > for drivers ? anyway... > > but now that ive got your attention :o) if you read the above and think > my > approach is wrong please let me know.. > thank you. > > > > "Scott Noone" wrote: > >> Keyboard filter drivers and file system minifilters are entirely >> different >> beasts. What are you trying to do? >> >> -scott >> >> -- >> Scott Noone >> Consulting Associate >> OSR Open Systems Resources, Inc. >> http://www.osronline.com >>
From: unclepauly on 13 May 2010 12:04
thanks folks, i downloaded the latest wdk and got it working with the new kbfiltr sample.... |