Solved

SetAbortProc vs. AbortDoc

Posted on 2002-05-13
3
290 Views
Last Modified: 2010-05-18
I know the syntax of both of these functions but can't find any place in the MS literature where it states when one should be used over the other.

From what I've been able to discern with tests it appears as though I should I use SetAbortProc to handler print spooling errors and AbortDoc to handle user cancellation. Anyone know for sure?
0
Comment
Question by:tma050898
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
Zoppo earned 100 total points
Comment Utility
Hi tma,

you should use AbortDoc if you want to programmatically cancel the print job
for any reason, i.e. if you provide the user with a print-progress dialog where
the user can press 'Cancel'. Calling AbortDoc in this case ensures that i.e.
not half of the document is printed when the user presses 'Cancel'.

The SetAbortProc should be used to handle the case printing was cancelled
by the OS, i.e. due to lack of memory, missing paper, broken connection
to the printer a.s.o. With this you can i.e. define a function which asks the
user to 'Retry' or to 'Cancel' the print job.

So, your statement '... I should I use SetAbortProc to handler print spooling errors
and AbortDoc to handle user cancellation' is absoluteley correct.

hope that helps,

ZOPPO
0
 
LVL 3

Author Comment

by:tma050898
Comment Utility
Thanks for the confirmation!
0
 
LVL 30

Expert Comment

by:Zoppo
Comment Utility
You're welcome,

have a nice day,

regards,

ZOPPO
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now