Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GPF errors using HP Printer drivers

Status
Not open for further replies.

androidc

Programmer
May 27, 2003
13
CA

Does faq184-2265 (How to prevent GPF error using HP printer drivers) apply to foxpro 2.6?

 
Androidc,
While it's not that simple, it can be done in FPW. 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 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

* 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top