In a dll for a printer report I get an error 51 in my
error handler. It doesn't always happen, however.
I have a dialog that allows the user to choose a a print
device (among other things) 1,2,3 for LPTn, or C for screen,
or D for disk file, or W for windows only/network printer.
Now I do not get the error when I choose C.
This makes it open a file like "report.txt" then when
the report is "printed" it does a shell "notepad report.txt"
This works fine. But if i open the file as "LPT1:" for example
(user chooses 1) then I get the error 51 although the report
seems to print ok.
Since the error routine is not called when the error occurs but
rather at the end, I'm not sure how to proceed in trying to
track this down. I can get around it using errclear but would
rather not have to. Any suggestions. :0
Thanks
------------------
error handler. It doesn't always happen, however.
I have a dialog that allows the user to choose a a print
device (among other things) 1,2,3 for LPTn, or C for screen,
or D for disk file, or W for windows only/network printer.
Now I do not get the error when I choose C.
This makes it open a file like "report.txt" then when
the report is "printed" it does a shell "notepad report.txt"
This works fine. But if i open the file as "LPT1:" for example
(user chooses 1) then I get the error 51 although the report
seems to print ok.
Since the error routine is not called when the error occurs but
rather at the end, I'm not sure how to proceed in trying to
track this down. I can get around it using errclear but would
rather not have to. Any suggestions. :0
Thanks
------------------
Comment