I found some code that is wrapping function calls with a macro NAME(),
#define NAME(x) x
...
m_strTemp.Format("x key:0x%X", NAME(a_function)(a_param));
The question is how to define NAME() macro so it will log the function being called using TRACE().
Something like #define NAME(x) TRACE("x");x does not work because functions wrapped by NAME() macro may return things and sometimes they are used like the example above.
Note, this has to work with VC++ 2010 compiler.
This will probably do what you want:
(Note that you can enclose a function designator in parantheses, eg.
(strlen)("foo")is allowed).