Hi ,all
My project has a Filter driver and a PnP driver. The Filter driver will call
some APIs exported by PnP driver.
I modified StartType = 0(SERVICE_BOOT_START) in Filter driver .inf , then the
Filter driver will be loaded when system startup.
But the Filter driver depends on PnP driver, so the Filter driver mustn’t be
loaded before PnP driver loaded when system startup.
I referred the MSDN
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552319(v=vs.85).aspx
and found that system loads the SERVICE_BOOT_START drivers first and PnP MGR
loads the PnP driver later.
I want to know if the scenario is workable that PnP driver be loaded before
Filter driver loaded when system startup? If it’s OK, what should I modified in
relevant .inf files.
Thanks,
Jeff
Unless you are required to be boot start, load order group is irrelevant. Even when relevant, load order group just defines when the image is loaded, not when pnp stacks are built and started.
d
From: xxxxx@exar.commailto:xxxxx
Sent: ?1/?10/?2013 12:14 PM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] How to specify Driver Load Order for PnP and Filter drivers?
Hi ,all
My project has a Filter driver and a PnP driver. The Filter driver will call
some APIs exported by PnP driver.
I modified StartType = 0(SERVICE_BOOT_START) in Filter driver .inf , then the
Filter driver will be loaded when system startup.
But the Filter driver depends on PnP driver, so the Filter driver mustn’t be
loaded before PnP driver loaded when system startup.
I referred the MSDN
http://msdn.microsoft.com/en-us/library/windows/hardware/ff552319(v=vs.85).aspx
and found that system loads the SERVICE_BOOT_START drivers first and PnP MGR
loads the PnP driver later.
I want to know if the scenario is workable that PnP driver be loaded before
Filter driver loaded when system startup? If it’s OK, what should I modified in
relevant .inf files.
Thanks,
Jeff
—
NTDEV is sponsored by OSR
OSR is HIRING!! See http://www.osr.com/careers
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:xxxxx>
If you are filtering the device that the PnP driver supports you can be
sure that the PnP driver is loaded first. If you control both drivers
and they are not in the same stack, have the PnP driver create a device
interfaces and use IoRegisterPlugPlayNotification to know when you can
call the PnP driver.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“xxxxx@exar.com” wrote in message
news:xxxxx@ntdev:
> Hi ,all
>
> My project has a Filter driver and a PnP driver. The Filter driver will call
> some APIs exported by PnP driver.
>
> I modified StartType = 0(SERVICE_BOOT_START) in Filter driver .inf , then the
> Filter driver will be loaded when system startup.
>
> But the Filter driver depends on PnP driver, so the Filter driver mustn’t be
> loaded before PnP driver loaded when system startup.
>
> I referred the MSDN
> http://msdn.microsoft.com/en-us/library/windows/hardware/ff552319(v=vs.85).aspx
> and found that system loads the SERVICE_BOOT_START drivers first and PnP MGR
> loads the PnP driver later.
>
> I want to know if the scenario is workable that PnP driver be loaded before
> Filter driver loaded when system startup? If it’s OK, what should I modified in
> relevant .inf files.
>
> Thanks,
> Jeff
xxxxx@exar.com wrote:
My project has a Filter driver and a PnP driver. The Filter driver will call
some APIs exported by PnP driver.
I modified StartType = 0(SERVICE_BOOT_START) in Filter driver .inf , then the
Filter driver will be loaded when system startup.
…
I want to know if the scenario is workable that PnP driver be loaded before
Filter driver loaded when system startup? If it’s OK, what should I modified in
relevant .inf files.
What kind of a filter is this? Class filter drivers sometimes use an
INF, but device filter drivers do not.
If this is a normal PnP filter driver that gets loaded via a
LowerFilters or UpperFilters key in some other driver, then you want
SERVICE_DEMAND_START. The filter will automatically be loaded when the
base PnP driver loads.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Hi Don & Doron & Tim ,
The both drivers are not in same stack, PnP driver only exports APIs for filter driver.
I did a another test as bellow:
/******************************************************************/
changed the start type of my PnP driver to SERVICE_BOOT_START, it occurs installation errors with devManagement. I found that in MSDN:
SERVICE_BOOT_START (0x00000000)
Indicates a driver started by the operating system (OS) loader. File system filter drivers commonly use this start type or SERVICE_DEMAND_START. On Microsoft Windows XP and later systems, filters must use this start type in order to take advantage of the new file system filter load order groups.
/******************************************************************/
Some questions:
-
Dose that means the SERVICE_BOOT_START is only for File system filter not for PnP driver?
-
I think the driver is loaded which start type is SERVICE_BOOT_START on system boot time before
it transfers control to the kernel. Is it right?
-
inf for PnP driver has no definition for ‘LoadOrderGroup’:
/****************PnP inf***********************
[Panther_ctrl_Service]
DisplayName = %Panther.SVCDESC%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 3 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\dre_dx_ctrl.sys
;AddReg = Panther_Parameters_AddReg
/********************************************
inf for filter driver has definition for ‘LoadOrderGroup’:
/****************filter inf***********************
[MiniFilter.Service]
DisplayName = %ServiceName%
Description = %ServiceDescription%
ServiceBinary = %12%%DriverName%.sys ;%windir%\system32\drivers\
Dependencies = “FltMgr”
ServiceType = 2 ;SERVICE_FILE_SYSTEM_DRIVER
StartType = 0 ;SERVICE_BOOT_START
;StartType = 3 ;SERVICE_DEMAND_START
ErrorControl = 1 ;SERVICE_ERROR_NORMAL
LoadOrderGroup = “FSFilter aaa”
AddReg = MiniFilter.AddRegistry
/********************************************
How can I modified the inf files above to make sure filter drivers is loaded after PnP driver loaded?
Thanks,
Jeff
Any one can help me?
Thanks,
Jeff
You don’t specify the order for PnP drivers, except the very rough have
one BOOT and one SYSTEM start. If you filter is for a device controlled
by the PnP, then add your driver to the UpperFilters entry for the
device.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
“xxxxx@exar.com” wrote in message
news:xxxxx@ntdev:
> Any one can help me?
> Thanks,
> Jeff
xxxxx@exar.com wrote:
Any one can help me?
In the future, you should be careful to note that you have a “file
system filter”, and not just a “filter driver”. When I see “PnP and
Filter drivers”, I assume you mean a PnP filter, but file system filters
have requirements that are very different from PnP filter drivers.
There is no way to coordinate the loading of drivers in different
stacks, when one or both of them are PnP drivers. You will need to use
some other mechanism to communicate between the two drivers. You might
consider using a callback (ExRegisterCallback) or a device interface
(IoRegisterDeviceInterface and IoGetDeviceInterfaces)
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.