|
|||||||
| Programming, Coding, (Web)Design Discuss all your programming or design needs with likeminded people. |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
HardwareHeaven Newbie
Join Date: Aug 2005
Posts: 10
Rep Power: 0 ![]() |
How do I declare a string and pass it from a Visual Basic GUI to a C++ DLL?
How do I declare a string and pass it from a Visual Basic GUI to a C++ DLL?
Now I am debugging successfully. I can debug either on the Visual Basic end or I can debug on the C++ side by using the DLL's project file and declaring the compiled VB code as the launching executable. I have narrowed the problem down to the way that I am declaring and passiing the string variables. |
|
|
|
|
|
#2 |
|
Delete Me
Join Date: Mar 2004
Posts: 14,648
Rep Power: 0 ![]() ![]() ![]() ![]() ![]() ![]() |
oooh.
I really have no idea...it SOUNDS like something you'll have to use a wrapper on to pass, although you mihgt can get away with doing some sort of conversion upon reading it instead. And while this is a horrible answer, you may have some luck trying visual C# as well, as it has all the gui aspects of VB, and has similar power to C++ |
|
|
|
|
|
#3 |
|
DriverHeaven Newbie
Join Date: Feb 2005
Posts: 14
Rep Power: 0 ![]() |
this is one of the main issues that microsoft has attempted to solve with their .net framework.
the other way is to use symbol resolution and binding to a type that's recognizable by both ends. declare a char array and export it as a public symbol in your dll, and use whatever vb's equivalent to __declspec(dllimport) is to import it into your application. |
|
|
|
|
|
#4 |
|
DriverHeaven Junior Member
Join Date: Mar 2006
Posts: 30
Rep Power: 0 ![]() |
It would help if you told us what version of C++ and VB you are using.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|