Remote Call Framework 3.0
Windows/OutputDebugString.hpp
1 
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2018, Delta V Software. All rights reserved.
6 // http://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
12 // under GPL terms.
13 //
14 // Version: 3.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18 
19 #ifndef INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
20 #define INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
21 
22 #include "windows.h"
23 
24 namespace Platform {
25 
26  namespace OS {
27 
28  inline void OutputDebugString(const char *sz)
29  {
30  ::OutputDebugStringA(sz);
31 
32 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_STDERR
33  fprintf(stderr, "%s", sz);
34 #endif
35 
36 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_STDOUT
37  fprintf(stdout, "%s", sz);
38 #endif
39 
40 #ifdef UTIL_OUTPUTDEBUGSTRING_TO_FILE
41  static FILE *file = fopen( "OutputDebugString.txt", "w" );
42  fprintf(file, "%s", sz);
43 #endif
44 
45  }
46 
47  }
48 
49 }
50 
51 #endif // ! INCLUDE_UTIL_PLATFORM_OS_WINDOWS_OUTPUTDEBUGSTRING_HPP
Definition: Unix/BsdSockets.hpp:80