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.

23 lines
807 B

  1. #ifndef _BSTRDEBUG_H
  2. #define _BSTRDEBUG_H
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // BSTR debugging.
  7. // GIVEAWAY is used when someone else will free it
  8. // TAKEOVER is used when you get one you should be freeing
  9. #define ALLOC_BSTR(x) SysAllocString(x)
  10. #define ALLOC_BSTR_LEN(x,y) SysAllocStringLen(x,y)
  11. #define ALLOC_BSTR_BYTE_LEN(x,y) SysAllocStringByteLen(x,y)
  12. #define ALLOC_AND_GIVEAWAY_BSTR(x) SysAllocString(x)
  13. #define ALLOC_AND_GIVEAWAY_BSTR_LEN(x,y) SysAllocStringLen(x,y)
  14. #define ALLOC_AND_GIVEAWAY_BSTR_BYTE_LEN(x,y) SysAllocStringByteLen(x,y)
  15. #define GIVEAWAY_BSTR(x)
  16. #define TAKEOVER_BSTR(x)
  17. #define FREE_BSTR(x) SysFreeString(x)
  18. #endif