Re: Allowing a method to timeout

"Bhatnagar, Amit" <[email protected]> Fri, 11 Jan 2008 13:28:37 -0700
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <[email protected]>
Thanks for your reply Peter.

I don't think I am using that flag. How do I specify it? Also note that
the call to SystemParametersInfo doesn't always hang the app, but it
does it enough that I want to ensure that the application will indeed
termiante (hence my question about timing out this call).



-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Peter Ritchie
Sent: Friday, January 11, 2008 1:12 PM
To: [email protected]
Subject: Re: [DOTNET-WINFORMS] Allowing a method to timeout

Are you using the SPIF_SENDCHANGE flag?  This will broadcast the
WM_SETTINGCHANGE message to all windows and block SystemParametersInfo
until all windows respond.  If you called SystemParametersInfo on the
main GUI thread then that thread is blocked waiting for
SystemParametersInfo and will be unable to respond to WM_SETTINGCHANGE.

The information contained in this e-mail message is PRIVATE. It may contain confidential information and may be legally privileged. It is intended for the exclusive use of the addressee(s). If you are not the intended recipient, you are hereby notified that any dissemination, distribution or reproduction of this communication is strictly prohibited. If the intended recipient(s) cannot be reached or if a transmission problem has occurred, please notify the sender immediately by return e-mail and destroy all copies of this message. 
Thank you.