Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calling C++ Functions from VB.Net - Tutorials

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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

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 …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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 learn how to clear a vector as well as how to detect empty vectors in C++.

722 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