ReactOS 0.4.15-dev-8102-g108db8f
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
12extern "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
44
46
48};
49
50#endif /* __IUnknown_INTERFACE_DEFINED__ */
51
52#undef INTERFACE
53
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
74typedef HRESULT
77 _In_ REFCLSID ClassId,
78 _In_ PUNKNOWN OuterUnknown,
80
81#endif /* _UNKNOWN_H_ */
LONG NTSTATUS
Definition: precomp.h:26
#define PURE
Definition: basetyps.h:64
#define THIS_
Definition: basetyps.h:65
#define THIS
Definition: basetyps.h:66
#define STDMETHOD_(t, m)
Definition: basetyps.h:63
#define DECLARE_INTERFACE(i)
Definition: basetyps.h:73
const GUID IID_IUnknown
_In_ BOOLEAN Release
Definition: cdrom.h:920
@ Unknown
Definition: i8042prt.h:114
static HRESULT QueryInterface(REFIID, void **)
Definition: events.c:2587
static ULONG WINAPI AddRef(IStream *iface)
Definition: clist.c:90
#define _Out_
Definition: ms_sal.h:345
#define _COM_Outptr_
Definition: ms_sal.h:449
#define _In_
Definition: ms_sal.h:308
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
IUnknown * PUNKNOWN
Definition: punknown.h:54
HRESULT(NTAPI * PFNCREATEINSTANCE)(_Out_ PUNKNOWN *Unknown, _In_ REFCLSID ClassId, _In_ PUNKNOWN OuterUnknown, _In_ POOL_TYPE PoolType)
Definition: punknown.h:75
INT POOL_TYPE
Definition: typedefs.h:78
#define NTAPI
Definition: typedefs.h:36
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
#define HRESULT
Definition: msvc.h:7