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
487c691d
Commit
487c691d
authored
Aug 23, 2006
by
Huw Davies
Committed by
Alexandre Julliard
Aug 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Tests for CStdStubBuffer_Disconnect and a tidy up of the implementation.
parent
f42f727f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
cstub.c
dlls/rpcrt4/cstub.c
+8
-7
cstub.c
dlls/rpcrt4/tests/cstub.c
+14
-0
No files found.
dlls/rpcrt4/cstub.c
View file @
487c691d
...
...
@@ -149,13 +149,14 @@ HRESULT WINAPI CStdStubBuffer_Connect(LPRPCSTUBBUFFER iface,
void
WINAPI
CStdStubBuffer_Disconnect
(
LPRPCSTUBBUFFER
iface
)
{
CStdStubBuffer
*
This
=
(
CStdStubBuffer
*
)
iface
;
TRACE
(
"(%p)->Disconnect()
\n
"
,
This
);
if
(
This
->
pvServerObject
)
{
IUnknown_Release
(
This
->
pvServerObject
);
This
->
pvServerObject
=
NULL
;
}
CStdStubBuffer
*
This
=
(
CStdStubBuffer
*
)
iface
;
IUnknown
*
old
;
TRACE
(
"(%p)->Disconnect()
\n
"
,
This
);
old
=
InterlockedExchangePointer
((
void
**
)
&
This
->
pvServerObject
,
NULL
);
if
(
old
)
IUnknown_Release
(
old
);
}
HRESULT
WINAPI
CStdStubBuffer_Invoke
(
LPRPCSTUBBUFFER
iface
,
...
...
dlls/rpcrt4/tests/cstub.c
View file @
487c691d
...
...
@@ -703,6 +703,19 @@ static void test_Connect(IPSFactoryBuffer *ppsf)
ok
(
connect_test_orig_release_called
==
2
,
"release called %d
\n
"
,
connect_test_orig_release_called
);
}
static
void
test_Disconnect
(
IPSFactoryBuffer
*
ppsf
)
{
IUnknownVtbl
*
orig_vtbl
=
&
connect_test_orig_vtbl
;
IUnknown
*
obj
=
(
IUnknown
*
)
&
orig_vtbl
;
IRpcStubBuffer
*
pstub
=
create_stub
(
ppsf
,
&
IID_if1
,
obj
,
S_OK
);
CStdStubBuffer
*
cstd_stub
=
(
CStdStubBuffer
*
)
pstub
;
connect_test_orig_release_called
=
0
;
IRpcStubBuffer_Disconnect
(
pstub
);
ok
(
connect_test_orig_release_called
==
1
,
"release called %d
\n
"
,
connect_test_orig_release_called
);
ok
(
cstd_stub
->
pvServerObject
==
NULL
,
"pvServerObject %p
\n
"
,
cstd_stub
->
pvServerObject
);
}
START_TEST
(
cstub
)
{
IPSFactoryBuffer
*
ppsf
;
...
...
@@ -713,6 +726,7 @@ START_TEST( cstub )
test_NdrStubForwardingFunction
();
test_CreateStub
(
ppsf
);
test_Connect
(
ppsf
);
test_Disconnect
(
ppsf
);
OleUninitialize
();
}
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