65#define DECLARE_STD_UNKNOWN() \
66 STDMETHODIMP_(NTSTATUS) NonDelegatingQueryInterface( \
70 STDMETHODIMP_(NTSTATUS) QueryInterface( \
74 return GetOuterUnknown()->QueryInterface(riid, ppv); \
77 STDMETHODIMP_(ULONG) AddRef() \
79 return GetOuterUnknown()->AddRef(); \
82 STDMETHODIMP_(ULONG) Release() \
84 return GetOuterUnknown()->Release(); \
87#define DEFINE_STD_CONSTRUCTOR(classname) \
88 classname(PUNKNOWN outer_unknown) \
89 : CUnknown(outer_unknown) \
134#define QICAST(typename) \
135 PVOID( (typename) (this) )
137#define QICASTUNKNOWN(typename) \
138 PVOID( PUNKNOWN( (typename) (this) ) )
140#define STD_CREATE_BODY_WITH_TAG_(classname, unknown, outer_unknown, pool_type, tag, base) \
141 classname *new_ptr = new(pool_type, tag) classname(outer_unknown); \
144 return STATUS_INSUFFICIENT_RESOURCES; \
146 *unknown = PUNKNOWN((base)(new_ptr)); \
147 (*unknown)->AddRef(); \
148 return STATUS_SUCCESS
150#define STD_CREATE_BODY_WITH_TAG(classname, unknown, outer_unknown, pool_type, tag, base) \
151 STD_CREATE_BODY_WITH_TAG_(classname, unknown, outer_unknown, pool_type, tag, PUNKNOWN)
153#define STD_CREATE_BODY_(classname, unknown, outer_unknown, pool_type, base) \
154 STD_CREATE_BODY_WITH_TAG_(classname, unknown, outer_unknown, pool_type, 'rCcP', base)
156#define STD_CREATE_BODY(classname, unknown, outer_unknown, pool_type) \
157 STD_CREATE_BODY_(classname, unknown, outer_unknown, pool_type, PUNKNOWN)
164#ifndef _NEW_DELETE_OPERATORS_
165#define _NEW_DELETE_OPERATORS_
#define DECLARE_INTERFACE(i)
#define STDMETHODCALLTYPE
PVOID KCOM_New(size_t size, POOL_TYPE pool_type, ULONG tag)
#define ExAllocatePoolWithTag(hernya, size, tag)
unsigned __int3264 UINT_PTR
ULONG STDMETHODCALLTYPE Unknown_Release(IUnknown *unknown_this)
ULONG STDMETHODCALLTYPE Unknown_AddRef(IUnknown *unknown_this)
NTSTATUS STDMETHODCALLTYPE Unknown_QueryInterface(IUnknown *this, IN REFIID refiid, OUT PVOID *output)
INonDelegatingUnknown * PNONDELEGATINGUNKNOWN
INonDelegatingUnknown INonDelegatingUnknown
#define RtlZeroMemory(Destination, Length)