vb-array an dll übergeben!
-
Ich versuche nen array von Vb an ne C++ Dll zu übergeben aber das klappt net :-(Ich kriegs einfach nicht hin hier mein code:
VB:
Declare Function list_dlg Lib "M:\src\w\v46\win\ea-mfc\release\ea-mfc.dll" (ByRef n_icolumns As Integer, ByRef n_irows As Integer, ByRef szTitles() As String) As Integer
...
ReDim szTitles(10)
For fieldindex = 1 To 10
szTitles(fieldindex) = "TITLES"
Next fieldindex
rtc2 = list_dlg(5, 4, szTitles())
....C++
...
DLLEXPORT int (__stdcall list_dlg) (int n_icolumns,int n_irows,
BSTR ** titles /* ,BSTR** entities*/)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
list * dlgbox = new list;
MessageBox(NULL,(LPSTR)(*titles[1]),"TITEL",MB_OK);
....
-
Du weißt aber, dass
BSTR ** das gleiche bedeutet wie OLECHAR*** ?
-
mittlerweile schon aber selbst mit einem * funzt es nicht! ich verzweifle!!
-
Sorry
Weiß leider nicht, wie VB sowas handelt