| View previous topic :: View next topic |
| Author |
Message |
Gastiflex Power User

Joined: 29 Mar 2006 Posts: 70 Location: Toulouse - France
|
Posted: Tue Apr 04, 2006 7:14 am Post subject: Basic String / C++ dll |
|
|
Hi,
In a OOo macro, I have to call a C++ dll. I have to send a String from the macro to the dll, but it seems that Basic strings are not compatible with the char* C++ type.
Does anybody know how can I do the conversion (in my macro or in my C++ program) ?
Thank you. |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Gastiflex Power User

Joined: 29 Mar 2006 Posts: 70 Location: Toulouse - France
|
Posted: Wed Apr 05, 2006 1:18 am Post subject: |
|
|
Yes, I can modify and re-compile the dll source.
The other problem I have is when I try to send an array from basic to the dll.
In basic I send a Long array and in C++ I catch Int array (so the element's size matches between basic and C++).
The sending of the first element of the array works (I check that the addresses of the first element in basic and in C++ are the same), but the I can't get the others elements.
I think the memory allocation in basic in not the same that in C++, but I don't know how to solve this (except by writing the array in a file). |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
|