Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with WriteFile
Message
De
22/10/2003 16:51:58
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Help with WriteFile
Divers
Thread ID:
00841292
Message ID:
00841292
Vues:
43
Hi,

I'm having problems with the following code:

LOCAL lnWrite
lnWrite = 0

IF WriteFile(lnFile, lcVal, 1, @lnWrite, 0) <> 0

llRetVal = .T.
ENDIF

I'm getting a data mismatch error and I don't know why. Am I passing something incorrectly to writefile? Could be, I had a hard time finding examples on how to use writefile.

lnFile is the file handle, its a numeric value.
lcVal is just a single character.

Here is how I declare the API function:

DECLARE INTEGER WriteFile IN kernel32;
INTEGER hFile,;
INTEGER lpBuffer,;
INTEGER nBt2Write,;
INTEGER @lpBtWritten,;
INTEGER lpOverlapped

Thanks,
Chris
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform