LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PrintTextBuffer and PrintTextFile always returns SUCCESS (0).

I'm trying to test a printer port by printing a buffer or file to a printer. PrintTextFile and PrintTextBuffer never return an error (always SUCCESS) regardless of state of printer. However, Windows XP does recognize the errors. Is there any way to get the error return codes for these two CVI commands?
0 Kudos
Message 1 of 2
(2,770 Views)
Hi,

The Print functions in CVI use the GDI printer interfce exposed by Window. When you do a call to PrintFile CVI calls Windows to print the file, it does not writes the commands directly to the parallel port.

I am assuming that in this case, Windows XP prints the file to a buffer correctly, letting the function finish without errors; then Windows tries to print this out and reports the errors.

If you need to access the parallel port you can use the inp and outp functions. here is an example on how to do it.

I hope this helps, let me knwo if you have further questions.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 2
(2,770 Views)