Click here to Skip to main content
15,897,704 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionArray Example Help Pin
StarTrekCafe13-Mar-09 16:40
StarTrekCafe13-Mar-09 16:40 
AnswerRe: Array Example Help Pin
Christian Graus14-Mar-09 8:26
protectorChristian Graus14-Mar-09 8:26 
AnswerRe: Array Example Help Pin
StarTrekCafe14-Mar-09 13:47
StarTrekCafe14-Mar-09 13:47 
Questionhow can i change messagebox background color in windows applications ? Pin
pramod251713-Mar-09 10:33
pramod251713-Mar-09 10:33 
AnswerRe: how can i change messagebox background color in windows applications ? Pin
Luc Pattyn13-Mar-09 12:34
sitebuilderLuc Pattyn13-Mar-09 12:34 
QuestionMaking changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 9:52
Kurt Richardson13-Mar-09 9:52 
AnswerRe: Making changes to an unmanaged struct from VB.NET Pin
Luc Pattyn13-Mar-09 10:23
sitebuilderLuc Pattyn13-Mar-09 10:23 
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 10:52
Kurt Richardson13-Mar-09 10:52 
Thanks Luc - that is kinda what I'm doing at the moment, and it works fine. Thanks for pointing out my overcautious useage of <marshallas...> - a good sign that I don't really know what I'm going Wink | ;-)

It is not clear to me why I really need to be able to change the C++ DLL created struct. The arguement that has been given to me is that the C++ developer does not want to make changes to the C++ library to deal with interacting with VB.NET as he wants it to use the code as is for Linux applications to. He also does not want to have a scenario whereby if the DLL is changed the application would have to be changed. Whereas I argue that I at least have to create a .NET wrapper DLL to use the functions and therefore will have to at least make changes to function names if they are changed - hardly a big bother (esp. as it enables me to work in .NET!).

Anyway, the library is for accessing a custom card on the PCI bus. When I call the function that updates the firmware on the card, it creates an struct that contains the various parameters that are needed to define a particular card. Most of these details come from the system, and only a few from the .NET application. I figured that an easy (although not exactly lean) approach would be to simply include the various card details in the call to the DLL function. However this would mean having a different function for the .NET DLL than as for the Linux DLL - i.e., more work for the C++ developer... apparently. If I'd been writing the control application in C++ then apparently I could easily import the class in the DLL and simply use the 'new' keyword to create new card struct objects. As the DLL is not COM or .NET compatible I don't believe I can do that and hence all this back and forth with the two copies of the struct.

Although I see no issue with the struct being created in the managed world (the .NET app) and then passing the pointer to the unmanaged world (the C++ DLL) (as you suggest), I'd like to be able to do it the other way around if possible... if nothing else it is some knowledge that might prove useful one day.

Many thanks, Kurt
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Luc Pattyn13-Mar-09 11:10
sitebuilderLuc Pattyn13-Mar-09 11:10 
GeneralRe: Making changes to an unmanaged struct from VB.NET Pin
Kurt Richardson13-Mar-09 11:38
Kurt Richardson13-Mar-09 11:38 
QuestionAsk For Image Location? [modified] Pin
Schoof13-Mar-09 9:05
Schoof13-Mar-09 9:05 
AnswerRe: Ask For Image Location? Pin
Dave Kreskowiak15-Mar-09 3:32
mveDave Kreskowiak15-Mar-09 3:32 
QuestionNEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
carlhaley13-Mar-09 7:11
carlhaley13-Mar-09 7:11 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Xmen Real 13-Mar-09 8:34
professional Xmen Real 13-Mar-09 8:34 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak13-Mar-09 8:44
mveDave Kreskowiak13-Mar-09 8:44 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak13-Mar-09 8:47
mveDave Kreskowiak13-Mar-09 8:47 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Christian Graus14-Mar-09 8:32
protectorChristian Graus14-Mar-09 8:32 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Dave Kreskowiak14-Mar-09 10:29
mveDave Kreskowiak14-Mar-09 10:29 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Eddy Vluggen13-Mar-09 8:47
professionalEddy Vluggen13-Mar-09 8:47 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
0x3c013-Mar-09 9:00
0x3c013-Mar-09 9:00 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Jon_Boy13-Mar-09 9:36
Jon_Boy13-Mar-09 9:36 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
EliottA14-Mar-09 6:04
EliottA14-Mar-09 6:04 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Christian Graus14-Mar-09 8:34
protectorChristian Graus14-Mar-09 8:34 
GeneralRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
0x3c015-Mar-09 6:39
0x3c015-Mar-09 6:39 
AnswerRe: NEED 1 VB PROGRAMMER TO DEVELEP SOME SAMLL PROGRAMES FOR MY BUSINESS Pin
Thomas Krojer16-Mar-09 5:31
Thomas Krojer16-Mar-09 5:31 

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.