Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling c++ dll passing arrays by reference
Message
From
12/11/1996 15:20:17
 
 
To
12/11/1996 14:54:47
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00012057
Message ID:
00012062
Views:
55
thanks edward,
okay with passing a single value by reference, but what i need to do is pass in an array, such as an array of floats.

Here's the C++ declaration:
DLL_FUNCTION int ShapeVerifyEntryPoint( char *shapeId, int numDims, float dims[MAX_DIM] )


Here's my fox code:
DECLARE INTEGER ShapeVerifyEntryPoint IN shapedll.dll AS ShapeVerify STRING @shapeid, INTEGER numdims, DOUBLE[10] the_dims

#DEFINE MAX_DIMS 10

LOCAL lcShapeID, lnNumDims, laDims, lnReturn

lcShapeID = "52"
lnNumDims = 1
DIMENSION laDims[lnNumDims]
laDims[1] = 20.0

lnReturn = ShapeVerify(lcShapeID, lnNumDims, laDims)

RETURN

The results of running this is that FoxPro bombs.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform