Information générale
Catégorie:
Fonctions Windows API
Titre:
DECLARE and USING API HOW?
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement