Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DECLARE and USING API HOW?
Message
De
28/01/1999 20:48:23
Tossapon Nanagara
AstraZeneca (Thailand) Ltd.
Bangkok, Thailande
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
DECLARE and USING API HOW?
Divers
Thread ID:
00181630
Message ID:
00181630
Vues:
44
I try to use win32api by re-create from VB code -

Const STD_INPUT_HANDLE& = -10
Const STD_OUTPUT_HANDLE& = -11
Declare Function GetStdHandle Lib "kernel32" (ByVal nStdHandle As Long) As Long

Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal lpOverlapped As Long) As Long
and the they call the function
STDIN = GetStdHandle(STD_INPUT_HANDLE)
Call ReadFile(STDIN, bPostData(1), Val(ContentLength), lReaded, 0)

I try to do this in VFP but cant get it work would anyone give me some suggest ;-
My code
DECLARE Long GetStdHandle IN KERNEL32 ByVal nStdHandle As Long
DECLARE long ReadFile IN win32api ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal lpOverlapped As Long
PUBLIC hnSTDOUT,hnSTDIN
hnSTDOUT=GetStdHandle(@STD_OUTPUT_HANDLE)
!!! that stop with error 'too many parameters'

thanks in advance
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform