Solved

Calling C++ Functions from VB.Net - Tutorials

Posted on 2013-10-28
7
357 Views
Last Modified: 2013-11-07
Can anybody point me to tutorials or information on how to call C++ functions in VB.Net?

I have a capture card SDK with a bunch of C++ functions that I would like to test from VB.Net.

Many thanks.
0
Comment
Question by:jrlittle86
  • 2
7 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 39606680
The easiest way to do that would probably be P/Invoke. See http://msdn.microsoft.com/en-us/library/aa446536.aspx ("An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework") which demonstrates how to make these calls by using the Windows API, which is very similar to calling 3rd party SDKs. You'll also find some more sample code at http://code.msdn.microsoft.com/VBPInvokeDll-6dade03d ("VB app P/Invokes a native DLL (VBPInvokeDll)").
0
 
LVL 15

Expert Comment

by:Ess Kay
ID: 39606882
why? those were links to tutorials on how to cross program c++ from vb.net
0
 
LVL 86

Expert Comment

by:jkr
ID: 39617258
OK, so you are not asking a question when something is/was unclear or you need more information and than you grade "C"? Could you explain that?
0
 

Author Closing Comment

by:jrlittle86
ID: 39631419
I'm giving this a B grade rather than an A grade because I already planned on using P/Invoke and I had already combed through the MSDN articles, however briefly, before posting my question on the EE site.

I was hoping to find more tutorials on calling C++ Functions from VB.Net.

When somebody searches for this same question in the future, this response will be a good starting point for them. So, there is value to the answer given.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question