|
Prev: USB Composite Device and Selective Suspend on Windows XP
Next: 1394 camera suspend/resume - question about IRP_MN_SET_POWER
From: kobi n on 1 May 2008 04:52 Hi, regarding your first part of the answer - "use the device and interface enumeration functions in SetupAPI to enumerate your devices and check when you have the required number.." i do use this BUT the required number is my main problem and is what i'm trying to avoid. i don't want to be dependant on any external parameter. thanks, Kobi. "Farhan Ahmed [MSFT]" wrote: > You could use the device and interface enumeration functions in SetupAPI > (http://msdn.microsoft.com/en-us/library/ms791137.aspx) to enumerate your > devices and check when you have the required number of them ready and in > the correct state. > > If you'd like to know when PnP has finished installing a "batch" of > devices (note, this is for installation, and hence only the first time > your device is discovered), you could use the > CMP_WaitNoPendingInstallEvents API > (http://msdn.microsoft.com/en-us/library/ms789525.aspx). While it will not > help you determine if your particular device is being installed, it will > tell you if the PnP manager is actively installing *some* device. > > Farhan > > -- > Please do not send e-mail directly to this alias. this alias is for > newsgroup purposes only. > This posting is provided "AS IS" with no warranties, and confers no > rights. > > -----Original Message----- > From: kobi n [mailto:kobin(a)discussions.microsoft.com] > Posted At: Tuesday, April 29, 2008 11:06 PM > Posted To: microsoft.public.development.device.drivers > Conversation: PnP device recognition > Subject: Re: PnP device recognition > > > thanks for the answer. > > our system is complicated and composed of various modules. the user mode > application would like to know when all the driver related boards were > found > and ready to work in order to start some other proccesses that depend on > the > boards readiness. > > "Pavel A." wrote: > > > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message > > news:CC911860-8AF2-4F12-9B3A-F5E1AF81CBE5(a)microsoft.com... > > > Hi. > > > > > > i have a question regarding the PnP mechanism. > > > > > > my driver (WDF based) controls a pci board. my system can have > > > between > > > one > > > to ten boards on its backplane. > > > my question is - is there a way for me to know (to be sure) that PnP > > > have > > > finished dealing with all of my boards (that are related to my driver) > > > in > > > a > > > given moment. my user mode side of the system needs to know weather > > > there > > > are > > > still boards that were not handled by the PnP. > > > a possible soulution might be using some kind of configuration, > > > meaning > > > that > > > the user mode will have to know how many boards exist on a given > > > system > > > and > > > will be able to query the driver of how many boards were found in a > > > given > > > moment. > > > but since i try to avoid this kind of solution i would to know if the > > > OS/pnp > > > mechanism can help me with that. > > > > > > thanks a ot, > > > kobi. > > > > Why do you need this? Maybe you want to detect failed driver instances > > or debug a stuck coinstaller? > > Normally, setup of a PCI device should complete in few seconds, > > so all your 10 boards should install pretty quick. > > > > Regards, > > --PA > > > > > > > >
From: Pavel A. on 1 May 2008 05:29 Just Keep It Simple? Wait ~ 20 seconds, then enumerate whatever you have to the moment. Implement an option to refresh the cards manually, if for some reason this is needed. Regards, --PA "kobi n" <kobin(a)discussions.microsoft.com> wrote in message news:9E0ED3DA-4FC1-4D07-9BAE-B5374B55D4E5(a)microsoft.com... > > Hi, > > regarding your first part of the answer - "use the device and interface > enumeration functions in SetupAPI to enumerate your > devices and check when you have the required number.." i do use this BUT > the required number is my main problem and is what i'm trying to avoid. i > don't want to be dependant on any external parameter. > > thanks, > Kobi. > "Farhan Ahmed [MSFT]" wrote: > >> You could use the device and interface enumeration functions in SetupAPI >> (http://msdn.microsoft.com/en-us/library/ms791137.aspx) to enumerate your >> devices and check when you have the required number of them ready and in >> the correct state. >> >> If you'd like to know when PnP has finished installing a "batch" of >> devices (note, this is for installation, and hence only the first time >> your device is discovered), you could use the >> CMP_WaitNoPendingInstallEvents API >> (http://msdn.microsoft.com/en-us/library/ms789525.aspx). While it will >> not >> help you determine if your particular device is being installed, it will >> tell you if the PnP manager is actively installing *some* device. >> >> Farhan >> >> -- >> Please do not send e-mail directly to this alias. this alias is for >> newsgroup purposes only. >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> -----Original Message----- >> From: kobi n [mailto:kobin(a)discussions.microsoft.com] >> Posted At: Tuesday, April 29, 2008 11:06 PM >> Posted To: microsoft.public.development.device.drivers >> Conversation: PnP device recognition >> Subject: Re: PnP device recognition >> >> >> thanks for the answer. >> >> our system is complicated and composed of various modules. the user mode >> application would like to know when all the driver related boards were >> found >> and ready to work in order to start some other proccesses that depend on >> the >> boards readiness. >> >> "Pavel A." wrote: >> >> > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message >> > news:CC911860-8AF2-4F12-9B3A-F5E1AF81CBE5(a)microsoft.com... >> > > Hi. >> > > >> > > i have a question regarding the PnP mechanism. >> > > >> > > my driver (WDF based) controls a pci board. my system can have >> > > between >> > > one >> > > to ten boards on its backplane. >> > > my question is - is there a way for me to know (to be sure) that PnP >> > > have >> > > finished dealing with all of my boards (that are related to my >> > > driver) >> > > in >> > > a >> > > given moment. my user mode side of the system needs to know weather >> > > there >> > > are >> > > still boards that were not handled by the PnP. >> > > a possible soulution might be using some kind of configuration, >> > > meaning >> > > that >> > > the user mode will have to know how many boards exist on a given >> > > system >> > > and >> > > will be able to query the driver of how many boards were found in a >> > > given >> > > moment. >> > > but since i try to avoid this kind of solution i would to know if the >> > > OS/pnp >> > > mechanism can help me with that. >> > > >> > > thanks a ot, >> > > kobi. >> > >> > Why do you need this? Maybe you want to detect failed driver instances >> > or debug a stuck coinstaller? >> > Normally, setup of a PCI device should complete in few seconds, >> > so all your 10 boards should install pretty quick. >> > >> > Regards, >> > --PA >> > >> > >> > >> >>
From: kobi n on 1 May 2008 06:52 either way - i can't be 100% sure that all driver related devices were detected ... no matter how much time i wait, right ? this is my basic question. no option for me to be 100% sure on a given moment without the help of external configuration parameter (i.e expected boards number) ? "Pavel A." wrote: > Just Keep It Simple? > Wait ~ 20 seconds, then enumerate whatever you have to the moment. > Implement an option to refresh the cards manually, if for some reason this > is needed. > > Regards, > --PA > > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message > news:9E0ED3DA-4FC1-4D07-9BAE-B5374B55D4E5(a)microsoft.com... > > > > Hi, > > > > regarding your first part of the answer - "use the device and interface > > enumeration functions in SetupAPI to enumerate your > > devices and check when you have the required number.." i do use this BUT > > the required number is my main problem and is what i'm trying to avoid. i > > don't want to be dependant on any external parameter. > > > > thanks, > > Kobi. > > "Farhan Ahmed [MSFT]" wrote: > > > >> You could use the device and interface enumeration functions in SetupAPI > >> (http://msdn.microsoft.com/en-us/library/ms791137.aspx) to enumerate your > >> devices and check when you have the required number of them ready and in > >> the correct state. > >> > >> If you'd like to know when PnP has finished installing a "batch" of > >> devices (note, this is for installation, and hence only the first time > >> your device is discovered), you could use the > >> CMP_WaitNoPendingInstallEvents API > >> (http://msdn.microsoft.com/en-us/library/ms789525.aspx). While it will > >> not > >> help you determine if your particular device is being installed, it will > >> tell you if the PnP manager is actively installing *some* device. > >> > >> Farhan > >> > >> -- > >> Please do not send e-mail directly to this alias. this alias is for > >> newsgroup purposes only. > >> This posting is provided "AS IS" with no warranties, and confers no > >> rights. > >> > >> -----Original Message----- > >> From: kobi n [mailto:kobin(a)discussions.microsoft.com] > >> Posted At: Tuesday, April 29, 2008 11:06 PM > >> Posted To: microsoft.public.development.device.drivers > >> Conversation: PnP device recognition > >> Subject: Re: PnP device recognition > >> > >> > >> thanks for the answer. > >> > >> our system is complicated and composed of various modules. the user mode > >> application would like to know when all the driver related boards were > >> found > >> and ready to work in order to start some other proccesses that depend on > >> the > >> boards readiness. > >> > >> "Pavel A." wrote: > >> > >> > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message > >> > news:CC911860-8AF2-4F12-9B3A-F5E1AF81CBE5(a)microsoft.com... > >> > > Hi. > >> > > > >> > > i have a question regarding the PnP mechanism. > >> > > > >> > > my driver (WDF based) controls a pci board. my system can have > >> > > between > >> > > one > >> > > to ten boards on its backplane. > >> > > my question is - is there a way for me to know (to be sure) that PnP > >> > > have > >> > > finished dealing with all of my boards (that are related to my > >> > > driver) > >> > > in > >> > > a > >> > > given moment. my user mode side of the system needs to know weather > >> > > there > >> > > are > >> > > still boards that were not handled by the PnP. > >> > > a possible soulution might be using some kind of configuration, > >> > > meaning > >> > > that > >> > > the user mode will have to know how many boards exist on a given > >> > > system > >> > > and > >> > > will be able to query the driver of how many boards were found in a > >> > > given > >> > > moment. > >> > > but since i try to avoid this kind of solution i would to know if the > >> > > OS/pnp > >> > > mechanism can help me with that. > >> > > > >> > > thanks a ot, > >> > > kobi. > >> > > >> > Why do you need this? Maybe you want to detect failed driver instances > >> > or debug a stuck coinstaller? > >> > Normally, setup of a PCI device should complete in few seconds, > >> > so all your 10 boards should install pretty quick. > >> > > >> > Regards, > >> > --PA > >> > > >> > > >> > > >> > >> >
From: Pavel A. on 1 May 2008 07:21 "kobi n" <kobin(a)discussions.microsoft.com> wrote in message news:52D0C8B5-DB9F-401D-A7C4-0035954D80E1(a)microsoft.com... > > either way - i can't be 100% sure that all driver related devices were > detected ... no matter how much time i wait, right ? this is my basic > question. no option for me to be 100% sure on a given moment without the > help > of external configuration parameter (i.e expected boards number) ? Very few things in the world are 100% sure (death, taxes.... is there # 3?) PnP doesn't seem to be among them. --PA > "Pavel A." wrote: > >> Just Keep It Simple? >> Wait ~ 20 seconds, then enumerate whatever you have to the moment. >> Implement an option to refresh the cards manually, if for some reason >> this >> is needed. >> >> Regards, >> --PA >> >> "kobi n" <kobin(a)discussions.microsoft.com> wrote in message >> news:9E0ED3DA-4FC1-4D07-9BAE-B5374B55D4E5(a)microsoft.com... >> > >> > Hi, >> > >> > regarding your first part of the answer - "use the device and interface >> > enumeration functions in SetupAPI to enumerate your >> > devices and check when you have the required number.." i do use this >> > BUT >> > the required number is my main problem and is what i'm trying to avoid. >> > i >> > don't want to be dependant on any external parameter. >> > >> > thanks, >> > Kobi. >> > "Farhan Ahmed [MSFT]" wrote: >> > >> >> You could use the device and interface enumeration functions in >> >> SetupAPI >> >> (http://msdn.microsoft.com/en-us/library/ms791137.aspx) to enumerate >> >> your >> >> devices and check when you have the required number of them ready and >> >> in >> >> the correct state. >> >> >> >> If you'd like to know when PnP has finished installing a "batch" of >> >> devices (note, this is for installation, and hence only the first time >> >> your device is discovered), you could use the >> >> CMP_WaitNoPendingInstallEvents API >> >> (http://msdn.microsoft.com/en-us/library/ms789525.aspx). While it will >> >> not >> >> help you determine if your particular device is being installed, it >> >> will >> >> tell you if the PnP manager is actively installing *some* device. >> >> >> >> Farhan >> >> >> >> -- >> >> Please do not send e-mail directly to this alias. this alias is for >> >> newsgroup purposes only. >> >> This posting is provided "AS IS" with no warranties, and confers no >> >> rights. >> >> >> >> -----Original Message----- >> >> From: kobi n [mailto:kobin(a)discussions.microsoft.com] >> >> Posted At: Tuesday, April 29, 2008 11:06 PM >> >> Posted To: microsoft.public.development.device.drivers >> >> Conversation: PnP device recognition >> >> Subject: Re: PnP device recognition >> >> >> >> >> >> thanks for the answer. >> >> >> >> our system is complicated and composed of various modules. the user >> >> mode >> >> application would like to know when all the driver related boards were >> >> found >> >> and ready to work in order to start some other proccesses that depend >> >> on >> >> the >> >> boards readiness. >> >> >> >> "Pavel A." wrote: >> >> >> >> > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message >> >> > news:CC911860-8AF2-4F12-9B3A-F5E1AF81CBE5(a)microsoft.com... >> >> > > Hi. >> >> > > >> >> > > i have a question regarding the PnP mechanism. >> >> > > >> >> > > my driver (WDF based) controls a pci board. my system can have >> >> > > between >> >> > > one >> >> > > to ten boards on its backplane. >> >> > > my question is - is there a way for me to know (to be sure) that >> >> > > PnP >> >> > > have >> >> > > finished dealing with all of my boards (that are related to my >> >> > > driver) >> >> > > in >> >> > > a >> >> > > given moment. my user mode side of the system needs to know >> >> > > weather >> >> > > there >> >> > > are >> >> > > still boards that were not handled by the PnP. >> >> > > a possible soulution might be using some kind of configuration, >> >> > > meaning >> >> > > that >> >> > > the user mode will have to know how many boards exist on a given >> >> > > system >> >> > > and >> >> > > will be able to query the driver of how many boards were found in >> >> > > a >> >> > > given >> >> > > moment. >> >> > > but since i try to avoid this kind of solution i would to know if >> >> > > the >> >> > > OS/pnp >> >> > > mechanism can help me with that. >> >> > > >> >> > > thanks a ot, >> >> > > kobi. >> >> > >> >> > Why do you need this? Maybe you want to detect failed driver >> >> > instances >> >> > or debug a stuck coinstaller? >> >> > Normally, setup of a PCI device should complete in few seconds, >> >> > so all your 10 boards should install pretty quick. >> >> > >> >> > Regards, >> >> > --PA >> >> > >> >> > >> >> > >> >> >> >> >>
From: Farhan Ahmed [MSFT] on 1 May 2008 11:40
Well, any solution you implement without use of the external configuration will probably fail if there is a hardware failure and PnP never sees the device. PnP processes the devices as they are enumerated by the bus, and there is no indication of when the enumerations are "complete" i.e. one can occur as soon as you determine that you are in a stable state. Farhan -----Original Message----- From: kobi n [mailto:kobin(a)discussions.microsoft.com] Posted At: Thursday, May 01, 2008 1:52 AM Posted To: microsoft.public.development.device.drivers Conversation: PnP device recognition Subject: Re: PnP device recognition Hi, regarding your first part of the answer - "use the device and interface enumeration functions in SetupAPI to enumerate your devices and check when you have the required number.." i do use this BUT the required number is my main problem and is what i'm trying to avoid. i don't want to be dependant on any external parameter. thanks, Kobi. "Farhan Ahmed [MSFT]" wrote: > You could use the device and interface enumeration functions in SetupAPI > (http://msdn.microsoft.com/en-us/library/ms791137.aspx) to enumerate > your > devices and check when you have the required number of them ready and in > the correct state. > > If you'd like to know when PnP has finished installing a "batch" of > devices (note, this is for installation, and hence only the first time > your device is discovered), you could use the > CMP_WaitNoPendingInstallEvents API > (http://msdn.microsoft.com/en-us/library/ms789525.aspx). While it will > not > help you determine if your particular device is being installed, it will > tell you if the PnP manager is actively installing *some* device. > > Farhan > > -- > Please do not send e-mail directly to this alias. this alias is for > newsgroup purposes only. > This posting is provided "AS IS" with no warranties, and confers no > rights. > > -----Original Message----- > From: kobi n [mailto:kobin(a)discussions.microsoft.com] > Posted At: Tuesday, April 29, 2008 11:06 PM > Posted To: microsoft.public.development.device.drivers > Conversation: PnP device recognition > Subject: Re: PnP device recognition > > > thanks for the answer. > > our system is complicated and composed of various modules. the user mode > application would like to know when all the driver related boards were > found > and ready to work in order to start some other proccesses that depend on > the > boards readiness. > > "Pavel A." wrote: > > > "kobi n" <kobin(a)discussions.microsoft.com> wrote in message > > news:CC911860-8AF2-4F12-9B3A-F5E1AF81CBE5(a)microsoft.com... > > > Hi. > > > > > > i have a question regarding the PnP mechanism. > > > > > > my driver (WDF based) controls a pci board. my system can have > > > between > > > one > > > to ten boards on its backplane. > > > my question is - is there a way for me to know (to be sure) that PnP > > > have > > > finished dealing with all of my boards (that are related to my > > > driver) > > > in > > > a > > > given moment. my user mode side of the system needs to know weather > > > there > > > are > > > still boards that were not handled by the PnP. > > > a possible soulution might be using some kind of configuration, > > > meaning > > > that > > > the user mode will have to know how many boards exist on a given > > > system > > > and > > > will be able to query the driver of how many boards were found in a > > > given > > > moment. > > > but since i try to avoid this kind of solution i would to know if > > > the > > > OS/pnp > > > mechanism can help me with that. > > > > > > thanks a ot, > > > kobi. > > > > Why do you need this? Maybe you want to detect failed driver instances > > or debug a stuck coinstaller? > > Normally, setup of a PCI device should complete in few seconds, > > so all your 10 boards should install pretty quick. > > > > Regards, > > --PA > > > > > > > > |