PrintTextFile

int PrintTextFile (char filename[], char outputFile[]);

Purpose

Prints a text file. You can direct the output to the printer or to a file. If you pass an empty string ("") to the outputFile parameter, this function prints the file to the default printer.

When you print a file, the following occurs:

While this function is printing, it blocks any other thread in your program that attempts to print.

Remember that LabWindows/CVI maintains only one copy of the print attributes you set with SetPrintAttribute. Thus, when you change a print attribute in one thread, the change affects printing functions you subsequently call in other threads.

Parameters

Input
Name Type Description
filename string Name of the file to print.

filename can be a complete pathname or a simple filename. If the name is a simple filename that contains no directory path, the file is loaded from the directory that contains the executable.
outputFile string Name of a file to which to direct the output.

If the name is not empty, the output is redirected to the file. If you pass an empty string (""), this function prints the file to the default printer.

If outputFile is a not a complete pathname, it is created relative to the current working directory.

Return Value

Name Type Description
status integer Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Code Error Message String
xx Success