Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE function : Foxpro vs VB
Message
From
27/07/2005 11:48:36
Martin Joncas
Foxprostudio.Com
Quebec, Canada
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
DECLARE function : Foxpro vs VB
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01036272
Message ID:
01036272
Views:
45
Hi ,

Im new with foxpro, I need to translate a DECLARE function form VB to Foxpro. If you can Help me on this it would be greatly appreciated.

here is the code in Visual Basic.


'*{
Public Declare Function myfunction Lib _
"myfile.dll" _
(ByVal Interfacenum As Byte, ByVal DeviceNum As Byte, ByRef buffer As Byte) As Integer

Dim Interfacenum As Byte
Dim Result As Integer
Dim DataBuf(16) As Byte

Result = myfunction(Interfacenum, 0, DataBuf(0))
'*}


I try this :
Declare Integer myfunction IN "myfile.dll" Integer Interfacenum, Integer DeviceNum, Integer @buffer

DIMENSION DataBuf(16)
store 0 to DataBuf
Result = myfunction (0, 0, @DataBuf)

no error but the content of DataBuf is not good??
What im doing wrong here ?
Can you help me?


Many Thanks
Anna K.
Next
Reply
Map
View

Click here to load this message in the networking platform