arjfca
07-11-2013, 11:38 AM
Hello
First post on the forum
A dll collection is share between Excel and Multicharts, a charting software. To exchange data between those two application, I'm using a DLL collection call Global Variable.
I got no problem to read and write numeric global variable. The problem occur when manipulating strings.
In Excel, I could read the global Variable, but If I modify it, I got erroneous result. The dll as been written in C++. I read theat C++ is using ASCII with "LSTR" format while Excel is using Unicode with "BSTR" format.
I suspect that this is the cause of the problem
Any idea on how to resolve the problem?
Martin
Public Declare Function GV_SetNamedString Lib "C:\Program Files (x86)\TS Support\MultiCharts\GlobalVariable.dll" _
(ByVal strElementLoc As String, ByVal intSetValue As String) As Long
Public Declare Function GV_GetNamedString Lib "C:\Program Files (x86)\TS Support\MultiCharts\GlobalVariable.dll" _
(ByVal strElementLoc As String, ByVal strOther As String) As String
First post on the forum
A dll collection is share between Excel and Multicharts, a charting software. To exchange data between those two application, I'm using a DLL collection call Global Variable.
I got no problem to read and write numeric global variable. The problem occur when manipulating strings.
In Excel, I could read the global Variable, but If I modify it, I got erroneous result. The dll as been written in C++. I read theat C++ is using ASCII with "LSTR" format while Excel is using Unicode with "BSTR" format.
I suspect that this is the cause of the problem
Any idea on how to resolve the problem?
Martin
Public Declare Function GV_SetNamedString Lib "C:\Program Files (x86)\TS Support\MultiCharts\GlobalVariable.dll" _
(ByVal strElementLoc As String, ByVal intSetValue As String) As Long
Public Declare Function GV_GetNamedString Lib "C:\Program Files (x86)\TS Support\MultiCharts\GlobalVariable.dll" _
(ByVal strElementLoc As String, ByVal strOther As String) As String