Click to See Complete Forum and Search --> : Tips to port from VC++ 6.0 to VC++.net
Wrongway
August 21st, 2003, 12:03 PM
What tips (things I need to look for) when I port a project (with all the dll's the like) to .net?
I have read the MSDN online and saw some of the pitfalls that I need to look out for. Like, you cannot use STL iterators as pointers.
Example
#include <vector>
using std::vector;
vector< int > IntegerArray;
void MyClass::Method( void )
{
vector::iterator Iter = IntegerArray.begin();
ManipItems( Iter );
< yada yada yada >
}
void MyClass::ManipItems( int* p )
{
< do da, do da day >
}
The .net compiler complains (saw that it would from the MSDN KB).
Are there any ideas on how to easly (or not) port a 6.0 to .net?
Thanks
patrickcbrown
August 21st, 2003, 12:42 PM
Hello
I have ported a handful of applications over, it hasn't been too bad. In my case I just opened up the VC 6 project in .Net 03, let it do the conversion and built the project. It complained about a few things such as your example, you just have to look at them and clean them up a bit.
If you have any specific issues, feel free to post or reply to me directly.
Thanks
Patrick Brown
Wrongway
August 21st, 2003, 02:07 PM
Thanks Patrick, Will do AND I have a question already. One of the things that .net is complaining about is the defined (either macro or constant) R_EMS_AB_PROXY_ADDRESSES. This is defined in the file:
< installed VC 6 >\VC98\Include\EMSABTAG.H
.net has no equilevent (or file for that matter!) How do I get around this? Punt? Scream Foul!! Foul!! :confused:
Thanks
patrickcbrown
August 21st, 2003, 02:32 PM
Hello
I don't see that one anywere in my directories either, and can't find any new documentation on it. I would bring the header since it is just a bunch of defines you may well not have any issues with it.
Patrick
Wrongway
August 21st, 2003, 04:43 PM
Doing a search on MSDN Online for PR_EMS_AB_PROXY_ADDRESSES and it came up under Microsoft Exchange Server SDK. I wonder if it is under there. I will have to look (when I get home) and see if I have that SDK and see if it is in there. It also comes up for the CDO (which maybe the same as the exchange server.)
Larry
indiocolifa
August 23rd, 2003, 01:58 AM
can I convert raw Win32 API programs (without classes)?
patrickcbrown
August 23rd, 2003, 05:12 PM
Can you expand on what you are trying to do, I am not sure what you mean. You should still be able to call most or all of the same api's you use to. What api's in particular are you speaking of ??
Thanks
Patrick
indiocolifa
August 23rd, 2003, 07:35 PM
forget about what I asked :)
what I'm really interested if you can use Windows Forms only, and use normal APIs for other processing, for example, mixing Windows Forms classes with multimedia timer API.
Win32-Windows Forms Mix.-
patrickcbrown
August 24th, 2003, 11:51 AM
Hello
You can do this, if the api is not something supported by the .Net framework you will have to import them from where they are implemented.
[DllImport("msvcrt.dll")]
public static extern int puts(string c);
Patrick
Wrongway
August 28th, 2003, 09:57 AM
OK, I don't seem to have the SDK. I have the platform SDK that can download from MSDN Online. I cannot find the Exchange Server SDK. That one must be in the Universal MSDN Subscription. Any other suggestions on the EMSABTAG.H file? You said just copy it over. Will that have any effect? I'm guessing no, since it is nothing but #define's.
Thanks
Larry
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.