General information
Category:
Windows API functions
Title:
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only