Click here to Skip to main content
15,909,835 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionAccessing DLL C++ with string pointer using VB.NET Pin
TremaHD4-Feb-10 7:00
TremaHD4-Feb-10 7:00 
AnswerRe: Accessing DLL C++ with string pointer using VB.NET Pin
Luc Pattyn4-Feb-10 7:30
sitebuilderLuc Pattyn4-Feb-10 7:30 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD4-Feb-10 12:38
TremaHD4-Feb-10 12:38 
AnswerRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan4-Feb-10 8:42
mveRichard MacCutchan4-Feb-10 8:42 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD4-Feb-10 12:36
TremaHD4-Feb-10 12:36 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan4-Feb-10 12:50
mveRichard MacCutchan4-Feb-10 12:50 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD4-Feb-10 13:06
TremaHD4-Feb-10 13:06 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan4-Feb-10 21:53
mveRichard MacCutchan4-Feb-10 21:53 
Your original post shows the following extract from the header file:
#define API_SPEC     __declspec(dllexport)
void API_SPEC API_getApiVersion (std::wstring *version) //[out] API release ID

Since you cannot directly convert a VB.NET String to a C++ std::wstring* I think the only solution is to write a C++ interface that can take a pointer to a StringBuilder object. This code could then call the API passing a pointer to a std::wstring which it will copy to the StringBuilder before returning to the VB.NET code.

Comments, Luc?

MVP 2010 - are they mad?

GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
MicroVirus5-Feb-10 11:09
MicroVirus5-Feb-10 11:09 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD5-Feb-10 14:27
TremaHD5-Feb-10 14:27 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan5-Feb-10 22:40
mveRichard MacCutchan5-Feb-10 22:40 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
MicroVirus8-Feb-10 0:31
MicroVirus8-Feb-10 0:31 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan8-Feb-10 1:55
mveRichard MacCutchan8-Feb-10 1:55 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Luc Pattyn4-Feb-10 12:56
sitebuilderLuc Pattyn4-Feb-10 12:56 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan4-Feb-10 21:54
mveRichard MacCutchan4-Feb-10 21:54 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Luc Pattyn4-Feb-10 23:32
sitebuilderLuc Pattyn4-Feb-10 23:32 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan5-Feb-10 0:42
mveRichard MacCutchan5-Feb-10 0:42 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD5-Feb-10 2:26
TremaHD5-Feb-10 2:26 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET [modified] Pin
Luc Pattyn5-Feb-10 2:59
sitebuilderLuc Pattyn5-Feb-10 2:59 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
Richard MacCutchan5-Feb-10 4:10
mveRichard MacCutchan5-Feb-10 4:10 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
TremaHD5-Feb-10 14:25
TremaHD5-Feb-10 14:25 
QuestionLocalization support for existing applications Pin
Md Saleem Navalur4-Feb-10 2:56
Md Saleem Navalur4-Feb-10 2:56 
AnswerRe: Localization support for existing applications Pin
R. Giskard Reventlov4-Feb-10 3:06
R. Giskard Reventlov4-Feb-10 3:06 
GeneralRe: Localization support for existing applications Pin
Md Saleem Navalur4-Feb-10 5:43
Md Saleem Navalur4-Feb-10 5:43 
AnswerRe: Localization support for existing applications Pin
Not Active4-Feb-10 6:50
mentorNot Active4-Feb-10 6:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.