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
60884fc3
Commit
60884fc3
authored
Dec 05, 2005
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 05, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: driver unloading.
- properly handle drivers unloading when no session instance of the driver has been created
parent
34db4856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
driver.c
dlls/winmm/driver.c
+6
-2
winemm.h
dlls/winmm/winemm.h
+5
-2
No files found.
dlls/winmm/driver.c
View file @
60884fc3
...
...
@@ -291,6 +291,7 @@ LPWINE_DRIVER DRIVER_TryOpenDriver32(LPCWSTR fn, LPARAM lParam2)
cause
=
"load1 failed"
;
goto
exit
;
}
lpDrv
->
dwFlags
|=
WINE_GDF_SESSION
;
return
ret
;
}
...
...
@@ -416,8 +417,11 @@ LRESULT WINAPI CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
{
LPWINE_DRIVER
lpDrv0
;
if
(
lpDrv
->
dwFlags
&
WINE_GDF_SESSION
)
FIXME
(
"Shouldn't happen (%p)
\n
"
,
lpDrv
);
/* if driver has an opened session instance, we have to close it too */
if
(
DRIVER_GetNumberOfModuleRefs
(
lpDrv
->
d
.
d32
.
hModule
,
&
lpDrv0
)
==
1
)
if
(
DRIVER_GetNumberOfModuleRefs
(
lpDrv
->
d
.
d32
.
hModule
,
&
lpDrv0
)
==
1
&&
(
lpDrv0
->
dwFlags
&
WINE_GDF_SESSION
))
{
DRIVER_SendMessage
(
lpDrv0
,
DRV_CLOSE
,
0L
,
0L
);
lpDrv0
->
d
.
d32
.
dwDriverID
=
0
;
...
...
@@ -456,7 +460,7 @@ DWORD WINAPI GetDriverFlags(HDRVR hDrvr)
TRACE
(
"(%p)
\n
"
,
hDrvr
);
if
((
lpDrv
=
DRIVER_FindFromHDrvr
(
hDrvr
))
!=
NULL
)
{
ret
=
WINE_GDF_EXIST
|
lpDrv
->
dwFlags
;
ret
=
WINE_GDF_EXIST
|
(
lpDrv
->
dwFlags
&
WINE_GDF_EXTERNAL_MASK
)
;
}
return
ret
;
}
...
...
dlls/winmm/winemm.h
View file @
60884fc3
...
...
@@ -306,8 +306,11 @@ extern unsigned (*pFnLoadMMDrvFunc16)(LPCSTR,LPWINE_DRIVER, LPWINE_MM_DR
extern
LRESULT
(
*
pFnMmioCallback16
)(
DWORD
,
LPMMIOINFO
,
UINT
,
LPARAM
,
LPARAM
);
extern
void
(
WINAPI
*
pFnReleaseThunkLock
)(
DWORD
*
);
extern
void
(
WINAPI
*
pFnRestoreThunkLock
)(
DWORD
);
/* GetDriverFlags() returned bits is not documented (nor the call itself)
* Here are Wine only definitions of the bits
*/
#define WINE_GDF_EXIST 0x80000000
#define WINE_GDF_16BIT 0x10000000
#define WINE_GDF_EXIST 0x80000000
#define WINE_GDF_16BIT 0x10000000
#define WINE_GDF_EXTERNAL_MASK 0xF0000000
#define WINE_GDF_SESSION 0x00000001
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