Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 7th, 2005, 9:14 PM   #1
userName123
Newbie
 
Join Date: Oct 2005
Posts: 1
Rep Power: 0 userName123 is on a distinguished road
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...
userName123 is offline   Reply With Quote
Old Oct 8th, 2005, 8:32 AM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
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.
Rory is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:16 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC