473,657 Members | 2,458 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Migration to managed C++ problems

Hello,
I have to move the project to the .NET (exactly ASP.NET) environment but
I encountered some problems. The old code was written using C++ and MFC
and was organized to separate "business logic" from interface. I'd like
to use this "business logic" code in ASP.NET pages so as far I know I
need to create managed wrappers for the classes. This code is not a dll
library only static lib.

My 1st problem is:

In old code I've got something like this:

typedef CTypedPtrArray <CPtrArray, CUser*> CUserArray;

class CUsersMgr
{
....
CUserArray& GetUsers();
bool AddUser(CUser &user);

protected:
CUserArray m_Users;
}

So managed wrapper would be:

class CUsersMgrWrp
{
CUsersMgrWrp() { pUsersMgr = new CUsersMgr() };
~CUsersMgrWrp() { delete pUsersMgr };

XXXXX GetUsers();

....
protected:
CUsersMgr *pUsersMgr;
}

And if I wanted to get users array on the ASP.NET page I should:

CUsersMgrWrp usersWrp = new CUsersMgrWrp
usersWrp.GetUse rs();

but what should return GetUsers() ?(XXXXXX) I can't use MFC on C#
codebehind pages. Should I convert all array data in wrapper to eg
ArrayList?

And the second question. Suppose I have written CUser wrapper:
class CUserWrp
{
CUserWrp() { pUser = new CUser() };
~CUserWrp() { delete pUser };

....
friend class CUsersMgr;

protected:
CUsers *pUser;
}

Will my wrapped code look like this?

CUsersMgrWrp::A ddUser(CUserWrp userWrp)
{
pUsersMgr->AddUser(userWr p.pUser)
}

What about marshaling in this case?

Please, tell me if it is OK, maybe I should design it in some other way.

Regrads,
mirek

Nov 16 '05 #1
0 1032

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

Similar topics

4
19986
by: susmita_ganguly | last post by:
Hi I am trying to upgrade from oracle 8i to oracle 9i on the same server ..I don't know much abt migration . Can anyone help me out. Thanks. Susmita
4
3980
by: Abram Friesen | last post by:
Hi, I'm a developer for a software application vendor, and our application makes use of a customer-maintained Oracle 8i/9i database. We've had a customer request to support DB2 database, and I'm looking into the feasibility of migration. Our application runs on NT Server and, the DB2 database would be in some cases on a separate AIX machine, in other cases on an AS/400. There are two problems we are running into, both relating to our...
1
2204
by: Henry Reardon | last post by:
I'm having some migration problems. On Friday, I upgraded from DB2 7.2 (FP9) to DB2 8.2 (FP7), then applied Fixpack 8. I'm running Windows XP. My migrations did not work and I am trying to fix them manually. The Control Center gives me SQL0535 for some of the databases and SQL1039C for the others. I'll describe the SQL0535 problems in this note and make a separate post for SQL1039C.
0
1805
by: Henry Reardon | last post by:
I need some help with migration. As I mentioned in my previous post, I am having migration problems after updating DB2 7.2 to DB2 8.2 and then applying FP8. I am running on Windows XP. None of my databases migrated successfully during the upgrade to version 8 of DB2. Some are returning SQL5035N when I look at them in the Control Center; I am trying to migrate these manually but encountering problems; I've mentioned them in my previous...
2
1900
by: aww91 | last post by:
Company is planning a Sybase to UDB migration that is projected to take 1 year. During that long period of time any Code Freeze put into place would impact our users (we normally release code changes once a month). Any suggestions on how to manage a partial code freeze while under going a major migration like this one?
3
1966
by: daveboyd | last post by:
Hi! I have an MFC application that is under development in VS2003 and frankly MFC seems difficult to use and poorly documented -- I frequently find the only way to get example code is on the Internet, not in the huge, mosly useless "MSDN Library". For example, I was advised to use CStatic for drawing some color frames / backgrounds, but CStatic isn't on the Toolbox and for those related components such as Picture, limited frame colors...
1
3862
by: Bonggoy Cruz | last post by:
We have a fairly big size ASP.NET web application that was written VB.NET. We are in the process converting the web project. We used the migration wizard included in VS 2005. I followed step by step guide outlined in here: http://msdn.microsoft.com/asp.net/reference/migration/upgrade/default.aspx?pull=/library/en-us/dnaspp/html/webprojectsvs05.asp. I was able to convert the project without any problem. Compiling and building them is...
60
4903
by: Shawnk | last post by:
Some Sr. colleges and I have had an on going discussion relative to when and if C# will ever support 'true' multiple inheritance. Relevant to this, I wanted to query the C# community (the 'target' programming community herein) to get some community input and verify (or not) the following two statements. Few programmers (3 to7%) UNDERSTAND 'Strategic Functional Migration
7
1377
by: Jeroen | last post by:
We converted our decently large (13 projects, compiled about 12 mb) VStudio 2003/.Net1.1 project to VStudio 2005/.Net2. My two colleagues have no problem starting the new solution, but I get an exception thrown at me. I only get the exception if I run in debug mode, in release mode all works fine. The exception thrown somewhere along startup sequence is: The following snippet shows where the exception is thrown:
0
8324
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8516
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8617
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.