I'd like to come up with a c++ wrapper function that fully wraps the TraceLoggingWrite macro. TraceLoggingWrite
is a macro with variadic parameters. I attempted the following code snippet, but it would encounter compilation errors because it seems like the syntax requires the wrapped function to accept a va_list parameter. If so, is there another way to accomplish this?
void WrapperFunction(String Name, ...)
{
va_list args;
va_start(args, Name);
TraceLoggingWrite(gProvider,
Name,
TraceLoggingInt32(32, "Test"),
args);
va_end(args);
}