× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



>
> If I try to print I get the error "StartDoc() ended in error".  Looking
> at the source this is when the call to StartDoc() fails.  I added in a
> call to GetLastError, and it comes back as error 3003.  Looking this
> error code up at msdn it says "A StartDocPrinter call was not issued.".

Strange.   According to the docs I have here, you either need StartDoc()
*or* StartDocPrinter().   The difference is whether you plan to use GDI
calls, or whether you plan to output the printer's escape codes directly.

lp5250d, for example, outputs the escape codes directly because it gets
them from the AS/400's Host Print Transform function...    tn5250 is using
the GDI calls, so uses StartDoc.

>  Looking at the source I don't see a call to that function.  Should
> there be one?  I won't claim to know anything, but if StartDocPrinter
> isn't needed, any ideas why I get this error?
>

No, I have no idea why you get that error.   It works nicely on my system,
obviously...   I've run it at home, where I have a Win XP Pro machine with
a Canon BJC620 printer, and at work where I've got a WinXP Pro with an
HP LaserJet 4L, and also other various HP Lasers on the LAN.   Works with
all of them.

Is this a difference between XP and earlier Windows?

Or, maybe there's a variable somewhere that I'm not initializing that's
causing the device handle that's returned from the PrintDlg function to
have problems sporadically?

I wonder if there's any way I can reproduce this problem, so I can
research it further?


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.