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.

33 lines
585 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. WIA_TRACE((TEXT("size == 0 in operator new")));
  10. return NULL;
  11. }
  12. PBYTE pBuf = size ? (PBYTE)LocalAlloc(LPTR, size) : NULL;
  13. WIA_ASSERT(pBuf != NULL);
  14. return (void *)pBuf;
  15. }
  16. inline void __cdecl operator delete(void *ptr)
  17. {
  18. if (ptr)
  19. LocalFree(ptr);
  20. }
  21. extern "C" inline __cdecl _purecall(void)
  22. {
  23. return 0;
  24. }
  25. #endif // __cplusplus
  26. #endif // __IINEW_H_INCLUDED