/reporting/crashsender/stdafx.h

http://crashrpt.googlecode.com/ · C Header · 119 lines · 82 code · 21 blank · 16 comment · 1 complexity · 3fd4c9c9301d9eebf49b83309b9be19c MD5 · raw file

  1. /*************************************************************************************
  2. This file is a part of CrashRpt library.
  3. Copyright (c) 2003-2013 The CrashRpt project authors. All Rights Reserved.
  4. Use of this source code is governed by a BSD-style license
  5. that can be found in the License.txt file in the root of the source
  6. tree. All contributing project authors may
  7. be found in the Authors.txt file in the root of the source tree.
  8. ***************************************************************************************/
  9. // stdafx.h : include file for standard system include files,
  10. // or project specific include files that are used frequently, but
  11. // are changed infrequently
  12. //
  13. #pragma once
  14. // Change these values to use different versions
  15. #define WINVER 0x0501
  16. #define _WIN32_WINNT 0x0501
  17. #define _WIN32_IE 0x0600
  18. #define _RICHEDIT_VER 0x0200
  19. typedef __int64 off_t, _off_t;
  20. #define _OFF_T_DEFINED
  21. #include <errno.h>
  22. #include <winsock2.h>
  23. #include <ws2tcpip.h>
  24. #include <atldef.h>
  25. #if ( _ATL_VER < 0x0710 )
  26. #define _WTL_SUPPORT_SDK_ATL3 // Support of VC++ Express 2005 and ATL 3.0
  27. #endif
  28. // Support for VS2005 Express & SDK ATL
  29. #ifdef _WTL_SUPPORT_SDK_ATL3
  30. #define _CRT_SECURE_NO_DEPRECATE
  31. #define _CRT_NON_CONFORMING_SWPRINTFS
  32. #pragma conform(forScope, off)
  33. #pragma comment(linker, "/NODEFAULTLIB:atlthunk.lib")
  34. #endif // _WTL_SUPPORT_SDK_ATL3
  35. #include <atlbase.h>
  36. // Support for VS2005 Express & SDK ATL
  37. #if defined(_WTL_SUPPORT_SDK_ATL3) && !defined(_WTLSUP_INCLUDED)
  38. #define _WTLSUP_INCLUDED
  39. namespace ATL
  40. {
  41. inline void * __stdcall __AllocStdCallThunk()
  42. {
  43. return ::HeapAlloc(::GetProcessHeap(), 0, sizeof(_stdcallthunk));
  44. }
  45. inline void __stdcall __FreeStdCallThunk(void *p)
  46. {
  47. ::HeapFree(::GetProcessHeap(), 0, p);
  48. }
  49. };
  50. #endif // _WTL_SUPPORT_SDK_ATL3
  51. #include <atlapp.h>
  52. extern CAppModule _Module;
  53. #include <atlwin.h>
  54. #include <atlframe.h>
  55. #include <atlctrls.h>
  56. #include <atldlgs.h>
  57. #include <atlctrlx.h>
  58. #define _WTL_USE_CSTRING
  59. #include <atlmisc.h>
  60. #include <string>
  61. #include <vector>
  62. #include <map>
  63. #include <set>
  64. #include <iostream>
  65. #include <fstream>
  66. #include "dbghelp.h"
  67. #include <wininet.h>
  68. #include <mapi.h> // MAPI function defs
  69. #include <sys/stat.h>
  70. #include <shellapi.h>
  71. #include <Windns.h>
  72. #include <Wspiapi.h>
  73. #include <time.h>
  74. #include <Psapi.h>
  75. #include <tlhelp32.h>
  76. #if _MSC_VER<1400
  77. #define _TCSCPY_S(strDestination, numberOfElements, strSource) _tcscpy(strDestination, strSource)
  78. #define _TCSNCPY_S(strDest, sizeInBytes, strSource, count) _tcsncpy(strDest, strSource, count)
  79. #define STRCPY_S(strDestination, numberOfElements, strSource) strcpy(strDestination, strSource)
  80. #define _TFOPEN_S(_File, _Filename, _Mode) _File = _tfopen(_Filename, _Mode);
  81. #else
  82. #define _TCSCPY_S(strDestination, numberOfElements, strSource) _tcscpy_s(strDestination, numberOfElements, strSource)
  83. #define _TCSNCPY_S(strDest, sizeInBytes, strSource, count) _tcsncpy_s(strDest, sizeInBytes, strSource, count)
  84. #define STRCPY_S(strDestination, numberOfElements, strSource) strcpy_s(strDestination, numberOfElements, strSource)
  85. #define _TFOPEN_S(_File, _Filename, _Mode) _tfopen_s(&(_File), _Filename, _Mode);
  86. #endif
  87. #if _MSC_VER>=1400
  88. #if defined _M_IX86
  89. #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
  90. #elif defined _M_IA64
  91. #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  92. #elif defined _M_X64
  93. #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
  94. #else
  95. #pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
  96. #endif
  97. #endif