visual c++ - Macro aliases for WPP tracing -


i started using wpp tracing in driver. defined macro dotracelevelmessage in order support log level (similar tracedrv sample code). tracing code looks this:

dotracelevelmessage(trace_level_information, default_flag, "driver loaded"); 

this makes tracing lines little long, want use kind of aliases, example:

#define log_info(msg,...) dotracelevelmessage(trace_level_information, default_flag, msg, __va_args__) 

so above code this:

log_info("driver loaded"); 

i can't seem make work wpp. think wpp pre-processor runs before compiler pre-processor above macro doesn't expand expect. following compilation error:

1>test_driver.c(70): error c4013: 'wpp_call_test_driver_c70' undefined; assuming extern returning int 1>test_driver.c(70): error c2065: 'defualt_flag': undeclared identifier 

when use dotracelevelmessage macro, ok. idea how can define such aliases?


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -