Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2007

Tip: Looking for answers? Try searching our database.

Porting from unmanaged to managed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dipesh_Sharma - 29 Oct 2007 07:41 GMT
Hi all,
I have a Dll code written in VC++ having lots of structures, classes etc and
exporting 100s of APIs.
I have to port it to VC.Net to make it managed. How can i port the whole
code to make it managed. I have heard of IJW & wrapper. But please guide me
how can i migrate to VC.Net.

Thanks,
Dipesh
Sheng Jiang[MVP] - 29 Oct 2007 19:03 GMT
You may want to look the Native and .NET Interoperability section in Visual
C++ Programming Guide
msdn2.microsoft.com/en-us/library/zbz07712(VS.80).aspx

Signature

Sheng Jiang
Microsoft MVP in VC++

> Hi all,
> I have a Dll code written in VC++ having lots of structures, classes etc and
[quoted text clipped - 5 lines]
> Thanks,
> Dipesh
Dipesh_Sharma - 02 Nov 2007 05:50 GMT
Hi sheng thanks for this link. I am now trying to import my unmanaged dll &
creating a managed wrapper on it as shown below:

[DllImport("C:\\New Folder\\unmanaged.dll", EntryPoint = "testfunction"
,CallingConvention= CallingConvention::Cdecl)]
String *  LonString( const teststructure& v, String * s, uint nb );

public:
String *    LonNeuronIdString( const TLonNeuronId& v, String * s, uint nb )
{
return ::NaCppLibLib::LonNeuronIdString( v, s, nb ); //passing to unmanaged
}
First of all can you please point out the mistake in it. I am no able to
access the structure in VB.Net application. I have included the structure in
namespace.

Thanks.

> You may want to look the Native and .NET Interoperability section in Visual
> C++ Programming Guide
> msdn2.microsoft.com/en-us/library/zbz07712(VS.80).aspx

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.