Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Windos
win32.3rdparty
win32.directx.audio
win32.directx.ddk
win32.directx.graphics
win32.directx.input
win32.directx.managed
win32.directx.misc
win32.directx.networking
win32.directx.sdk
win32.directx.video
win32.dirx.grap.shaders
win32.gdi
win32.international
win32.kernel
win32.messaging
win32.mmedia
win32.networks
win32.ole
win32.rtc
win32.tapi
win32.tapi.beta
win32.tools
win32.ui
win32.wince
win32.wmi
windows.mediacenter
winfx.aero
winfx.announcements
winfx.avalon
winfx.collaboration
winfx.fundamentals
winfx.general
winfx.indigo
winfx.sdk
winfx.winfs
  
 
date: Fri, 4 Jul 2008 05:34:06 -0700 (PDT),    group: microsoft.public.win32.programmer.wmi        back       


Does SetDefaultPrinter send its own SendMessageTimeout ?   
Subject kind of explains the basics of my question, but here's the
background :-

I'm using the System.Managed namespace in a C#.Net app to set the
default printer via WMI.  This is a conversion of an older bit of code
that was using an API call (via P/Invoke).  After the call to set the
default printer, the recommended practice was to use another API call,
SendMessageTimeout, to notify other running applications of the
change.

Now that I'm using WMI to set the default printer, do I still need to
call SendMessageTimeout to let other applications know, or does WMI
handle it internally and automatically?

Cheers

Rob
date: Fri, 4 Jul 2008 05:34:06 -0700 (PDT)   author:   RobCowell

Re: Does SetDefaultPrinter send its own SendMessageTimeout ?   
I do not think WMI will handle that notification.

The reason that message is sent out from my understanding is that 
applications like Word etc. Can receive those messages and update their 
default printer as they process. When you use WMI, you would still need to 
notify the applications of the change or it will not update until the next 
time the application starts or polls the spooler.

Allan

"RobCowell"  wrote in message 
news:99dea20c-cb2d-43b0-81cd-8ec643dc33a5@c65g2000hsa.googlegroups.com...
> Subject kind of explains the basics of my question, but here's the
> background :-
>
> I'm using the System.Managed namespace in a C#.Net app to set the
> default printer via WMI.  This is a conversion of an older bit of code
> that was using an API call (via P/Invoke).  After the call to set the
> default printer, the recommended practice was to use another API call,
> SendMessageTimeout, to notify other running applications of the
> change.
>
> Now that I'm using WMI to set the default printer, do I still need to
> call SendMessageTimeout to let other applications know, or does WMI
> handle it internally and automatically?
>
> Cheers
>
> Rob
date: Mon, 7 Jul 2008 14:10:58 -0500   author:   Allan

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us