Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > How a non-windowed program can receive WM_DEVICECHANGE from Window

Reply
Thread Tools Display Modes

How a non-windowed program can receive WM_DEVICECHANGE from Window

 
 
Amanda Lin
Guest
Posts: n/a

 
      06-02-2006
I See. Thank you very much!

I've tried the Message-Only Window. It's like a filter to deny the broadcast
message.
It can receive DBT_DEVICEARRIVAL & DBT_DEVICEREMOVECOMPLETE.
But DBT_DEVNODES_CHANGED is lost.

It seems part of the WM_DEVICECHANGE messages are broadcast.

But I found another question.
Does CreateFile() is also like such a message filter????

If a device file is opened, an non-message-only window of an application can
only receive the broadcast device message. I found it can receive only
DBT_DEVNODES_CHANGED , but neither DBT_DEVICEARRIVAL nor
DBT_DEVICEREMOVECOMPLETE.

Best Regards

Amanda Lin


"Doron Holan [MS]" wrote:

> IIRC == If I Remember Correctly
>
> --
> 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.
>
>
> "Amanda Lin" <> wrote in message
> news:AC264957-5FAB-411B-94B8-...
> > What is the meaning of "IIRC"?
> >
> > "WM_DEVICECHANGE is IIRC a broadcast."
> >
> > Do you mean WM_DEVICECHANGE is a broadcast message? So a message-only
> > window can not receive such a message? Thank you!
> >
> > Best Regards
> > Amanda Lin
> >
> >
> > "Maxim S. Shatskih" wrote:
> >
> >> > See CreateWindow doc, hWndParent argument description.
> >> >HWND_MESSAGE or
> >> > another message-only window will create a message-only window, which
> >> > exists
> >> > solely as message target.
> >>
> >> Looking there.
> >>
> >> Message-only window does not receive broadcast messages :-)
> >> WM_DEVICECHANGE is
> >> IIRC a broadcast.
> >>
> >> --
> >> Maxim Shatskih, Windows DDK MVP
> >> StorageCraft Corporation
> >>
> >> http://www.storagecraft.com
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      06-02-2006
> What is the meaning of "IIRC"?

"If I remember correctly"

> Do you mean WM_DEVICECHANGE is a broadcast message?


Is it not so?

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation

http://www.storagecraft.com

 
Reply With Quote
 
Amanda Lin
Guest
Posts: n/a

 
      06-05-2006
I think "WM_DEVICECHANGE" is a broadcast because every program that registers
a device notification can get the device message.

But I did find a message-only window can get "DBT_DEVICEARRIVAL" and
"DBT_DEVICEREMOVECOMPLETE" but no "DBT_DEVNODES_CHANGED".


Best Regards
Amanda


"Maxim S. Shatskih" wrote:

> > What is the meaning of "IIRC"?

>
> "If I remember correctly"
>
> > Do you mean WM_DEVICECHANGE is a broadcast message?

>
> Is it not so?
>
> --
> Maxim Shatskih, Windows DDK MVP
> StorageCraft Corporation
>
> http://www.storagecraft.com
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FS9 Windowed Mode with Vista Aydee Windows Vista Games 3 10-25-2008 05:13 AM
Send and Receive Window in Windows Mail Mister Lank Windows Vista Mail 3 04-22-2008 09:21 PM
Send Receive window is a black screen Wendell Windows Vista Mail 3 09-15-2007 06:19 PM
Receive Window Auto-Tuning on Vista Sooner Al [MVP] Windows Vista Networking 0 07-09-2007 10:51 AM
Running media center in windowed mode ? Martin Vaupell Windows Vista Music, Pictures and Video 3 04-01-2007 07:45 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59