Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE DLL problem
Message
From
12/11/2001 04:45:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/11/2001 20:40:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00580332
Message ID:
00580368
Views:
20
>Hi:
>
>This is a VB function which I perform in VFP without any success.
>
>
>
>Private Declare Function deruter Lib RET32.dll" _
> ByVal tjd As Double, _
> ByVal ipl As Long, _
> ByVal iflag As Long, _
> ByRef xdatos As Double, _
> ByVal serr As String _
> ) As Long ' xdatos must be the first value of an 6 elements array
>
> ' serr must be able to hold 256 bytes
>
>
>
>dimension xdatos[6]
>xdatos[1]=0.0000
>ipl=1
>tjd =274489525.52555
>serr=replicate(" ",256)
>snam=" "
>iflag=256
>
>Declare LONG deruter IN RET32.dll ;
>as calcdatos ;
>double tjd , ;
>long ipl , ;
>long iflag ,;
>double @xdatos ,;
>STRING serr
>
>iflgret=deruter(tjd,ipl,iflag,&xdatos,serr)
>
>On issuing this last I got error.
>
>Had someone experience in DLL returning double values in arrays ?
>
>Thanks.
>
>Alejandro Fernandez

Alejandro,
When passing arrays to API make your array a string. ie: a 6 doubles array :

lcDoubleArray = replicate(chr(0),8*6)

myDLL(..., @lcDoubleArray..)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform