Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foxtools
Message
De
03/08/2000 06:26:48
 
 
À
02/08/2000 22:19:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00400193
Message ID:
00400265
Vues:
18
>On occasions my users get an error 2028...
>"API call caused an exception."
>
>It invariable occurs just after a print job, that might switch the default printer, where I call the Foxtools Words() function shortly afterward.
>
>I can work around it by running this code just before the error would normally occur.
>
>
onErr= on('ERROR')
>on error *
>words('abc def')		&& avoid "API Caused an exception" error
>on error &onErr
>
>Once Words() errors it runs fine the next time. Very weird! Has anyone seen this?
>What the heck has Words() got to do with printing??

Not much, but FoxTools makes use of a bunch of APIs that are associated with the GDI, that part of Windows dealing with video and printer drivers, and my guess is that one of the API calls used internally by FoxTools either has a problem with one of your graphics drivers, the state of the machine after returning from a call to something that calls the print or video driver and can't deal with the state of the machine, or a mismatch in the parameters passed to an API call between the OS version and the .DLL providing the service I recently ran into this trying to declare fprint() from MSVCRT and Win2K inside of VFP; try the following:
DECLARE INTEGER fwrite IN MSVCRT as _fw ;
   STRING @ lpBuffer, INTEGER nSize, INTEGER nCount, INTEGER nFileHandle)
declare INTEGER GetStdHandle IN KERNEL32 INTEGER nStdHandle
? _fw('Hello, World',1,12,GetStdHandle(-11))  && STDOUT
* blows up with 'DECLARE DLL call caused an exception'
Using _lwrite() from KERNEL32.DLL doesn't melt down; I've assumed it's a problem with the copy of MSVCRT.DLL on the Win2K box.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform