source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/ddk/punknown.h@ 1180

Last change on this file since 1180 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 1.6 KB
Line 
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/* ===============================================================
29 IUnknown
30*/
31
32#ifndef __IUnknown_INTERFACE_DEFINED__
33#define __IUnknown_INTERFACE_DEFINED__
34DEFINE_GUID(
35 IID_IUnknown,
36 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x46);
37
38#undef INTERFACE
39#define INTERFACE IUnknown
40
41DECLARE_INTERFACE(IUnknown)
42{
43 STDMETHOD_(NTSTATUS, QueryInterface)( THIS_
44 IN REFIID,
45 OUT PVOID*)
46 PURE;
47
48 STDMETHOD_(ULONG, AddRef)( THIS )
49 PURE;
50
51 STDMETHOD_(ULONG, Release)( THIS )
52 PURE;
53};
54#endif
55
56#undef INTERFACE
57
58typedef IUnknown *PUNKNOWN;
59
60
61/* ===============================================================
62 IUnknown definition
63 Boilerplate code macro for use in subclassed interfaces
64*/
65
66#define DEFINE_ABSTRACT_UNKNOWN() \
67 STDMETHOD_(NTSTATUS, QueryInterface)( THIS_ \
68 REFIID InterfaceId, \
69 PVOID* Interface) \
70 PURE; \
71\
72 STDMETHOD_(ULONG, AddRef)(THIS) \
73 PURE; \
74\
75 STDMETHOD_(ULONG, Release)(THIS) \
76 PURE;
77
78
79/* ===============================================================
80 Constructor callback definition
81*/
82
83typedef HRESULT (NTAPI *PFNCREATEINSTANCE)(
84 OUT PUNKNOWN* Unknown,
85 IN REFCLSID ClassId,
86 IN PUNKNOWN OuterUnknown,
87 IN POOL_TYPE PoolType);
88
89#endif /* _UNKNOWN_H_ */
90
Note: See TracBrowser for help on using the repository browser.