FIX: "Use of Transgressed Handle" with HP DeskJet+ Driver

ID: Q97631

2.00 2.50 MS-DOS kbprg kbfixlist kbbuglist

The information in this article applies to:

SYMPTOMS

The SET PDSETUP TO command will result in the error "Use of transgressed handle" if the HP DeskJet+ printer driver is set as the default printer driver (or under certain circumstances, just if this printer driver is selected) and output is sent to the printer.

RESOLUTION

To work around this problem, either don't set this printer driver as the default printer driver or change the default DRIVER2.PLB to DRIVER.PRG. This can be done by modifying GENPD.PJX and editing GEN_PD.PRG to include the following changes:

   * If you would like to use the XBase version of the printer driver,
   * uncomment the line below
        _PDRIVER = "DRIVER.PRG"
   * and make the line below a comment.
   *     _PDRIVER = "DRIVER2.PLB"

This change will slow down printing but should be more reliable. After you edit GEN_PD.PRG, you must rebuild GENPD.APP.

STATUS

Microsoft has confirmed this to be a problem in FoxPro versions 2.0 and 2.5 for MS-DOS. This problem was corrected in FoxPro version 2.5a for MS-DOS.

MORE INFORMATION

Steps to Reproduce Problem

1. Set up a printer driver for the HP DeskJet+.

2. From the File menu, choose Printer Setup, and set this printer

   driver as the default printer driver.

3. Send output to the printer. For example, type the following in the
   Command window:

      TYPE \foxpro25\tutorial\step1.qpr TO PRINT

4. Type the following in the Command window:

      SET PDSETUP TO

Additional reference words: FoxDos 2.50 pdriver genpd pdsetup _pdsetup hp plus buglist2.00 buglist2.50 fixlist2.50a KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: Solution Type : kbfix

Last Reviewed: September 22, 1997