ReactOS
0.4.16-dev-1238-gd80fdbe
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
unknownbase.h
Go to the documentation of this file.
1
#ifndef APITESTS_UNKNOWNBASE_H
2
#define APITESTS_UNKNOWNBASE_H
3
4
template
<
typename
Interface>
5
class
CUnknownBase
:
public
Interface
6
{
7
LONG
m_lRef
;
8
bool
m_AutoDelete
;
9
protected
:
10
virtual
const
QITAB
*
GetQITab
() = 0;
11
public
:
12
13
CUnknownBase
(
bool
autoDelete =
true
,
LONG
initialRef = 0)
14
:
m_lRef
(initialRef),
15
m_AutoDelete
(autoDelete)
16
{
17
}
18
19
ULONG
STDMETHODCALLTYPE
AddRef
()
20
{
21
return
InterlockedIncrement
( &
m_lRef
);
22
}
23
24
ULONG
STDMETHODCALLTYPE
Release
()
25
{
26
long
newref =
InterlockedDecrement
( &
m_lRef
);
27
if
(
m_AutoDelete
&& newref<=0)
28
{
29
delete
this
;
30
}
31
return
newref;
32
}
33
34
HRESULT
STDMETHODCALLTYPE
QueryInterface
(
REFIID
riid
,
void
**
ppv
)
35
{
36
return
QISearch
(
this
,
GetQITab
(),
riid
,
ppv
);
37
}
38
39
virtual
~CUnknownBase
() {}
40
41
LONG
GetRef
()
const
42
{
43
return
m_lRef
;
44
}
45
};
46
47
#endif
// APITESTS_UNKNOWNBASE_H
InterlockedIncrement
#define InterlockedIncrement
Definition:
armddk.h:53
InterlockedDecrement
#define InterlockedDecrement
Definition:
armddk.h:52
STDMETHODCALLTYPE
#define STDMETHODCALLTYPE
Definition:
bdasup.h:9
CUnknownBase
Definition:
unknownbase.h:6
CUnknownBase::m_AutoDelete
bool m_AutoDelete
Definition:
unknownbase.h:8
CUnknownBase::GetRef
LONG GetRef() const
Definition:
unknownbase.h:41
CUnknownBase::Release
ULONG STDMETHODCALLTYPE Release()
Definition:
unknownbase.h:24
CUnknownBase::m_lRef
LONG m_lRef
Definition:
unknownbase.h:7
CUnknownBase::GetQITab
virtual const QITAB * GetQITab()=0
CUnknownBase::QueryInterface
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppv)
Definition:
unknownbase.h:34
CUnknownBase::CUnknownBase
CUnknownBase(bool autoDelete=true, LONG initialRef=0)
Definition:
unknownbase.h:13
CUnknownBase::AddRef
ULONG STDMETHODCALLTYPE AddRef()
Definition:
unknownbase.h:19
CUnknownBase::~CUnknownBase
virtual ~CUnknownBase()
Definition:
unknownbase.h:39
QISearch
HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj)
Definition:
main.c:421
riid
REFIID riid
Definition:
atlbase.h:39
ppv
REFIID LPVOID * ppv
Definition:
atlbase.h:39
HRESULT
Definition:
mshtmhst.idl:286
LONG
long LONG
Definition:
pedump.c:60
REFIID
#define REFIID
Definition:
guiddef.h:118
QITAB
Definition:
shlwapi.h:2129
ULONG
uint32_t ULONG
Definition:
typedefs.h:59
Interface
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE Interface
Definition:
wdffdo.h:465
modules
rostests
apitests
include
unknownbase.h
Generated on Tue Jun 3 2025 06:12:10 for ReactOS by
1.9.6