Solved

SetAbortProc vs. AbortDoc

Posted on 2002-05-13
3
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 31

Accepted Solution

by:
Zoppo earned 100 total points
ID: 7006296
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
ID: 7012690
Thanks for the confirmation!
0
 
LVL 31

Expert Comment

by:Zoppo
ID: 7013184
You're welcome,

have a nice day,

regards,

ZOPPO
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

707 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