
Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
Thanks for your reply.
The WMI code has one problem: it requires Windows XP or newer. Since I need
Windows 2000 support WMI does not work for me. However, I found the
SetDefaultPrinter function in the Win32 API (see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/prntspol_02
7m.asp )
This works for Windows 2000 and above.
Guido
> Hi
>
[quoted text clipped - 11 lines]
> Get Secure! - www.microsoft.com/security
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 13 May 2005 03:29 GMT
Hi
Thanks for your feedback.
Because we can use WMI in .NET via System.Management namespace which is all
managed code, but if you wants to use it on earlier OS, I think we have to
use the P/Invoke into the API.
So the P/Invoke is also a good alternative on earlier OS platforms.
Thanks for your sharing the experience here.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.