Remote Call Framework 3.3
Windows/OutputDebugString.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2022, Delta V Software. All rights reserved.
6 // https://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF under GPL terms.
12 //
13 // Version: 3.3
14 // Contact: support <at> deltavsoft.com
15 //
16 //******************************************************************************
17 
18 #ifndef INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
19 #define INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
20 
21 #include "windows.h"
22 
23 namespace Platform {
24 
25  namespace OS {
26 
27  inline void OutputDebugString(const char *sz)
28  {
29  ::OutputDebugStringA(sz);
30 
31 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_STDERR
32  fprintf(stderr, "%s", sz);
33 #endif
34 
35 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_STDOUT
36  fprintf(stdout, "%s", sz);
37 #endif
38 
39 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_FILE
40  static FILE *file = fopen( "OutputDebugString.txt", "w" );
41  fprintf(file, "%s", sz);
42 #endif
43 
44  }
45 
46  }
47 
48 }
49 
50 #endif // ! INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
Definition: Unix/BsdSockets.hpp:79