ReactOS  0.4.15-dev-449-g64abd9f
punknown.h
Go to the documentation of this file.
1 /*
2  ReactOS Kernel-Mode COM
3  by Andrew Greenwood
4 
5  This file is in the public domain.
6 */
7 
8 #ifndef _UNKNOWN_H_
9 #define _UNKNOWN_H_
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #include <wdm.h>
14 }
15 #else
16 #include <wdm.h>
17 #endif
18 
19 #include <windef.h>
20 #define COM_NO_WINDOWS_H
21 #include <basetyps.h>
22 
23 #ifdef PUT_GUIDS_HERE
24 #include <initguid.h>
25 #endif
26 
27 /* ===============================================================
28  IUnknown
29 */
30 
31 #ifndef __IUnknown_INTERFACE_DEFINED__
32 #define __IUnknown_INTERFACE_DEFINED__
33 
35  0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46);
36 
37 #undef INTERFACE
38 #define INTERFACE IUnknown
39 
42  _In_ REFIID,
44 
46 
48 };
49 
50 #endif /* __IUnknown_INTERFACE_DEFINED__ */
51 
52 #undef INTERFACE
53 
54 typedef IUnknown *PUNKNOWN;
55 
56 /* ===============================================================
57  IUnknown definition
58  Boilerplate code macro for use in subclassed interfaces
59 */
60 
61 #define DEFINE_ABSTRACT_UNKNOWN() \
62  STDMETHOD_(NTSTATUS, QueryInterface)( THIS_ \
63  REFIID InterfaceId, \
64  PVOID* Interface) PURE; \
65  \
66  STDMETHOD_(ULONG, AddRef)(THIS) PURE; \
67  \
68  STDMETHOD_(ULONG, Release)(THIS) PURE;
69 
70 /* ===============================================================
71  Constructor callback definition
72 */
73 
74 typedef HRESULT
77  _In_ REFCLSID ClassId,
78  _In_ PUNKNOWN OuterUnknown,
80 
81 #endif /* _UNKNOWN_H_ */
#define HRESULT
Definition: msvc.h:7
#define REFIID
Definition: guiddef.h:118
#define THIS_
Definition: basetyps.h:65
_In_ BOOLEAN Release
Definition: classpnp.h:929
#define THIS
Definition: basetyps.h:66
#define REFCLSID
Definition: guiddef.h:117
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
LONG NTSTATUS
Definition: precomp.h:26
IUnknown * PUNKNOWN
Definition: punknown.h:48
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
#define _Out_
Definition: no_sal2.h:323
DEFINE_GUID(IID_IUnknown, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46)
INT POOL_TYPE
Definition: typedefs.h:77
const GUID IID_IUnknown
DECLARE_INTERFACE(IUnknown)
Definition: punknown.h:40
#define _COM_Outptr_
Definition: no_sal2.h:14
#define _In_
Definition: no_sal2.h:204
#define PURE
Definition: basetyps.h:64
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
unsigned int ULONG
Definition: retypes.h:1
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
HRESULT(NTAPI * PFNCREATEINSTANCE)(_Out_ PUNKNOWN *Unknown, _In_ REFCLSID ClassId, _In_ PUNKNOWN OuterUnknown, _In_ POOL_TYPE PoolType)
Definition: punknown.h:75