C++ dll to Call in VB
C / C++ / MFC
3
Posts
3
Posters
0
Views
1
Watching
-
Hai, I have a C++ dll,in which one of its function returns a pointer to the string array. How i can receive it in VB. Thanks in Advance
-
Hai, I have a C++ dll,in which one of its function returns a pointer to the string array. How i can receive it in VB. Thanks in Advance
c++ code: __declspec(dllexport)BSTR WINAPI RetMsg(void) { wchar_t szMsg[] = L"Hello, world!"; BSTR pMsg = SysAllocStringLen(szMsg, wcslen(szMsg) + 1); return pMsg; } __declspec(dllexport)ULONG WINAPI FreeMsg(BSTR pMsg) { return SysFreeString(pMsg); } VB code: Private Declare Function RetMsg Lib "msg.dll" Alias "RetMsg" () As String
-
Hai, I have a C++ dll,in which one of its function returns a pointer to the string array. How i can receive it in VB. Thanks in Advance