Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.3 KiB

  1. // stdafx.h : include file for standard system include files,
  2. // or project specific include files that are used frequently, but
  3. // are changed infrequently
  4. //
  5. #if !defined(AFX_STDAFX_H__BB950521_F3D6_4DC5_B6EA_F761B87417DE__INCLUDED_)
  6. #define AFX_STDAFX_H__BB950521_F3D6_4DC5_B6EA_F761B87417DE__INCLUDED_
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif // _MSC_VER > 1000
  10. #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
  11. #include <stdio.h>
  12. #define INCLUDE_SHTL_SOURCE 1
  13. #define USE_SHELL_AUTOPTR 1
  14. #define _LOCALE_ // isdigit is redefined, I don't know why
  15. #include <windows.h>
  16. inline void * __cdecl operator new(
  17. size_t size
  18. )
  19. {
  20. void *pv = LocalAlloc(LMEM_FIXED, size);
  21. if (NULL == pv)
  22. {
  23. DebugBreak();
  24. ExitProcess(0);
  25. }
  26. return pv;
  27. }
  28. inline void __cdecl operator delete(void *pv)
  29. {
  30. LocalFree((HLOCAL)pv);
  31. }
  32. #include <shtl.h>
  33. #include <autoptr.h>
  34. #include <tstring.h>
  35. #undef max // stl doesn't want the old C version of this
  36. // NEW operator that aborts if memory allocation fails. DRT driver will
  37. // assume allocations never fail, and if they do, user is advised and
  38. // test aborted.
  39. #endif // !defined(AFX_STDAFX_H__BB950521_F3D6_4DC5_B6EA_F761B87417DE__INCLUDED_)