Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Calling C++ Functions from VB.Net - Tutorials

Posted on 2013-10-28
7
Medium Priority
?
373 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 1500 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

971 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