Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE and USING API HOW?
Message
From
28/01/1999 20:48:23
Tossapon Nanagara
AstraZeneca (Thailand) Ltd.
Bangkok, Thailand
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
DECLARE and USING API HOW?
Miscellaneous
Thread ID:
00181630
Message ID:
00181630
Views:
46
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
Map
View

Click here to load this message in the networking platform