Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for diskettes
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00008888
Message ID:
00009047
Vues:
36
Ken, thank you for your response. I appreciate your time. I have been working with the code you gave me below. I have it working except I still have to respond to what I believe are foxpro errors. Such as 'Input/output operation error'. I set an ON ERROR * to snub foxpro which worked. What I was wondering was have I misread the SetErrorMode(1) part? It seems to work the same way with a 1 or a 2. Has fox already intercepted the system error?

Again thanks I am farther along then I have been. <s>

BTW What API book are you using?

-----------------------
>I'm not sure if this will help any, but there is an API call that will
>supress the "Disk is not in Drive" error message...
>
>Example:
>
>DECLARE SetErrorMode IN "kernel32.dll" INTEGER test
>DECLARE INTEGER GetLastError IN "Kernel32.dll"
>DECLARE INTEGER FormatMessage IN "kernel32.dll" INTEGER flags, INTEGER
>notused, INTEGER error, INTEGER locale, STRING @buffer, INTEGER bufsize,
>INTEGER notused
>
>= SetLastError(0)
>= SetErrorMode(1)
>nFiles = ADIR(afiles, "A:\*.*")
>IF nFiles = 0
> nLastError = GetLastError()
> cError = SPACE(255)
> = FormatMessage( 4096, 0, nLastError, 0, @cError, 255, 0)
> cError = ALLTRIM(STRTRAN( cError, CHR(0)))
> WAIT WINDOW "Error Code: " + ALLTRIM(STR(nLastError)) + CHR(13) + "Error:
>" + cError
> = SetErrorMode(1)
> = SetLastError(0)
>ENDIF
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform