in reply to C++ Function substitute

If I understand your question correctly, you want to change this:

m_pCTrace->Trace(TRACE_DEVICE, " CBikeRackMgr::OnRecvMsg(): Bike Senso +r 1=%u (not stopped)", pSDiscCtlsMsg->bValue);

...into this:

DEBUGMSG(TRACE_DEVICE, (TEXT(" CBikeRackMgr::OnRecvMsg(): Bike Sensor +1=%u (not stopped)"\n), pSDiscCtlsMsg->bValue));

Is that right? It sounds as if you're specifically concerned with a case in which m_pCTrace->Trace() takes more parameters than the example you've given. Is that correct also? It looks as if you wrote something already. Can you show what work you've done so far so we're not repeating the steps you've already taken? It might help to look at How do I post a question effectively?.

Also, in the future, wrap your code in <code>...</code> tags. See Writeup Formatting Tips.