ReactOS Kernel-Mode COM
IUnknown implementations
- LICENSE
- Please see COPYING in the top-level directory for license information.
+ This file is in the public domain.
AUTHORS
Andrew Greenwood
#include <punknown.h>
+/* Helper macro to enable gcc's extension. */
+#ifndef __GNU_EXTENSION
+#ifdef __GNUC__
+#define __GNU_EXTENSION __extension__
+#else
+#define __GNU_EXTENSION
+#endif
+#endif
+
/* ===============================================================
INonDelegatingUnknown interface
*/
#else /* Not C++ - this is probably very buggy... */
-STDMETHODCALLTYPE
NTSTATUS
+STDMETHODCALLTYPE
Unknown_QueryInterface(
IUnknown* this,
IN REFIID refiid,
OUT PVOID* output);
-STDMETHODCALLTYPE
ULONG
+STDMETHODCALLTYPE
Unknown_AddRef(
IUnknown* unknown_this);
-STDMETHODCALLTYPE
ULONG
+STDMETHODCALLTYPE
Unknown_Release(
IUnknown* unknown_this);
typedef struct CUnknown
{
- union
+ __GNU_EXTENSION union
{
IUnknown IUnknown;
INonDelegatingUnknown INonDelegatingUnknown;
Custom "new" and "delete" C++ operators
*/
-#ifndef ALLOCATION_OPERATORS_DEFINED
-#define ALLOCATION_OPERATORS_DEFINED
+#ifndef _NEW_DELETE_OPERATORS_
+#define _NEW_DELETE_OPERATORS_
inline PVOID
KCOM_New(