Information générale
Catégorie:
Fonctions Windows API
>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.
passing an array of floats is a little complicated
asz you need to translate each float into its presentation and pass it all in a string
there is an example of passing an array of integers in the solution app that ships with VFP5.0
Arnon
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement