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
64d18bc1
Commit
64d18bc1
authored
Mar 15, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Mar 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4/tests: COM cleanup in cstub.c.
parent
2cd225b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
cstub.c
dlls/rpcrt4/tests/cstub.c
+11
-5
No files found.
dlls/rpcrt4/tests/cstub.c
View file @
64d18bc1
...
@@ -691,10 +691,15 @@ static IUnknownVtbl create_stub_test_fail_vtbl =
...
@@ -691,10 +691,15 @@ static IUnknownVtbl create_stub_test_fail_vtbl =
struct
dummy_unknown
struct
dummy_unknown
{
{
const
IUnknownVtbl
*
vtbl
;
IUnknown
IUnknown_iface
;
LONG
ref
;
LONG
ref
;
};
};
static
inline
struct
dummy_unknown
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
dummy_unknown
,
IUnknown_iface
);
}
static
HRESULT
WINAPI
dummy_QueryInterface
(
IUnknown
*
This
,
REFIID
iid
,
void
**
ppv
)
static
HRESULT
WINAPI
dummy_QueryInterface
(
IUnknown
*
This
,
REFIID
iid
,
void
**
ppv
)
{
{
*
ppv
=
NULL
;
*
ppv
=
NULL
;
...
@@ -703,13 +708,13 @@ static HRESULT WINAPI dummy_QueryInterface(IUnknown *This, REFIID iid, void **pp
...
@@ -703,13 +708,13 @@ static HRESULT WINAPI dummy_QueryInterface(IUnknown *This, REFIID iid, void **pp
static
ULONG
WINAPI
dummy_AddRef
(
LPUNKNOWN
iface
)
static
ULONG
WINAPI
dummy_AddRef
(
LPUNKNOWN
iface
)
{
{
struct
dummy_unknown
*
this
=
(
struct
dummy_unknown
*
)
iface
;
struct
dummy_unknown
*
this
=
impl_from_IUnknown
(
iface
)
;
return
InterlockedIncrement
(
&
this
->
ref
);
return
InterlockedIncrement
(
&
this
->
ref
);
}
}
static
ULONG
WINAPI
dummy_Release
(
LPUNKNOWN
iface
)
static
ULONG
WINAPI
dummy_Release
(
LPUNKNOWN
iface
)
{
{
struct
dummy_unknown
*
this
=
(
struct
dummy_unknown
*
)
iface
;
struct
dummy_unknown
*
this
=
impl_from_IUnknown
(
iface
)
;
return
InterlockedDecrement
(
&
this
->
ref
);
return
InterlockedDecrement
(
&
this
->
ref
);
}
}
...
@@ -719,7 +724,7 @@ static IUnknownVtbl dummy_unknown_vtbl =
...
@@ -719,7 +724,7 @@ static IUnknownVtbl dummy_unknown_vtbl =
dummy_AddRef
,
dummy_AddRef
,
dummy_Release
dummy_Release
};
};
static
struct
dummy_unknown
dummy_unknown
=
{
&
dummy_unknown_vtbl
,
0
};
static
struct
dummy_unknown
dummy_unknown
=
{
{
&
dummy_unknown_vtbl
}
,
0
};
static
void
create_proxy_test
(
IPSFactoryBuffer
*
ppsf
,
REFIID
iid
,
const
void
*
expected_vtbl
)
static
void
create_proxy_test
(
IPSFactoryBuffer
*
ppsf
,
REFIID
iid
,
const
void
*
expected_vtbl
)
{
{
...
@@ -737,7 +742,8 @@ static void create_proxy_test( IPSFactoryBuffer *ppsf, REFIID iid, const void *e
...
@@ -737,7 +742,8 @@ static void create_proxy_test( IPSFactoryBuffer *ppsf, REFIID iid, const void *e
ok
(
count
==
0
,
"wrong refcount %u
\n
"
,
count
);
ok
(
count
==
0
,
"wrong refcount %u
\n
"
,
count
);
dummy_unknown
.
ref
=
4
;
dummy_unknown
.
ref
=
4
;
r
=
IPSFactoryBuffer_CreateProxy
(
ppsf
,
(
IUnknown
*
)
&
dummy_unknown
,
iid
,
&
proxy
,
(
void
**
)
&
iface
);
r
=
IPSFactoryBuffer_CreateProxy
(
ppsf
,
&
dummy_unknown
.
IUnknown_iface
,
iid
,
&
proxy
,
(
void
**
)
&
iface
);
ok
(
r
==
S_OK
,
"IPSFactoryBuffer_CreateProxy failed %x
\n
"
,
r
);
ok
(
r
==
S_OK
,
"IPSFactoryBuffer_CreateProxy failed %x
\n
"
,
r
);
ok
(
dummy_unknown
.
ref
==
5
,
"wrong refcount %u
\n
"
,
dummy_unknown
.
ref
);
ok
(
dummy_unknown
.
ref
==
5
,
"wrong refcount %u
\n
"
,
dummy_unknown
.
ref
);
ok
(
*
(
void
**
)
iface
==
expected_vtbl
,
"wrong iface pointer %p/%p
\n
"
,
*
(
void
**
)
iface
,
expected_vtbl
);
ok
(
*
(
void
**
)
iface
==
expected_vtbl
,
"wrong iface pointer %p/%p
\n
"
,
*
(
void
**
)
iface
,
expected_vtbl
);
...
...
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