Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b1bfae28
Commit
b1bfae28
authored
Mar 31, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Apr 02, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Use a safe APC to kill the PullPin thread when the PullPin is being released.
parent
9d1f49cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
pin.c
dlls/quartz/pin.c
+17
-1
No files found.
dlls/quartz/pin.c
View file @
b1bfae28
...
...
@@ -1121,6 +1121,15 @@ HRESULT WINAPI PullPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const
return
hr
;
}
static
void
CALLBACK
PullPin_SafeThreadStop
(
ULONG_PTR
handle
)
{
HANDLE
hThread
=
(
HANDLE
)
handle
;
if
(
hThread
)
CloseHandle
(
hThread
);
ExitThread
(
0
);
}
HRESULT
WINAPI
PullPin_QueryInterface
(
IPin
*
iface
,
REFIID
riid
,
LPVOID
*
ppv
)
{
PullPin
*
This
=
(
PullPin
*
)
iface
;
...
...
@@ -1155,7 +1164,14 @@ ULONG WINAPI PullPin_Release(IPin * iface)
if
(
!
refCount
)
{
if
(
This
->
hThread
)
PullPin_StopProcessing
(
This
);
{
HRESULT
hr
;
if
(
!
QueueUserAPC
(
PullPin_SafeThreadStop
,
This
->
hThread
,
(
ULONG_PTR
)
This
->
hThread
))
ERR
(
"Cannot stop PullPin thread (GetLastError() = %d)!"
,
GetLastError
());
if
(
This
->
pAlloc
&&
FAILED
(
hr
=
IMemAllocator_Decommit
(
This
->
pAlloc
)))
ERR
(
"Allocator decommit failed with error %x. Possible memory leak
\n
"
,
hr
);
}
if
(
This
->
pAlloc
)
IMemAllocator_Release
(
This
->
pAlloc
);
if
(
This
->
pReader
)
...
...
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