Hi,
I have an application that handles device notifications for USB devices.
Other device-notifications that are not handled are just traced.
I see a strange thing:

If I start my application and pull out an USB device I get a lot of device
notifications. (about 30 or so, for all devices and drives/filesystems ...)
This is strange because the OS was not restarted,so things like keyboards
and disks were not re-mounted. Has anyone seen this behaviour ?
Why does it happen, and why is it trigerred by a (single) device
addition/removal ?
Plz explain ?

Greetings,
Rob.

Re: Many Device notifications after startup app by Luca

Luca
Mon Jul 28 06:48:40 PDT 2008

When you call RequestDeviceNotifications, which value do you set for 'fAll'
parameter?

--

Luca Calligaris
www.eurotech.it

"Rob" <Rob@discussions.microsoft.com> ha scritto nel messaggio
news:A79E5437-B8B7-4609-BABC-B15887AA7AE5@microsoft.com...
> Hi,
> I have an application that handles device notifications for USB devices.
> Other device-notifications that are not handled are just traced.
> I see a strange thing:
>
> If I start my application and pull out an USB device I get a lot of device
> notifications. (about 30 or so, for all devices and drives/filesystems
> ...)
> This is strange because the OS was not restarted,so things like keyboards
> and disks were not re-mounted. Has anyone seen this behaviour ?
> Why does it happen, and why is it trigerred by a (single) device
> addition/removal ?
> Plz explain ?
>
> Greetings,
> Rob.
>
>
>
>
>
>



Re: Many Device notifications after startup app by Rob

Rob
Mon Jul 28 07:07:01 PDT 2008

Hi,
The value is TRUE, but that is not what my question is about.

It's fine that I'm notified of all those devices, I just don't get why after
an aPP-restart, I get such a bombardment of notifications.
It looks like all boot-devices (fileystems/drives/keyboard etc...) are
reported.
I can imagine this happening the first run after boot, although I would not
expect it.

It looks like old stuff still in some buffer, but if the OS hasn't booted
inbetween 2 application-runs, why do I get them ALL again when I start my app
and (un)plug any device ?

Greetings,
Rob.





"Luca Calligaris" wrote:

> When you call RequestDeviceNotifications, which value do you set for 'fAll'
> parameter?
>
> --
>
> Luca Calligaris
> www.eurotech.it
>
> "Rob" <Rob@discussions.microsoft.com> ha scritto nel messaggio
> news:A79E5437-B8B7-4609-BABC-B15887AA7AE5@microsoft.com...
> > Hi,
> > I have an application that handles device notifications for USB devices.
> > Other device-notifications that are not handled are just traced.
> > I see a strange thing:
> >
> > If I start my application and pull out an USB device I get a lot of device
> > notifications. (about 30 or so, for all devices and drives/filesystems
> > ...)
> > This is strange because the OS was not restarted,so things like keyboards
> > and disks were not re-mounted. Has anyone seen this behaviour ?
> > Why does it happen, and why is it trigerred by a (single) device
> > addition/removal ?
> > Plz explain ?
> >
> > Greetings,
> > Rob.
> >
> >
> >
> >
> >
> >
>
>
>

Re: Many Device notifications after startup app by Dean

Dean
Mon Jul 28 07:19:02 PDT 2008

I think you've misunderstood what the fAll parameter is for. I think it
does mean all notifications that previously existed, and does not mean all
devices. If you only want notifications for changes that happen after you
make the call, then set this value to FALSE. You can restrict the types of
devices that report changes using the first parameter.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Rob" <Rob@discussions.microsoft.com> wrote in message
news:3C3B0F97-F5EF-476C-8FE2-AECD849EFF7E@microsoft.com...
> Hi,
> The value is TRUE, but that is not what my question is about.
>
> It's fine that I'm notified of all those devices, I just don't get why
> after
> an aPP-restart, I get such a bombardment of notifications.
> It looks like all boot-devices (fileystems/drives/keyboard etc...) are
> reported.
> I can imagine this happening the first run after boot, although I would
> not
> expect it.
>
> It looks like old stuff still in some buffer, but if the OS hasn't booted
> inbetween 2 application-runs, why do I get them ALL again when I start my
> app
> and (un)plug any device ?
>
> Greetings,
> Rob.
>
>
>
>
>
> "Luca Calligaris" wrote:
>
>> When you call RequestDeviceNotifications, which value do you set for
>> 'fAll'
>> parameter?
>>
>> --
>>
>> Luca Calligaris
>> www.eurotech.it
>>
>> "Rob" <Rob@discussions.microsoft.com> ha scritto nel messaggio
>> news:A79E5437-B8B7-4609-BABC-B15887AA7AE5@microsoft.com...
>> > Hi,
>> > I have an application that handles device notifications for USB
>> > devices.
>> > Other device-notifications that are not handled are just traced.
>> > I see a strange thing:
>> >
>> > If I start my application and pull out an USB device I get a lot of
>> > device
>> > notifications. (about 30 or so, for all devices and drives/filesystems
>> > ...)
>> > This is strange because the OS was not restarted,so things like
>> > keyboards
>> > and disks were not re-mounted. Has anyone seen this behaviour ?
>> > Why does it happen, and why is it trigerred by a (single) device
>> > addition/removal ?
>> > Plz explain ?
>> >
>> > Greetings,
>> > Rob.
>> >
>> >
>> >
>> >
>> >
>> >
>>
>>
>>



Re: Many Device notifications after startup app by Luca

Luca
Mon Jul 28 07:40:26 PDT 2008

I agree with Dean Ramsier on the meaning of the 'fAll' parameter, so my
question. I would try to see what happens setting fAll to FALSE

--

Luca Calligaris
www.eurotech.it

"Dean Ramsier" <ramsiernospam@nospam.com> ha scritto nel messaggio
news:eRAVZyL8IHA.2332@TK2MSFTNGP03.phx.gbl...
>I think you've misunderstood what the fAll parameter is for. I think it
>does mean all notifications that previously existed, and does not mean all
>devices. If you only want notifications for changes that happen after you
>make the call, then set this value to FALSE. You can restrict the types of
>devices that report changes using the first parameter.
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
>
> "Rob" <Rob@discussions.microsoft.com> wrote in message
> news:3C3B0F97-F5EF-476C-8FE2-AECD849EFF7E@microsoft.com...
>> Hi,
>> The value is TRUE, but that is not what my question is about.
>>
>> It's fine that I'm notified of all those devices, I just don't get why
>> after
>> an aPP-restart, I get such a bombardment of notifications.
>> It looks like all boot-devices (fileystems/drives/keyboard etc...) are
>> reported.
>> I can imagine this happening the first run after boot, although I would
>> not
>> expect it.
>>
>> It looks like old stuff still in some buffer, but if the OS hasn't booted
>> inbetween 2 application-runs, why do I get them ALL again when I start my
>> app
>> and (un)plug any device ?
>>
>> Greetings,
>> Rob.
>>
>>
>>
>>
>>
>> "Luca Calligaris" wrote:
>>
>>> When you call RequestDeviceNotifications, which value do you set for
>>> 'fAll'
>>> parameter?
>>>
>>> --
>>>
>>> Luca Calligaris
>>> www.eurotech.it
>>>
>>> "Rob" <Rob@discussions.microsoft.com> ha scritto nel messaggio
>>> news:A79E5437-B8B7-4609-BABC-B15887AA7AE5@microsoft.com...
>>> > Hi,
>>> > I have an application that handles device notifications for USB
>>> > devices.
>>> > Other device-notifications that are not handled are just traced.
>>> > I see a strange thing:
>>> >
>>> > If I start my application and pull out an USB device I get a lot of
>>> > device
>>> > notifications. (about 30 or so, for all devices and drives/filesystems
>>> > ...)
>>> > This is strange because the OS was not restarted,so things like
>>> > keyboards
>>> > and disks were not re-mounted. Has anyone seen this behaviour ?
>>> > Why does it happen, and why is it trigerred by a (single) device
>>> > addition/removal ?
>>> > Plz explain ?
>>> >
>>> > Greetings,
>>> > Rob.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>>
>
>



Re: Many Device notifications after startup app by Rob

Rob
Mon Jul 28 07:41:02 PDT 2008

OK, you are right, that is what I mean, thanks....
Rob.

"Dean Ramsier" wrote:

> I think you've misunderstood what the fAll parameter is for. I think it
> does mean all notifications that previously existed, and does not mean all
> devices. If you only want notifications for changes that happen after you
> make the call, then set this value to FALSE. You can restrict the types of
> devices that report changes using the first parameter.
>
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
>
> "Rob" <Rob@discussions.microsoft.com> wrote in message
> news:3C3B0F97-F5EF-476C-8FE2-AECD849EFF7E@microsoft.com...
> > Hi,
> > The value is TRUE, but that is not what my question is about.
> >
> > It's fine that I'm notified of all those devices, I just don't get why
> > after
> > an aPP-restart, I get such a bombardment of notifications.
> > It looks like all boot-devices (fileystems/drives/keyboard etc...) are
> > reported.
> > I can imagine this happening the first run after boot, although I would
> > not
> > expect it.
> >
> > It looks like old stuff still in some buffer, but if the OS hasn't booted
> > inbetween 2 application-runs, why do I get them ALL again when I start my
> > app
> > and (un)plug any device ?
> >
> > Greetings,
> > Rob.
> >
> >
> >
> >
> >
> > "Luca Calligaris" wrote:
> >
> >> When you call RequestDeviceNotifications, which value do you set for
> >> 'fAll'
> >> parameter?
> >>
> >> --
> >>
> >> Luca Calligaris
> >> www.eurotech.it
> >>
> >> "Rob" <Rob@discussions.microsoft.com> ha scritto nel messaggio
> >> news:A79E5437-B8B7-4609-BABC-B15887AA7AE5@microsoft.com...
> >> > Hi,
> >> > I have an application that handles device notifications for USB
> >> > devices.
> >> > Other device-notifications that are not handled are just traced.
> >> > I see a strange thing:
> >> >
> >> > If I start my application and pull out an USB device I get a lot of
> >> > device
> >> > notifications. (about 30 or so, for all devices and drives/filesystems
> >> > ...)
> >> > This is strange because the OS was not restarted,so things like
> >> > keyboards
> >> > and disks were not re-mounted. Has anyone seen this behaviour ?
> >> > Why does it happen, and why is it trigerred by a (single) device
> >> > addition/removal ?
> >> > Plz explain ?
> >> >
> >> > Greetings,
> >> > Rob.
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >>
>
>
>