Re: Converting from 6.0 to VS2005
- From: "Michael Tissington" <mtissington@xxxxxxxxxxxxxxxx>
- Date: Wed, 7 Feb 2007 09:23:38 -0800
It's hidden in the macro CheckParameters_* - something to do with the Assert
Macro
I've no idea how DEBUG came to NOT be defined in VC6.0 but I've just wrapped
the include of mapidbg.h to undef DEBUG and everything works great
"Stephen Griffin [MSFT]" <sgriffin@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:uFQw0rsSHHA.3316@xxxxxxxxxxxxxxxxxxxxxxx
By default, in both VC6.0 and VS2005, when you start a new solution, there
will be Release and Debug projects in them. The Debug project will have
DEBUG defined. However, after creation, you're free to change the settings
however you like.
So I'll wager the VC6.0 project in question was either a Release project
and never had DEBUG defined, or it was a modified Debug project that had
DEBUG removed. And the VS2005 project that was failing to build was a
Debug project - the Release project wouldn't have had this problem.
Incidently - I've never seen this in all my years working with MAPI - Mike
must be using some seldom used macro somewhere in his code. It'd be
interesting if he could track it down and let us know what he finds.*
*One way to track it down might be to temporarily hack mapidbg.h to remove
the definitions and then see where compilation starts failing.
"Charles Wang[MSFT]" <changliw@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:CWhZ6lrSHHA.3792@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
Your assumption is reasonable. After I looked through the MAPIDBG.H, I
found that either the macro DEBUG or TRACES_ENABLED is defined,
DebugTraceFn can be used.
The following code snippet of MAPIDBG.H clearly indicates this. If one of
the macros DEBUG and TRACES_ENABLED is defined, the macro DebugTrace is
defined to represent DebugTraceFn:
#if defined(DEBUG) || defined(TRACES_ENABLED)
#define IFTRACE(x) x
#define DebugTrace DebugTraceFn
#else
#define IFTRACE(x) 0
#define DebugTrace 1?0:DebugTraceFn
#endif
To make this issue clear, I would like your checking the following:
1. Is your current application in debug mode or release mode?
2. Is the macro TRACES_ENABLED defined?
3. Did your application or some libraries explicitly use DebugTraceFn
rather than using the macro DebugTrace?
Please feel free to let me know if you have any other questions or
concerns.
Have a good day!
Sincerely yours,
Charles Wang
Microsoft Online Community Support
.
- Follow-Ups:
- Re: Converting from 6.0 to VS2005
- From: Charles Wang[MSFT]
- Re: Converting from 6.0 to VS2005
- From: Stephen Griffin [MSFT]
- Re: Converting from 6.0 to VS2005
- References:
- RE: Converting from 6.0 to VS2005
- From: Charles Wang[MSFT]
- Re: Converting from 6.0 to VS2005
- From: Michael Tissington
- Re: Converting from 6.0 to VS2005
- From: Stephen Griffin [MSFT]
- Re: Converting from 6.0 to VS2005
- From: Michael Tissington
- Re: Converting from 6.0 to VS2005
- From: Charles Wang[MSFT]
- Re: Converting from 6.0 to VS2005
- From: Stephen Griffin [MSFT]
- RE: Converting from 6.0 to VS2005
- Prev by Date: form server as DLL instead of an EXE: problem
- Next by Date: Re: How to I get an attachment's MIME type...
- Previous by thread: Re: Converting from 6.0 to VS2005
- Next by thread: Re: Converting from 6.0 to VS2005
- Index(es):
Relevant Pages
|