473,395 Members | 1,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Porting from unmanaged to managed

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
Oct 29 '07 #1
2 927
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

--
Sheng Jiang
Microsoft MVP in VC++
"Dipesh_Sharma" <Di**********@discussions.microsoft.comwrote in message
news:AA**********************************@microsof t.com...
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

Oct 29 '07 #2
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.
"Sheng Jiang[MVP]" wrote:
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

--
Sheng Jiang
Microsoft MVP in VC++
Nov 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
4
by: Rachel Suddeth | last post by:
What is the difference between a managed/unmanaged resource, and how do you tell which is which? I'm trying to understand how to write some Dispose() methods, and we are supposed to put code that...
2
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking afterwards with ILDASM at what is visible in those assemblies from a...
1
by: Sparhawk | last post by:
Hi, my company is going to migrate a large VC++ application to .NET to make use of Windows Forms (the old class library is not updated any more). We are not planning to migrate the rest of the...
1
by: Bae,Hyun-jik | last post by:
Is there any way to port legacy C++ enum to managed object? For example, let's assume there is a C++ header file(we cannot modify it, because it is updated by other vendor). It has a enum...
1
by: Jonathan Amend | last post by:
I'm trying to port some C++ code to VB.NET but I have hit a snag. I need to add the pointer of a structure which includes an array to an array and then pass it to an API. Here are the two code...
9
by: Amit Dedhia | last post by:
Hi All I have a VC++ 2005 MFC application with all classes defined as unmanaged classes. I want to write my application data in xml format. Since ADO.NET has buit in functions available for...
4
by: Ian | last post by:
I would like to hear from others who have considered and/or ported code from traditional C++ to C++/CLI. The class library I am considering porting to C++/CLI was written in traditional C++ with...
6
by: =?Utf-8?B?RGlwZXNoX1NoYXJtYQ==?= | last post by:
Hi all, I am porting an code written in VC++ to VC.Net to make it manage. But in Managed VC we dont use "const" keyboard at all. but my code is using it very frequently, so is their any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.