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
ed62b015
Commit
ed62b015
authored
May 19, 2006
by
Robert Reif
Committed by
Alexandre Julliard
May 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix wave test handle use after close bug.
parent
94cc17b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
wave.c
dlls/winmm/tests/wave.c
+12
-3
No files found.
dlls/winmm/tests/wave.c
View file @
ed62b015
...
...
@@ -534,8 +534,13 @@ static DWORD WINAPI callback_thread(LPVOID lpParameter)
{
MSG
msg
;
while
(
GetMessage
(
&
msg
,
0
,
0
,
0
))
SetEvent
((
HANDLE
)
lpParameter
);
while
(
GetMessage
(
&
msg
,
0
,
0
,
0
))
{
UINT
message
=
msg
.
message
;
ok
(
message
==
WOM_OPEN
||
message
==
WOM_DONE
||
message
==
WOM_CLOSE
,
"GetMessage returned unexpected message: %u
\n
"
,
message
);
if
(
message
==
WOM_OPEN
||
message
==
WOM_DONE
||
message
==
WOM_CLOSE
)
SetEvent
((
HANDLE
)
lpParameter
);
}
return
0
;
}
...
...
@@ -579,16 +584,20 @@ static void wave_out_test_deviceOut(int device, double duration,
callback_instance
=
0
;
}
else
{
trace
(
"CreateThread() failed
\n
"
);
CloseHandle
(
hevent
);
return
;
}
}
else
if
((
flags
&
CALLBACK_TYPEMASK
)
==
CALLBACK_WINDOW
)
{
trace
(
"CALLBACK_THREAD not implemented
\n
"
);
CloseHandle
(
hevent
);
return
;
}
else
if
(
flags
&&
CALLBACK_TYPEMASK
)
{
trace
(
"Undefined callback type!
\n
"
);
CloseHandle
(
hevent
);
return
;
}
else
{
trace
(
"CALLBACK_NULL not implemented
\n
"
);
CloseHandle
(
hevent
);
return
;
}
wout
=
NULL
;
...
...
@@ -728,12 +737,12 @@ static void wave_out_test_deviceOut(int device, double duration,
wave_out_error
(
rc
));
free
(
frag
.
lpData
);
CloseHandle
(
hevent
);
rc
=
waveOutClose
(
wout
);
ok
(
rc
==
MMSYSERR_NOERROR
,
"waveOutClose(%s): rc=%s
\n
"
,
dev_name
(
device
),
wave_out_error
(
rc
));
if
((
flags
&
CALLBACK_TYPEMASK
)
==
CALLBACK_THREAD
)
TerminateThread
(
thread
,
0
);
CloseHandle
(
hevent
);
}
static
void
wave_out_test_device
(
int
device
)
...
...
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