![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 1
Rep Power: 0
![]() |
Use C++ functions is VB.NET
I am trying to create a VB.net program that will use existing SDK (I have the complete code) which is written in C++. Is there a way to create a DLL from the VC++ code (Automatically converted from standard C/C++) and link this DLL to my VB .net Program so I am able to call the C++ functions from within my VB program? I do not need to change these functions, just retrieve the values and initiate communication. I am really looking for any way to use the C++ functions in VB, a DLL was the only thing I could think of, and its not working out as I had planned. Any ideas or new ways to create the DLL. I was using Microsoft “MFC DLL” in .NET to create the DLL’s and importing the .c and .h files?? Any idea please let me know....
Thank you in advance... |
|
|
|
|
|
#2 |
|
Expert Programmer
|
If you use the _StdCall convention, then your exposed functions will work with the Declare keyword in VB. However the best way for managed code would be to wrapper it in a COM (or even better COM+) library and digitally sign it - there are probably tools that'll do this for you in C++.NET.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|