Re: user defined WM_ question: update

"Jim Murphy" <[email protected]>
Newsgroups gmane.comp.windows.off-topic
Message-ID <56786967-1251317665-cardhu_decombobulator_blackberry.rim.net-1064471026-@bxe1002.bisx.prod.on.blackberry>
Sent from my BlackBerry device on the Rogers Wireless Network

-----Original Message-----
From: Eric Strain <[email protected]>

Date: Tue, 25 Aug 2009 14:34:39 
To: <[email protected]>
Subject: Re: [OT] user defined WM_ question: update


Hi John, 

  Thanks for the reply. What I am trying to do is have my application automatically detect when any kind of network failure occurs. The failure could be anything from some random network failure, to someone unplugging the network cable, to some janitor unplugging the server so she can plug her vacuum in. In any case, I want the program to know about it. 

 Similar to the little notification icon that pops up on the desktop when you unplug the network cable from your computer. That's the functionality I want (minus the icon popping up). Would the WM_DEVICECHANGE message catch the network cable being unplugged? I can't see it being activated when the network is still physically intact, just not operational, such as when a node on the network goes down... Any ideas?

-Eric 

--- On Tue, 8/25/09, code_for_fun <[email protected]> wrote:

From: code_for_fun <[email protected]>
Subject: Re: [OT] user defined WM_ question: update
To: [email protected]
Date: Tuesday, August 25, 2009, 5:41 AM

--- In [email protected], Eric Strain <eric_strain1@...> wrote:
>
>   OK, I got the WM_USER code to work, now is it possible to get the event handler to fire automatically? I really don't want to use polling, even if it is on a separate thread. Currently I have the WM_USER event being triggered through SendMessage(WM_MYEVENT,0,0); inside an OnClicked( ) handler attached to a UI button. Although this is working in my test app, I want the event to be fired automatically by the OS when the targeted event occurs.
> 
>   Any ideas? Thanks guys.
> 
> -Eric 
> 

Maybe you need to use RegisterDeviceNotification() and check for loss of connection in response to the WM_DEVICECHANGE msg.

John




------------------------------------

Yahoo! Groups Links
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.