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

#ifndef _BSTRDEBUG_H
#define _BSTRDEBUG_H
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// BSTR debugging.
// GIVEAWAY is used when someone else will free it
// TAKEOVER is used when you get one you should be freeing
#define ALLOC_BSTR(x) SysAllocString(x)
#define ALLOC_BSTR_LEN(x,y) SysAllocStringLen(x,y)
#define ALLOC_BSTR_BYTE_LEN(x,y) SysAllocStringByteLen(x,y)
#define ALLOC_AND_GIVEAWAY_BSTR(x) SysAllocString(x)
#define ALLOC_AND_GIVEAWAY_BSTR_LEN(x,y) SysAllocStringLen(x,y)
#define ALLOC_AND_GIVEAWAY_BSTR_BYTE_LEN(x,y) SysAllocStringByteLen(x,y)
#define GIVEAWAY_BSTR(x)
#define TAKEOVER_BSTR(x)
#define FREE_BSTR(x) SysFreeString(x)
#endif