473,785 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VC++ 2005 migration problem

hi, i have 1 MFC project which is written using VC++2003 but i need to
migrate to VC++2005. The program (VC++2003) is working fine. but there

is erros occur when running in VC++2005, and i just able to figure out
that the problem was come from the following code.
# ifdef WIN32
# if defined(MPSC_EX PORT)
# define MPSC_API __declspec( dllexport )
# elif defined(MPSC_IM PORT)
# define MPSC_API __declspec( dllimport )
# else /* for static libraries */
# define MPSC_API
# endif
# else /* !MD_WIN32 */
# define MPSC_API
# endif
would any one can tell me why this coding will be the problem for my
program?
thanks

Jul 20 '06 #1
3 1592
>hi, i have 1 MFC project which is written using VC++2003 but i need to
>migrate to VC++2005. The program (VC++2003) is working fine. but there
is erros occur when running in VC++2005, and i just able to figure out
that the problem was come from the following code.
# ifdef WIN32
# if defined(MPSC_EX PORT)
# define MPSC_API __declspec( dllexport )
# elif defined(MPSC_IM PORT)
# define MPSC_API __declspec( dllimport )
# else /* for static libraries */
# define MPSC_API
# endif
# else /* !MD_WIN32 */
# define MPSC_API
# endif
would any one can tell me why this coding will be the problem for my
program?
It might help if you told us exactly what the errors are, and why you
think those definitions are responsible for it.

Dave
Jul 20 '06 #2
thanks for the reply. after compliation(VS2 005), the program can run
but when i click on certain button which will call the function from
the dll files , the program terminate immediately. So, i'm thinking
there is a problem in the code which use to load the dll files. But
when i run tha same program(complil e from VS2003), it was no error.

there is a error message, state "debug assertion failed" which come
from commit.c.
_VALIDATE_RETUR N((filedes >= 0 && (unsigned)filed es <
(unsigned)_nhan dle), EBADF, -1);

would there is the possibility the problem is come from the dll files?

thanks

David Lowndes wrote:
hi, i have 1 MFC project which is written using VC++2003 but i need to
migrate to VC++2005. The program (VC++2003) is working fine. but there
is erros occur when running in VC++2005, and i just able to figure out
that the problem was come from the following code.
# ifdef WIN32
# if defined(MPSC_EX PORT)
# define MPSC_API __declspec( dllexport )
# elif defined(MPSC_IM PORT)
# define MPSC_API __declspec( dllimport )
# else /* for static libraries */
# define MPSC_API
# endif
# else /* !MD_WIN32 */
# define MPSC_API
# endif
would any one can tell me why this coding will be the problem for my
program?

It might help if you told us exactly what the errors are, and why you
think those definitions are responsible for it.

Dave
Jul 21 '06 #3
>thanks for the reply. after compliation(VS2 005), the program can run
>but when i click on certain button which will call the function from
the dll files , the program terminate immediately.
OK, so debug your program and find exactly where it crashes.
>So, i'm thinking
there is a problem in the code which use to load the dll files.
You're guessing - don't! Debug it and find out exactly where it
crashes.
>would there is the possibility the problem is come from the dll files?
It's possible that you also need to rebuild the DLL with VS2005, but
you've not given us any information to know whether that might be the
case or not.

Dave
Jul 21 '06 #4

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

Similar topics

2
5421
by: Peter Krikelis | last post by:
Hi, I have a C++ code. I tried to open and run in in VC++.Net and it gave me an error: fatal error C1083: Cannot open include file: 'getopt.h': No such file or directory Somehow it did not find the standard C++ library. And the question is what do I need to do in order to run the C++ code in VC++.Net and get it working or can I do it at all. What should I do with the not found getopt.h library?
29
2110
by: Stefan Slapeta | last post by:
There have been many announciations that VC 8.0 will finally support two phase template lookup; now, after I installing VC 2005 Express I had to realize that it still doesn't! What has happend to these plans??? Stefan
5
3799
by: AliR | last post by:
Hi Everyone, I have a Visual C++ MFC program, and I am trying to use a webservice written in C#. When I add the webservice to my project using Add Web Reference the sproxy compiler complains about one of the object wanting to extend MarshalByRefObject object, and I get an error SDL1030. I can use the webservice in a C# project just fine but not the C++. Can anyone help me out with this?
8
2322
by: Edward Diener | last post by:
By reuse, I mean a function in an assembly which is called in another assembly. By a mixed-mode function I mean a function whose signature has one or more CLR types and one or more non-CLR types. The problem: I have a number of mixed-mode functions which I want reuse. These functions revolve around converting a CLR String to a C++ std::string or
1
3875
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...
5
1765
by: techie | last post by:
Hi, I'm a VC++ programmer with around 5 years of experience using VC++6. My company have plans to migrate to VS 2005 in the future. I know C++/CLI is pretty new and there aren't too many books on it but I wonder if someone can suggest some titles for me. Is the latest version of VC++ a lot different from VC++ version 2003? I was thinking of getting MS Press book "Microsoft Visual C++ .NET Step by Step Version 2003" which has a lot...
14
2142
by: John | last post by:
My friend told me that his company will migrate the VC++ win32 applications to C++ .NET windows applications. I don't understand why since currently Microsoft only supports .NET on windows platforms. If Win32 applications and .NET application both will run on windows only, what's the advantages for the migration? Or maybe this type of migration is not common in practice?
4
5298
by: jmnaste | last post by:
Hi, I tried to migrate data of an Access 2003 application (.mdb) to SQL Server 2005 Express. Using the Wizard and choosing 'create a new database', I receive (a French message saying roughly) '... migration wizard requires SQL Server version 6.5 sp 5 and later ... connect to an SQL server source of data.'. Given that failure, I went to another PC running MSDE (according to
7
8454
by: Norman Diamond | last post by:
A project depends on VC runtime from Visual Studio 2005 SP1, and DotNet Framework 2. Options are set in the setup project properties, so if these two dependencies are not already installed then this installer will install them. But what about the situation where VC runtime has already been installed? In fact it's been installed twice. Although the project was built on a Windows XP system with Visual Studio 2005 SP1 and the results were...
0
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9489
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,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10100
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
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7509
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
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4061
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
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.