|
i want to have specific driver which is loaded dynamic.
i mean that i hope to driver is loaded after finish OS booting.
actually i made usb filter driver (that is removeing usb storage driver) and this filter driver is working when IOmanger make IRP_MN_START_DEVICE.
but my usb filter driver is filt all usb IRP realted usb(mouse, keybord usb), i just want to check storage filter driver.
so i think that it is one way to control only storage driver.
some specific time , i will load this usb filter driver and then i can check only storage driver.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hi buffering83,
You can install a an on-demand loading driver by defining the start type as SERVICE_DEMAND_START.
What Determines When a Driver Is Loaded[^]
This corresponds to the following i8042prt.sys registry key as an example:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\i8042prt\Start
You can browse your registry and see how other device drivers are loaded by looking at the Start key. Based on your previous questions here on codeproject however you seem to be developing a filter driver. Filter drivers typically belong to a load order group:
Load Order Groups for File System Filter Drivers[^]
The load order groups correspond with the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ServiceGroupOrder\List
Best Wishes,
-David Delaune
|
|
|
|
|
i made usb filter driver and install it in the
"class regedit: 36FC9E60-C465-11CF-8056-444553540000"
so i checked that my filter driver is upperfilter.
i want to control storage usb not mouse or keybord usb.
and so i think that i can do control this when ioManager make irp_mn_start_device.
but my filter driver received all irps related about usb(keybord, mouse)
and i wnat to check only storage usb.
so can i know what kind of usb? by using flag or something?
//////////////////////////////////////////////////////////////////////
i mean that i want to check what is MOUSE USB or KEYBORD USB when irp_mn_start_device.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
modified on Tuesday, August 4, 2009 2:45 PM
|
|
|
|
|
Hi buffering83,
You have compiled a sample USB class filter driver. So quite naturally you are going to recieve IRP from all types of USB devices connected to the device class. Here is a diagram of USB mass storage device stack:
Device Object Example for a USB Mass Storage Device[^]
What are your driver requirements? What are you trying to accomplish?
|
|
|
|
|
i want to make USB control a program that
decide to approve USB storage.
when you insert USB Driver to pc, There is pop-up message which is asking you code.
if code is correct , your usb can be used.
but code is not correct , your usb can be terminated by device driver.
i make my usb filter driver, but i don't know how am i check .
i want to control only storage usb driver.
if you let me know your e-mail, i can send you my usb filter driver.
thank you for answering my question.
have a good day.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
blow word is some mouse filter driver's inf file.
how can i know that this MOUFLT file is filter driver?
i can't find any mean that MOUFLT Driver is filter driver...
/////////////////////////////////////////////////////////////////////////////////////////////////////////
[Version]
Signature="$CHICAGO$"
Class=Mouse
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
[Manufacturer]
%Mfg%=MfgDeviceSection
[MfgDeviceSection]
%DeviceDesc%=HajeSample, ACPI\PNP0F13
[HajeSample]
Include=msmouse.inf
Needs=HID_Mouse_Inst
CopyFiles=@MOUFLT.sys
[HajeSample.HW]
AddReg = HajeSample.HW.AddReg
[HajeSample.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"MOUFLT"
[HajeSample.Services]
AddService = MOUFLT,,Haje_Service_Inst
[Haje_Service_Inst]
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_MANUAL_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\MOUFLT.sys
[SourceDisksFiles]
MOUFLT.sys=1
[DestinationDirs]
DefaultDestDir=12
[Strings]
ClassName = "Hajesoft"
DeviceDesc = "Hajesoft MOUFLT Driver"
DiskId = Sample Install Disk 1"
Mfg = "Hajesoft, Inc."
SPSVCINST_ASSOCSERVICE = 0x00000002
SERVICE_KERNEL_DRIVER = 1
SERVICE_MANUAL_START = 3
SERVICE_ERROR_NORMAL = 1
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hi buffering83,
buffering83 wrote: blow word is some mouse filter driver's inf file.
Normally I do not correct the english of non-native speakers but your misuse of blow might get you in trouble as this word has several slang definitions[^]. I believe the correct english word you are looking for is below[^].
Now lets address your question:
When you install a device the operating system identifies what type of device you are installing by using the Class GUID. Microsoft Windows defines many device setup classes:
System-Supplied Device Setup Classes[^]
If you open regedit you can navigate to the key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318}
Under that key you will find the value UpperFilters.
The simple answer to your question is that the following lines in your INF:
[HajeSample.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"MOUFLT"
These INF lines when installed will instruct the operating system to load the device driver as an Upper Level Filter Driver[^] for the mouse device class.
Best Wishes,
-David Delaune
|
|
|
|
|
Fist of all thank you that answer.
and i have other question.
//as you can see INF file.
but book writer said
"MOUFLT driver is located between mouclass and i8042prt"
but i don't know how can i know that MOUFLT can be located between mouclass and i8042prt.
That INF file just show
Class=Mouse
ClassGUID={4D36E96F-E325-11CE-BFC1-08002BE10318}
[HajeSample.HW.AddReg]
HKR,,"UpperFilters",0x00010000,"MOUFLT"
but there is notthing about mouclass or i8042prt.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
buffering83 wrote: but i don't know how can i know that MOUFLT can be located between mouclass and i8042prt.
Hi buffering83,
On your motherboard you have an 8042 microcontroller[^] and i8042prt.sys can read/write to this microcontoller using ports 0x60 and 0x64 available through the BIOS. This is essentially the PS/2 controller[^] to which a keyboard/mouse may be connected.
When you boot your computer your BIOS discovers the PS2 contoller and assigns IRQ1 and reserves ports 0x60 and 0x64 for the controller. When you boot your Windows operating system the Microsoft Plug and Play Manager[^] discovers through ACPI calls[^] that your computer has a PS2 contoller and will assign ACPI/PNP0303 and/or ACPI/PNP0F03 port drivers which is by default in your registry as i8042prt.sys You can search for the string PNP0303 or PNP0F13 and find the i8042 ACPI PNP driver entries.Note: This is an incomplete, very brief description of BIOS PnP/ACPI interaction.
buffering83 wrote: but there is notthing about mouclass or i8042prt.
The INF files may not contain any reference to mouclass or i8042prt. Your mouse filter driver is only concerned with GUID of the device class. Perhaps a visual representation will help you understand:
Have a look at the following diagram:
Types of WDM Drivers[^]
A more accurate description of your device stack is something like:
[Your Upper Filter]<--------------------+
|
|
[i8042 Function Driver] <-----> [Mouse Class Driver]
|
|
[Lower Filter]
|
|
[ACPI Root Bus Driver]
|
|
[Hardware Abstraction Layer]
|
|
[8042 microcontroller]
Your filter driver is designed to filter an entire device class. In other words... Your upper filter will filter anything that describes itself as a mouse.
Mouclass Driver Reference[^]
I8042prt Driver Reference[^]
Best Wishes,
-David Delaune
|
|
|
|
|
thank you sir~
have a nice day!
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
i want to make usb filter driver.
but i can't find how am i make...
some book just modify regedit file, and other book explan by using inf file.
(of course that book just show simple not detail.)
what i want to is
when insert USB to usb port , some application(which make me) know about this insertion and pop up some message box.
so i think that first i have to do is make simple usb filter driver and insert usb filter driver to device stack.
but i don't know how can do it.
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
|
i want to make this detection by ugins Device Driver^^~
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
buffering83 wrote: i want to make this detection by ugins Device Driver^^~
From ring0/kernelmode you can use the IoRegisterPlugPlayNotification[^] to register a callback. You need to register for a PnP Notification[^].
Best Wishes,
-David Delaune
|
|
|
|
|
i just readed something that was explaning " you can use kbfilter source which is in DDK"
but i can't find kbilfer.c source.
where can i find this source?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
\WinDDK\6001.18002\src\input\kbfiltr
Replace the 6001.18002 with whatever version of the DDK you are using.
Best Wishes,
-David Delaune
|
|
|
|
|
have a good day^^
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
i readed note in code.
" Set the completion callback, so we can "frob" the keyboard data."
what's mean forb??
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
http://catb.org/jargon/html/F/frobnicate.html[^]
Top hit in google for frob was a wikipedia article that linked to the jargon file.
The European Way of War: Blow your own continent up.
The American Way of War: Go over and help them.
|
|
|
|
|
have Good day~
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Hello,
I am new here and I have a question. I am using c# express edition, and I want make an application that can use my internal gps module from my nokia n82 by USB connection or by bluetooth connection(My pc has a bluetooth ability and my phone also) . Is this even possible? And if this is possible can anyone give me a short step by step plan. I am really curious if it is possible to interface with my Nokia N82 gps module and get gps coordinates and very eager to use this in my application.
Thanks for any reply
Frank
|
|
|
|
|
Hi,
I'm trying to set up raw pdo and i'm basing myself on the kbfilter example.
I used the code on the sample to put it on my device driver based on the hidfx2usb sample.
However, when I tried to open the raw pdo thru its guid I have an access denied.
How can i debug such error? How can I know why is it having an access denied?
Any tips?
Thanks,
Nuno
|
|
|
|
|
|
Hi,
I'm trying to setup a Raw PDO. I'm trying to do this because i'm writing a driver which is based on the hidfx2usb sample and it maps the usb device into a hid device.
the thing is that i can't access directly the device from the user space because the hid class blocks the requests.
i've been told to create a raw pdo device to have direct access to the device.
i had a look to kbfiltr and there is created a pdo, but the example registers a pdo for a keyboard and my device is a usb device.
my question is about how to associate the pdo to the usb device.
in the example the base string for the pdo registering is this:
#define KBFILTR_DEVICE_ID L"{A65C87F9-BE02-4ed9-92EC-012D416169FA}\\KeyboardFilter\0"
How should I register a pdo for a usb device?
Thanks,
Nuno
|
|
|
|
|