Solved

Calling C++ Functions from VB.Net - Tutorials

Posted on 2013-10-28
7
359 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

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 …
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…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

762 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