Leaked source code of windows server 2003
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.

46 lines
741 B

  1. #ifndef __IINEW_H_INCLUDED
  2. #define __IINEW_H_INCLUDED
  3. #if defined(__cplusplus)
  4. #include "wiadebug.h"
  5. inline void * __cdecl operator new(size_t size)
  6. {
  7. if (0 == size)
  8. {
  9. return NULL;
  10. }
  11. PBYTE pBuf = size ? (PBYTE)LocalAlloc(LPTR, size) : NULL;
  12. #if !defined(WIA_DONT_DO_LEAK_CHECKS)
  13. WIA_RECORD_ALLOC(pBuf,size);
  14. #endif
  15. return (void *)pBuf;
  16. }
  17. inline void __cdecl operator delete(void *ptr)
  18. {
  19. if (ptr)
  20. {
  21. #if !defined(WIA_DONT_DO_LEAK_CHECKS)
  22. WIA_RECORD_FREE(ptr);
  23. #endif
  24. LocalFree(ptr);
  25. }
  26. }
  27. extern "C" inline __cdecl _purecall(void)
  28. {
  29. return 0;
  30. }
  31. #endif // __cplusplus
  32. #endif // __IINEW_H_INCLUDED