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.

26 lines
767 B

  1. //=======================================================================
  2. //
  3. // Copyright (c) 2002 Microsoft Corporation. All Rights Reserved.
  4. //
  5. // File: MISTSafe.h
  6. //
  7. // Creator: PeterWi
  8. //
  9. // Purpose: Definitions related to safe functions.
  10. //
  11. //=======================================================================
  12. #pragma once
  13. #define STRSAFE_NO_DEPRECATE
  14. #include <strsafe.h>
  15. // Flag you should add to your String* functions to safe fill behind
  16. // the complete buffer in chk builds to help locate buffer problems.
  17. // e.g. StringCchCopyEx(szDest, cchDest, szSrc, &pszDestEnd, &cchRemaining, MISTSAFE_STRING_FLAGS);
  18. #ifdef DBG
  19. #define MISTSAFE_STRING_FLAGS STRSAFE_FILL_BEHIND_NULL
  20. #else
  21. #define MISTSAFE_STRING_FLAGS STRSAFE_IGNORE_NULLS
  22. #endif