Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
be5bb185
Commit
be5bb185
authored
Dec 04, 2010
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Dec 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use an iface instead of a vtbl pointer in EnumOLEVERB.
parent
b194b778
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
ole2.c
dlls/ole32/ole2.c
+15
-10
No files found.
dlls/ole32/ole2.c
View file @
be5bb185
...
@@ -812,13 +812,18 @@ static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **
...
@@ -812,13 +812,18 @@ static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **
typedef
struct
typedef
struct
{
{
const
IEnumOLEVERBVtbl
*
lpvtbl
;
IEnumOLEVERB
IEnumOLEVERB_iface
;
LONG
ref
;
LONG
ref
;
HKEY
hkeyVerb
;
HKEY
hkeyVerb
;
ULONG
index
;
ULONG
index
;
}
EnumOLEVERB
;
}
EnumOLEVERB
;
static
inline
EnumOLEVERB
*
impl_from_IEnumOLEVERB
(
IEnumOLEVERB
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
EnumOLEVERB
,
IEnumOLEVERB_iface
);
}
static
HRESULT
WINAPI
EnumOLEVERB_QueryInterface
(
static
HRESULT
WINAPI
EnumOLEVERB_QueryInterface
(
IEnumOLEVERB
*
iface
,
REFIID
riid
,
void
**
ppv
)
IEnumOLEVERB
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
{
...
@@ -836,7 +841,7 @@ static HRESULT WINAPI EnumOLEVERB_QueryInterface(
...
@@ -836,7 +841,7 @@ static HRESULT WINAPI EnumOLEVERB_QueryInterface(
static
ULONG
WINAPI
EnumOLEVERB_AddRef
(
static
ULONG
WINAPI
EnumOLEVERB_AddRef
(
IEnumOLEVERB
*
iface
)
IEnumOLEVERB
*
iface
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
return
InterlockedIncrement
(
&
This
->
ref
);
return
InterlockedIncrement
(
&
This
->
ref
);
}
}
...
@@ -844,7 +849,7 @@ static ULONG WINAPI EnumOLEVERB_AddRef(
...
@@ -844,7 +849,7 @@ static ULONG WINAPI EnumOLEVERB_AddRef(
static
ULONG
WINAPI
EnumOLEVERB_Release
(
static
ULONG
WINAPI
EnumOLEVERB_Release
(
IEnumOLEVERB
*
iface
)
IEnumOLEVERB
*
iface
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
LONG
refs
=
InterlockedDecrement
(
&
This
->
ref
);
LONG
refs
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
if
(
!
refs
)
if
(
!
refs
)
...
@@ -859,7 +864,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
...
@@ -859,7 +864,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
IEnumOLEVERB
*
iface
,
ULONG
celt
,
LPOLEVERB
rgelt
,
IEnumOLEVERB
*
iface
,
ULONG
celt
,
LPOLEVERB
rgelt
,
ULONG
*
pceltFetched
)
ULONG
*
pceltFetched
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
=
S_OK
;
TRACE
(
"(%d, %p, %p)
\n
"
,
celt
,
rgelt
,
pceltFetched
);
TRACE
(
"(%d, %p, %p)
\n
"
,
celt
,
rgelt
,
pceltFetched
);
...
@@ -946,7 +951,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
...
@@ -946,7 +951,7 @@ static HRESULT WINAPI EnumOLEVERB_Next(
static
HRESULT
WINAPI
EnumOLEVERB_Skip
(
static
HRESULT
WINAPI
EnumOLEVERB_Skip
(
IEnumOLEVERB
*
iface
,
ULONG
celt
)
IEnumOLEVERB
*
iface
,
ULONG
celt
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
TRACE
(
"(%d)
\n
"
,
celt
);
TRACE
(
"(%d)
\n
"
,
celt
);
...
@@ -957,7 +962,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip(
...
@@ -957,7 +962,7 @@ static HRESULT WINAPI EnumOLEVERB_Skip(
static
HRESULT
WINAPI
EnumOLEVERB_Reset
(
static
HRESULT
WINAPI
EnumOLEVERB_Reset
(
IEnumOLEVERB
*
iface
)
IEnumOLEVERB
*
iface
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
TRACE
(
"()
\n
"
);
TRACE
(
"()
\n
"
);
...
@@ -969,7 +974,7 @@ static HRESULT WINAPI EnumOLEVERB_Clone(
...
@@ -969,7 +974,7 @@ static HRESULT WINAPI EnumOLEVERB_Clone(
IEnumOLEVERB
*
iface
,
IEnumOLEVERB
*
iface
,
IEnumOLEVERB
**
ppenum
)
IEnumOLEVERB
**
ppenum
)
{
{
EnumOLEVERB
*
This
=
(
EnumOLEVERB
*
)
iface
;
EnumOLEVERB
*
This
=
impl_from_IEnumOLEVERB
(
iface
)
;
HKEY
hkeyVerb
;
HKEY
hkeyVerb
;
TRACE
(
"(%p)
\n
"
,
ppenum
);
TRACE
(
"(%p)
\n
"
,
ppenum
);
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
This
->
hkeyVerb
,
GetCurrentProcess
(),
(
HANDLE
*
)
&
hkeyVerb
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
))
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
This
->
hkeyVerb
,
GetCurrentProcess
(),
(
HANDLE
*
)
&
hkeyVerb
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
))
...
@@ -996,12 +1001,12 @@ static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **
...
@@ -996,12 +1001,12 @@ static HRESULT EnumOLEVERB_Construct(HKEY hkeyVerb, ULONG index, IEnumOLEVERB **
RegCloseKey
(
hkeyVerb
);
RegCloseKey
(
hkeyVerb
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
This
->
lpv
tbl
=
&
EnumOLEVERB_VTable
;
This
->
IEnumOLEVERB_iface
.
lpV
tbl
=
&
EnumOLEVERB_VTable
;
This
->
ref
=
1
;
This
->
ref
=
1
;
This
->
index
=
index
;
This
->
index
=
index
;
This
->
hkeyVerb
=
hkeyVerb
;
This
->
hkeyVerb
=
hkeyVerb
;
*
ppenum
=
(
IEnumOLEVERB
*
)
&
This
->
lpvtbl
;
*
ppenum
=
&
This
->
IEnumOLEVERB_iface
;
return
S_OK
;
return
S_OK
;
}
}
/***********************************************************************
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment