void __stdcall WriteLog(char* fmt, ...) {
	// Docu about ellipsis and variadic macro:
	// http://msdn.microsoft.com/en-us/library/ms177415(v=vs.80).aspx
	// http://stackoverflow.com/questions/1327854/how-to-convert-a-variable-argument-function-into-a-macro
	va_list args;
  va_start(args, fmt);
	write_log_vl(preferences.dll_logging_enabled(), fmt, args);
	va_end(args);
}
Esempio n. 2
0
extern "C" __declspec(dllexport) void __stdcall WriteLogFromDll(char* fmt, ...)
{
    // Docu about ellipsis and variadic macro:
    // http://msdn.microsoft.com/en-us/library/ms177415(v=vs.80).aspx
    // http://stackoverflow.com/questions/1327854/how-to-convert-a-variable-argument-function-into-a-macro
    va_list args;

    va_start(args, fmt);
    // !! should true be replaced by an option?
    write_log_vl(true, fmt, args);
    va_end(args);
}