From: David Craig on
If you use a bus driver to handle the real hardware and use KMDF then most
of your PnP and Power issues are resolved. You don't need to handle them in
StorPort as the port driver will just load and unload you when it wants.

"Don Burn" <burn(a)stopspam.windrvr.com> wrote in message
news:ewVJcUwYKHA.1336(a)TK2MSFTNGP06.phx.gbl...
> It is not impossible, but does require careful work to handle all the PNP
> calls.
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Peter" <peter_hsu(a)vasstek.com.tw> wrote in message
> news:%23l2z9lrYKHA.1592(a)TK2MSFTNGP06.phx.gbl...
>> Hi,
>>
>> As your comments, I trace all communications between disk.sys and Port
>> driver, the PDO I created in my disk lower filter driver is not passed to
>> function
>> "AddDevice" of disk.sys .
>> Trying to emulate Port driver work in my disk lower filter driver is
>> not
>> easy
>> or impossible ?. How I can accomplish the work?
>> What is the Virtual Storport miniport driver?
>>
>> Best Regards,
>> Peter,
>>
>> eagersh" <eagersh20(a)gmail.com> ???
>> news:03a4d15d-3376-40fd-ac99-c57d9b3da1f1(a)m33g2000pri.googlegroups.com
>> ???...
>> On Nov 3, 3:23 am, "Peter" <peter_...(a)vasstek.com.tw> wrote:
>>> Hi,
>>>
>>> I refer the following sources in the DDK to develop a disk low filter
>>> driver:
>>> \src\general\toaster\bus
>>> \src\storage\class\disk
>>>
>>> I would like to create a PDO in my disk low filter driver, and hope the
>>> disk
>>> driver can see the PDO, but the result is the PDO does not appear in
>>> disk
>>> driver.
>>>
>>> The following are the main procedure in my disk low filter driver:
>>>
>>> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
>>> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations,
>>> IRP_MJ_PNP.IRP_MN_START_DEVICE
>>>
>>> Any comment for my problem, thanks.
>>>
>>> Best Regards,
>>> Peter,
>> Why do you know that AddDevice of disk.sys is not called?
>> You are trying emulate Port driver work, aren't you. It is not easy.
>> If your target is Vista SP1 and up you should better use a Virtual
>> Storport miniport driver.
>> If you may also trace all communications between disk.sys to Port
>> Driver to check if you doing everything correctly. You could do it
>> because you have a lower filter class driver.
>> Another option is to write your own disk class driver. In this case
>> you need a bus driver also.
>>
>> Igor Sharovar
>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
>> signature database 4595 (20091111) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4597 (20091111) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>


From: Peter on
Hi,
It seems that the PNP knows what driver creates the PDO.
The PNP seems initiate a PDO in the different way by different drivers :
In my disk low filter driver, it receives only:
IRP_MJ_PNP[IRP_MN_START_DEVICE]
In the bus enum driver which is compiled from DDK sources
"\src\general\toaster\bus", it receives:
IRP_MJ_PNP[IRP_MN_QUERY_ID]
IRP_MJ_PNP[IRP_MN_QUERY_CAPABILITIES]
IRP_MJ_PNP[IRP_MN_QUERY_DEVICE_TEXT]
IRP_MJ_PNP[IRP_MN_QUERY_RESOURCE_REQUIREMENTS]
IRP_MJ_PNP[IRP_MN_QUERY_BUS_INFORMATION]
...

What the PNP will do after it knows a new PDO is created?
Any other info. about device stack and driver stack?

Best Regards,
Peter,

"Peter" <peter_hsu(a)vasstek.com.tw> �b�l��
news:eTqy%23%23GXKHA.844(a)TK2MSFTNGP05.phx.gbl �����g...
> Hi,
>
> I refer the following sources in the DDK to develop a disk low filter
> driver:
> \src\general\toaster\bus
> \src\storage\class\disk
>
> I would like to create a PDO in my disk low filter driver, and hope
the
> disk
> driver can see the PDO, but the result is the PDO does not appear in disk
> driver.
>
> The following are the main procedure in my disk low filter driver:
>
> call IoCreateDevice(), IoInvalidateDeviceRelations(), then
> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations,
> IRP_MJ_PNP.IRP_MN_START_DEVICE
>
> Any comment for my problem, thanks.
>
> Best Regards,
> Peter,
>
>


From: Don Burn on
Look at http://msdn.microsoft.com/en-us/library/ms806534.aspx


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Peter" <peter_hsu(a)vasstek.com.tw> wrote in message
news:%23bMh7pEZKHA.5720(a)TK2MSFTNGP05.phx.gbl...
> Hi,
> It seems that the PNP knows what driver creates the PDO.
> The PNP seems initiate a PDO in the different way by different drivers :
> In my disk low filter driver, it receives only:
> IRP_MJ_PNP[IRP_MN_START_DEVICE]
> In the bus enum driver which is compiled from DDK sources
> "\src\general\toaster\bus", it receives:
> IRP_MJ_PNP[IRP_MN_QUERY_ID]
> IRP_MJ_PNP[IRP_MN_QUERY_CAPABILITIES]
> IRP_MJ_PNP[IRP_MN_QUERY_DEVICE_TEXT]
> IRP_MJ_PNP[IRP_MN_QUERY_RESOURCE_REQUIREMENTS]
> IRP_MJ_PNP[IRP_MN_QUERY_BUS_INFORMATION]
> ...
>
> What the PNP will do after it knows a new PDO is created?
> Any other info. about device stack and driver stack?
>
> Best Regards,
> Peter,
>
> "Peter" <peter_hsu(a)vasstek.com.tw> �b�l��
> news:eTqy%23%23GXKHA.844(a)TK2MSFTNGP05.phx.gbl �����g...
>> Hi,
>>
>> I refer the following sources in the DDK to develop a disk low filter
>> driver:
>> \src\general\toaster\bus
>> \src\storage\class\disk
>>
>> I would like to create a PDO in my disk low filter driver, and hope
> the
>> disk
>> driver can see the PDO, but the result is the PDO does not appear in disk
>> driver.
>>
>> The following are the main procedure in my disk low filter driver:
>>
>> call IoCreateDevice(), IoInvalidateDeviceRelations(),
>> then
>> receive IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations,
>> IRP_MJ_PNP.IRP_MN_START_DEVICE
>>
>> Any comment for my problem, thanks.
>>
>> Best Regards,
>> Peter,
>>
>>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4603 (20091113) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4603 (20091113) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




From: Peter on
Hi,
I create a PDO in my disk low filter driver, what is the meaning of
this PDO in
device stack? Is any driver will see it and create a FDO for it? And any
device will
be shown in system Device Manager?

Best Regards,
Peter,

"Don Burn" <burn(a)stopspam.windrvr.com> �b�l��
news:%23Xv1AcGZKHA.1816(a)TK2MSFTNGP04.phx.gbl �����g...
> Look at http://msdn.microsoft.com/en-us/library/ms806534.aspx
>
>
> --
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
> Remove StopSpam to reply
>
>
>
> "Peter" <peter_hsu(a)vasstek.com.tw> wrote in message
> news:%23bMh7pEZKHA.5720(a)TK2MSFTNGP05.phx.gbl...
> > Hi,
> > It seems that the PNP knows what driver creates the PDO.
> > The PNP seems initiate a PDO in the different way by different drivers :
> > In my disk low filter driver, it receives only:
> > IRP_MJ_PNP[IRP_MN_START_DEVICE]
> > In the bus enum driver which is compiled from DDK sources
> > "\src\general\toaster\bus", it receives:
> > IRP_MJ_PNP[IRP_MN_QUERY_ID]
> > IRP_MJ_PNP[IRP_MN_QUERY_CAPABILITIES]
> > IRP_MJ_PNP[IRP_MN_QUERY_DEVICE_TEXT]
> > IRP_MJ_PNP[IRP_MN_QUERY_RESOURCE_REQUIREMENTS]
> > IRP_MJ_PNP[IRP_MN_QUERY_BUS_INFORMATION]
> > ...
> >
> > What the PNP will do after it knows a new PDO is created?
> > Any other info. about device stack and driver stack?
> >
> > Best Regards,
> > Peter,
> >
> > "Peter" <peter_hsu(a)vasstek.com.tw> �b�l��
> > news:eTqy%23%23GXKHA.844(a)TK2MSFTNGP05.phx.gbl �����g...
> >> Hi,
> >>
> >> I refer the following sources in the DDK to develop a disk low
filter
> >> driver:
> >> \src\general\toaster\bus
> >> \src\storage\class\disk
> >>
> >> I would like to create a PDO in my disk low filter driver, and hope
> > the
> >> disk
> >> driver can see the PDO, but the result is the PDO does not appear in
disk
> >> driver.
> >>
> >> The following are the main procedure in my disk low filter driver:
> >>
> >> call IoCreateDevice(), IoInvalidateDeviceRelations(),
> >> then
> >> receive
IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations,
> >> IRP_MJ_PNP.IRP_MN_START_DEVICE
> >>
> >> Any comment for my problem, thanks.
> >>
> >> Best Regards,
> >> Peter,
> >>
> >>
> >
> >
> >
> > __________ Information from ESET NOD32 Antivirus, version of virus
> > signature database 4603 (20091113) __________
> >
> > The message was checked by ESET NOD32 Antivirus.
> >
> > http://www.eset.com
> >
> >
> >
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
signature database 4603 (20091113) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>
>


From: Don Burn on
Drivers will only see the PDO if you issue an IoInvalidateDeviceRelations
and then handle the IRP_MJ_PNP calls to notify the system of the device. Go
read the toaster sample in detail.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"Peter" <peter_hsu(a)vasstek.com.tw> wrote in message
news:uGPVMHqZKHA.5652(a)TK2MSFTNGP06.phx.gbl...
> Hi,
> I create a PDO in my disk low filter driver, what is the meaning of
> this PDO in
> device stack? Is any driver will see it and create a FDO for it? And any
> device will
> be shown in system Device Manager?
>
> Best Regards,
> Peter,
>
> "Don Burn" <burn(a)stopspam.windrvr.com> �b�l��
> news:%23Xv1AcGZKHA.1816(a)TK2MSFTNGP04.phx.gbl �����g...
>> Look at http://msdn.microsoft.com/en-us/library/ms806534.aspx
>>
>>
>> --
>> Don Burn (MVP, Windows DKD)
>> Windows Filesystem and Driver Consulting
>> Website: http://www.windrvr.com
>> Blog: http://msmvps.com/blogs/WinDrvr
>> Remove StopSpam to reply
>>
>>
>>
>> "Peter" <peter_hsu(a)vasstek.com.tw> wrote in message
>> news:%23bMh7pEZKHA.5720(a)TK2MSFTNGP05.phx.gbl...
>> > Hi,
>> > It seems that the PNP knows what driver creates the PDO.
>> > The PNP seems initiate a PDO in the different way by different drivers
>> > :
>> > In my disk low filter driver, it receives only:
>> > IRP_MJ_PNP[IRP_MN_START_DEVICE]
>> > In the bus enum driver which is compiled from DDK sources
>> > "\src\general\toaster\bus", it receives:
>> > IRP_MJ_PNP[IRP_MN_QUERY_ID]
>> > IRP_MJ_PNP[IRP_MN_QUERY_CAPABILITIES]
>> > IRP_MJ_PNP[IRP_MN_QUERY_DEVICE_TEXT]
>> > IRP_MJ_PNP[IRP_MN_QUERY_RESOURCE_REQUIREMENTS]
>> > IRP_MJ_PNP[IRP_MN_QUERY_BUS_INFORMATION]
>> > ...
>> >
>> > What the PNP will do after it knows a new PDO is created?
>> > Any other info. about device stack and driver stack?
>> >
>> > Best Regards,
>> > Peter,
>> >
>> > "Peter" <peter_hsu(a)vasstek.com.tw> �b�l��
>> > news:eTqy%23%23GXKHA.844(a)TK2MSFTNGP05.phx.gbl �����g...
>> >> Hi,
>> >>
>> >> I refer the following sources in the DDK to develop a disk low
> filter
>> >> driver:
>> >> \src\general\toaster\bus
>> >> \src\storage\class\disk
>> >>
>> >> I would like to create a PDO in my disk low filter driver, and
>> >> hope
>> > the
>> >> disk
>> >> driver can see the PDO, but the result is the PDO does not appear in
> disk
>> >> driver.
>> >>
>> >> The following are the main procedure in my disk low filter driver:
>> >>
>> >> call IoCreateDevice(), IoInvalidateDeviceRelations(),
>> >> then
>> >> receive
> IRP_MJ_PNP.IRP_MN_QUERY_DEVICE_RELATIONS.BusRelations,
>> >> IRP_MJ_PNP.IRP_MN_START_DEVICE
>> >>
>> >> Any comment for my problem, thanks.
>> >>
>> >> Best Regards,
>> >> Peter,
>> >>
>> >>
>> >
>> >
>> >
>> > __________ Information from ESET NOD32 Antivirus, version of virus
>> > signature database 4603 (20091113) __________
>> >
>> > The message was checked by ESET NOD32 Antivirus.
>> >
>> > http://www.eset.com
>> >
>> >
>> >
>>
>>
>>
>> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4603 (20091113) __________
>>
>> The message was checked by ESET NOD32 Antivirus.
>>
>> http://www.eset.com
>>
>>
>>
>>
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4611 (20091116) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4611 (20091116) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com