Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>prt_load()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PRT_LOAD()
   Specifies the printer.

   Syntax
         nDevID = PRT_LOAD(nDevID,cPortName)

   Arguments
         nDevID      Specifies the printer.
         cPortName   Specifies the name of the output device to use.
                        LPT1,LPT2, LPT3 - printer ports
                        COM1, COM2      - serial ports
                        FileName        - any other name

   Returns
         nDevID      If the operation is successful the printer ID is
                     returned, otherwise 0 is returned and the error is set.

   Description
         PRT_LOAD() is used to specify the printer being used and the output
         channel.

         The nDevID argument is an integer specifying the printer. This
         number is obtained with PRX_EDIT.EXE noting the ID# field for the
         desired printer.

         The cPortName argument is a string specifying the name of the output
         device to use (e.g., "LPT1"). You can also send the output to a disk
         file and then send the file to the printer at a later time.

            COPY "PRT.DAT" LPT1:/B (copy with binary switch set)

         This function initializes the data record which describes how to dump
         a screen to your printer. Once this is set, all future calls for a
         screen printer use this information until this function is used to
         set a new printer or destination.

         Although you'll usually call this function only once in a program,
         you may need to change it during the program if you have multiple
         printers hooked up to the system or if you want to direct a screen
         printed to a disk file.
         If all goes well, these functions will return a 1, otherwise 0 is
         returned and the error is set.

         Possible Errors:

         1 - The printer ID# could not be found in the list of printer
             records.
         2 - A file could not be opened for 'port_name'.
         3 - A few hundred bytes of ram need to be dynamically allocated for
             the screen dump. This error indicated that the memory could not
             be allocated.

See Also: PRT_HEADER() PRT_LIST()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson