RE: FaxSendDocument blocking
- From: Dirk Zabel <dzabel@xxxxxxxxxxxxxxxx>
- Date: Thu, 1 Mar 2007 00:31:10 -0800
""Jeffrey Tan[MSFT]"" wrote:
Hi Dirk,Hi Jeffrey,
Below is the further comment from one of the Fax developer:
"This is how printing happens:
1) Program calls FaxSendDocument with text file as parameter.
2) FaxSendDocument internally calls ShellExecuteEx on the print verb.
3) The handling application (in this case notepad), starts up and starts
issuing GDI calls.
4) As the application calls the printer APIs, since the document is being
printed to the fax printer, the fax printer drivers functions get called.
5) FaxSendDocument waits for an event from the print driver saying either
the printing is completed successfully or aborted
6) The wait period is for 5 minutes.
7) After the document printing is done, notepad process will exit.
FaxSendDocument thread will be unblocked when it gets the event.
8) After that it calls Fax_SendDocument on the server and submits the job
to the fax queue.
9) FaxSendDocument returns after that.
10) Sending of fax is asynchronous.
This is what happened:
1) When the printer is offline, printing gets stalled [spooled but not
printed].
2) Meanwhile our FaxSendDocument thread is waiting on the event from the
print driver which never comes [5 minutes is a long time].
3) If people actually wait for 5 minutes, they will get an error saying
FaxSendDocument failed.
4) The basic problem is that the printer offline case is not handled by our
printer driver.
5) The best possible solution would have been return an error if such a
situation occurred.
The recommendation for the application developer is: Check if the fax
printer is offline, and if so, don't call FaxSendDocument. Basically fail
the operation."
Hope it helps.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
This clarifies what is happening. And, as the fax developer assumed
correctly, no one waited 5 minutes. Argh.
Best regards and thank you very much.
Dirk
.
- Follow-Ups:
- RE: FaxSendDocument blocking
- From: "Jeffrey Tan[MSFT]"
- RE: FaxSendDocument blocking
- References:
- RE: FaxSendDocument blocking
- From: "Jeffrey Tan[MSFT]"
- RE: FaxSendDocument blocking
- Prev by Date: Re: Semaphore limitations
- Next by Date: Re: Semaphore limitations
- Previous by thread: RE: FaxSendDocument blocking
- Next by thread: RE: FaxSendDocument blocking
- Index(es):