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

.NET (Core and Framework)

 
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 
GeneralRe: Accessing DLL C++ with string pointer using VB.NET Pin
MicroVirus5-Feb-10 11:09
MicroVirus5-Feb-10 11:09 
Hello all,

I think the solution here is to use the COM interoperability provided by dotNET. Note that I have not yet tried this myself, but I believe you have to use MarshallAs to ensure that VB.NET, in this case, converts the string before the call to a LPWSTR and after the call converts it back to a VB string.
Whether you have to use a stringbuilder or a string here I'm not sure, but my best guess is that you can use a normal string.
Here's a msdn link that might help, though it's not entirely clear to me:
http://msdn.microsoft.com/en-us/library/s9ts558h(VS.71).aspx
I'm not currently in a position to access VB.NET (or any other .NET language for that matter), so I'm sorry I can't give you the complete code.

Maybe one of the other repliers can help you out more.

Good Luck,
MicroVirus
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 
QuestionBuilding a Compiler using Reflection.Emit Pin
PP19724-Feb-10 0:42
PP19724-Feb-10 0:42 

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.