Hi Frank,
As for your two questions, I think we may need to make use of some Windows
APIs related to USB printer to get what you want. I have searched the
Internet for the Windows APIs, but unfortunately, I haven't found them yet.
I have ever handled a post before, which focused on how to catch
Win32Exception "The RPC server is unavailable" when a network printer is
disconnected. The steps of the workaround are like blow.
1. Create a new class derived from PrintDocument. Add a flag in the new
class and override the OnQueryPrintSet tings method.
2. Create a new class derived from StandardPrintCo ntroller and override
the OnStartPrint method.
3. When an error is raised in the overridden OnStartPrint method, set the
flag in the print document to true.
For more information on this post, you may visit the following link.
http://msdn.microsoft.com/newsgroups...y=PrintPreview
Dialog+and+Win3 2Exception+%22T he+RPC+server+i s+unavailab+PRS oCo%40newsgroup s
.nospam
I am not sure whether the above workaround could solve your problem, but
give it a try please and let me know the result.
I will go on researching on your problems and will get it back to you ASAP.
I appreciate your patience.
Sincerely,
Linda Liu
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.