Re: Printing GPF

From: Rick Bean (rgbean_at_unrealmelange-inc.com)
Date: 10/04/04

  • Next message: swdev2: "Re: printing to hp printers in VFP 6.0"
    Date: Mon, 4 Oct 2004 10:33:06 -0400
    
    

    Jeff,
    Your "answer" may be in http://support.microsoft.com/default.aspx?scid=kb;en-us;183522 - "FIX: Divide by Zero Creates Err with Third-Party Print Drivers". But since FPW can't directly call 32-bit DLL's you'll need to use CALL32. The CALL32.ZIP file is on Rick Strahl's site at http://www.west-wind.com/wwfp2pd.htm, and includes the necessary files and some demo code. I've tried the following (which seems to work):

    SET PROCEDURE TO CALL32
    IF !("FOXTOOLS" $ SET("LIBRARY"))
       SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL" ADDITIVE
    ENDIF
    CLEAR

    * Win32 usage
    *
    * DECLARE _fpreset IN msvcrt20.dll
    * =_fpreset()

       lhcall32=reg32("_fpreset", "msvcrt20.dll", "")
       lh_fpreset=RegFP("", "L")
       ln_fpreset=callfn(lh_fpreset, lhcall32)

    Note: Back when I was using this, I found that while CALL32 works for many 32-bit API calls, others can fail and "hang" the program / workstation - use only when necessary and test on all potential OS platforms.

    Rick

    "Jeff Mackeny" <me@me.com> wrote in message news:O9rvjhbpEHA.516@TK2MSFTNGP09.phx.gbl...
    > Greetings to everybody,
    >
    > I just changed one machine on a network from Windows 98 to Windows XP, they
    > use the SBT accounting system, I know nothing about SBT or FoxPro, I believe
    > they have Vision point 2000 with FoxPro 2.6, basically the app is running
    > perfectly fine, with the exception of printing, any print job to LPT1
    > causes a GPF and closes out the program, that machine has a HP LasterJet
    > 4050 connected locally, I'm able to print to file and open with notepad but
    > not directly to LPT1, this is obviously a major pain and for the time being
    > forced to halt changing all other machine on the network to XP, the worst
    > part is that I don't even know where to start looking, I would assume that
    > LPT1 is LPT1 regardless of the OS, I have never seen a problem with any
    > 16bit app printing to LPT1 so why should FoxPro be any different, the only
    > possibility is the driver, does FoxPro use the windows driver, or is sending
    > directly to LPT1, if FoxPro tries to interact with the driver I can why this
    > would be happening and the question becomes, which driver should be used, I
    > tried changing it to HP LasterJet 4 with no success, I'm personally
    > convinced that the problem is with the driver because I captured LPT1 to a
    > network printer also a 4050 with no success. So if FoxPro 2.6 is simply not
    > able to communicate with XP's driver then my guess would be to either
    > finding a working driver, or perhaps bypass XP's driver by forcing FoxPro
    > to send the print job directly to LPT1 rather then the driver if that's even
    > possible.
    >
    > Oh forgot to mention, when I preview it shows up fine.
    >
    > Thanks
    >
    >
    >
    >
    >
    >


  • Next message: swdev2: "Re: printing to hp printers in VFP 6.0"

    Relevant Pages

    • Re: Printing GPF
      ... version and Windows XP. ... >I tried the LaserJet 4 driver I still get a GPF when I print. ... >>> they use the SBT accounting system, I know nothing about SBT or FoxPro, ... >>> with notepad but not directly to LPT1, this is obviously a major pain ...
      (microsoft.public.fox.vfp.reports.printing)
    • Re: Printing GPF
      ... If available, use a the Windows printer driver instead of the HP, or look ... > they use the SBT accounting system, I know nothing about SBT or FoxPro, I ... > LPT1 causes a GPF and closes out the program, ...
      (microsoft.public.fox.vfp.reports.printing)
    • Re: HP LaserJet 4L and Windows XP Professional
      ... I have the same problem with an HP LJ III driver. ... "pass-through" connectors. ... If that doesn't work, the problem probably is the parallel port itself, ... completely uninstalled the printer and removed LPT1 from the device ...
      (microsoft.public.windowsxp.print_fax)
    • Printing GPF
      ... I just changed one machine on a network from Windows 98 to Windows XP, ... use the SBT accounting system, I know nothing about SBT or FoxPro, I believe ... perfectly fine, with the exception of printing, any print job to LPT1 ... possibility is the driver, does FoxPro use the windows driver, or is sending ...
      (microsoft.public.fox.vfp.reports.printing)
    • Re: Access import off Fox Pro Tables
      ... I am having an issue installing the visual fox pro driver. ... and try to install from the link you provided, I am getting the error "The ... How can I get this VFP odbc driver? ... > Start with the latest ODBC driver for FoxPro and Visual FoxPro, ...
      (microsoft.public.access.externaldata)