home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / crt / src / _newmode.c < prev    next >
C/C++ Source or Header  |  1998-06-17  |  818b  |  26 lines

  1. /***
  2. *_newmode.c - set new() handler mode to not handle malloc failures
  3. *
  4. *       Copyright (c) 1994-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. *       Sets the global flag which controls whether the new() handler
  8. *       is called on malloc failures.  The default behavior in Visual
  9. *       C++ v2.0 and later is not to, that malloc failures return NULL
  10. *       without calling the new handler.  This object is linked in unless
  11. *       the special object NEWMODE.OBJ is manually linked.
  12. *
  13. *       This source file is the complement of LINKOPTS/NEWMODE.C.
  14. *
  15. *******************************************************************************/
  16.  
  17.  
  18.  
  19. #include <internal.h>
  20.  
  21. /* enable new handler calls upon malloc failures */
  22.  
  23. int _newmode = 0;       /* Malloc New Handler MODE */
  24.  
  25.  
  26.