String is the one think I have never tried as a array parameter. I think
it should work fine. Remember to build the string in MapBasic first with
the string$() function.

For i = 1 to UBound(arr)
  arr(i) = String$(256," ")
Next

before sending it to the c++ dll for updating.

Arrays of custom types gave I up on years ago, I don't think it is
possible.

(..but what I would like is being able to use managed libraries from
MapBasic:)

HTH,

Jakob Lanstorp
Software Consultant
Geographical Information & IT 

COWI A/S
Odensevej 95
DK-5260 Odense S

Tel  +45 6311 4900
Fax  +45 6311 4949
Mob  +45 5050 8087
E-mail [EMAIL PROTECTED]
http://www.cowi.dk
http://www.cowi.com


-----Original Message-----
From: Jorge Gil [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 18, 2005 6:41 PM
To: [email protected]
Subject: MI-L Passing arrays into C++ DLL function (and back)


Hi List,
 
I'm having trouble with passing arrays as reference from MapBasic into a
C++ DLL.
Simple variables like integer, float and string work fine and can be
passed, altered and returned. I can also pass arrays of integers and
floats as reference to change them. However I'm having trouble with
string arrays, I can pass them but not as reference to change their
values. Furthermore I would like to pass an array of custom type/struct
into the
C++ function as reference and also alter its values.
 
Has anyone managed to do the above array operations?
What are the tricks and issues that I should be aware of?
 
Thanks,
Jorge
 
___________________

 

Jorge Gil

Simulation Developer

 

SPACE SYNTAX

<http://www.spacesyntax.com>  


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 18383

Reply via email to