Re: Converting from 6.0 to VS2005



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





.



Relevant Pages

  • Re: Question about #define
    ... > #ifdef DEBUG ... Get and use a C99 compiler. ... Get and use gcc and the gnu variadic macro extensions. ...
    (comp.lang.c)
  • Re: Converting from 6.0 to VS2005
    ... I've no idea how DEBUG came to NOT be defined in VC6.0 but I've just ... or it was a modified Debug project that had ... Mike must be using some seldom used macro somewhere in his code. ... DebugTraceFn can be used. ...
    (microsoft.public.win32.programmer.messaging)
  • Re: braces needed?
    ... > written macros particularly debug ones or ones requiring a local variable ... - the person who wrote "if (blah) MACRO()" should have been more awake ... I would not want to impose braces on all my code in order to avoid ...
    (comp.lang.cpp)
  • Re: What policy for BUG_ON()?
    ... > our own debug printk() that shows the mess. ... Then the BUG_ONmacro would ... macro would be disabled for general users, ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • How to delete notes from power point presentation (PP2000)
    ... I've just tried your macro to delete notes from ppt's. ... I'm getting an error and my limited knowledge of VBA is not enough to debug. ... PlaceholderFormat: Invalid request. ... > presentation file or you will be rather upset), ...
    (microsoft.public.powerpoint)

Quantcast