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
2a64c6b1
Commit
2a64c6b1
authored
Nov 12, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Move driver support to mmsystem and replace it with stubs in user.exe.
parent
dd64dd55
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
90 additions
and
153 deletions
+90
-153
Makefile.in
dlls/mmsystem.dll16/Makefile.in
+1
-0
driver.c
dlls/mmsystem.dll16/driver.c
+15
-95
mmsystem.c
dlls/mmsystem.dll16/mmsystem.c
+0
-52
Makefile.in
dlls/user32/Makefile.in
+0
-1
user16.c
dlls/user32/user16.c
+74
-0
user32.spec
dlls/user32/user32.spec
+0
-5
No files found.
dlls/mmsystem.dll16/Makefile.in
View file @
2a64c6b1
...
...
@@ -8,6 +8,7 @@ IMPORTS = winmm user32 kernel32
EXTRADLLFLAGS
=
-Wb
,--subsystem,win16,--main-module,winmm.dll
C_SRCS
=
\
driver.c
\
mci16.c
\
message16.c
\
mmio16.c
\
...
...
dlls/
user32/driver16
.c
→
dlls/
mmsystem.dll16/driver
.c
View file @
2a64c6b1
...
...
@@ -41,7 +41,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(driver);
typedef
struct
tagWINE_DRIVER
{
char
szAliasName
[
128
];
/* as usual LPWINE_DRIVER == hDriver32 */
HDRVR16
hDriver16
;
HMODULE16
hModule16
;
...
...
@@ -55,30 +54,6 @@ static LPWINE_DRIVER lpDrvItemList = NULL;
/**************************************************************************
* LoadStartupDrivers [internal]
*/
#if 0
static void DRIVER_LoadStartupDrivers(void)
{
char str[256];
if (GetPrivateProfileStringA("drivers", NULL, "", str, sizeof(str), "SYSTEM.INI") < 2) {
ERR("Can't find drivers section in system.ini\n");
} else {
HDRVR16 hDrv;
LPSTR ptr;
for (ptr = str; *ptr; ptr += strlen(ptr) + 1) {
TRACE("str='%s'\n", ptr);
hDrv = OpenDriver16(ptr, "drivers", 0L);
TRACE("hDrv=%04x\n", hDrv);
}
TRACE("end of list !\n");
}
}
#endif
/**************************************************************************
* DRIVER_GetNumberOfModuleRefs [internal]
*
* Returns the number of open drivers which share the same module.
...
...
@@ -138,10 +113,9 @@ static inline LRESULT DRIVER_SendMessage(LPWINE_DRIVER lpDrv, UINT16 msg,
}
/**************************************************************************
*
SendDriverMessage (USER.251
)
*
DrvSendMessage (MMSYSTEM.1102
)
*/
LRESULT
WINAPI
SendDriverMessage16
(
HDRVR16
hDriver
,
UINT16
msg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
LRESULT
WINAPI
DrvSendMessage16
(
HDRVR16
hDriver
,
UINT16
msg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
LPWINE_DRIVER
lpDrv
;
LRESULT
retval
=
0
;
...
...
@@ -262,7 +236,6 @@ static LPWINE_DRIVER DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam2)
lpDrv
->
dwDriverID
=
0
;
while
(
DRIVER_FindFromHDrvr16
(
++
DRIVER_hDrvr16Counter
));
lpDrv
->
hDriver16
=
DRIVER_hDrvr16Counter
;
lstrcpynA
(
lpDrv
->
szAliasName
,
lpSFN
,
sizeof
(
lpDrv
->
szAliasName
));
lpDrv
->
hModule16
=
hModule
;
lpDrv
->
lpDrvProc
=
lpProc
;
...
...
@@ -277,9 +250,9 @@ static LPWINE_DRIVER DRIVER_TryOpenDriver16(LPCSTR lpFileName, LPARAM lParam2)
}
/**************************************************************************
*
OpenDriver (USER.252
)
*
DrvOpen (MMSYSTEM.1100
)
*/
HDRVR16
WINAPI
OpenDriver
16
(
LPCSTR
lpDriverName
,
LPCSTR
lpSectionName
,
LPARAM
lParam2
)
HDRVR16
WINAPI
DrvOpen
16
(
LPCSTR
lpDriverName
,
LPCSTR
lpSectionName
,
LPARAM
lParam2
)
{
LPWINE_DRIVER
lpDrv
=
NULL
;
char
drvName
[
128
];
...
...
@@ -310,9 +283,9 @@ HDRVR16 WINAPI OpenDriver16(LPCSTR lpDriverName, LPCSTR lpSectionName, LPARAM lP
}
/**************************************************************************
*
CloseDriver (USER.253
)
*
DrvClose16 (MMSYSTEM.1101
)
*/
LRESULT
WINAPI
CloseDriver
16
(
HDRVR16
hDrvr
,
LPARAM
lParam1
,
LPARAM
lParam2
)
LRESULT
WINAPI
DrvClose
16
(
HDRVR16
hDrvr
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
LPWINE_DRIVER
lpDrv
;
...
...
@@ -331,9 +304,9 @@ LRESULT WINAPI CloseDriver16(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2)
}
/**************************************************************************
*
GetDriverModuleHandle (USER.254
)
*
DrvGetModuleHandle (MMSYSTEM.1103
)
*/
HMODULE16
WINAPI
GetDriver
ModuleHandle16
(
HDRVR16
hDrvr
)
HMODULE16
WINAPI
DrvGet
ModuleHandle16
(
HDRVR16
hDrvr
)
{
LPWINE_DRIVER
lpDrv
;
HMODULE16
hModule
=
0
;
...
...
@@ -348,10 +321,10 @@ HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDrvr)
}
/**************************************************************************
* D
efDriverProc (USER.255
)
* D
rvDefDriverProc (MMSYSTEM.1104
)
*/
LRESULT
WINAPI
DefDriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDriv
,
UINT16
wMsg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
LRESULT
WINAPI
D
rvD
efDriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDriv
,
UINT16
wMsg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
TRACE
(
"devID=0x%08x hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx
\n
"
,
dwDevID
,
hDriv
,
wMsg
,
lParam1
,
lParam2
);
...
...
@@ -378,63 +351,10 @@ LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
}
/**************************************************************************
*
GetDriverInfo (USER.25
6)
*
DriverProc (MMSYSTEM.
6)
*/
BOOL16
WINAPI
GetDriverInfo16
(
HDRVR16
hDrvr
,
LPDRIVERINFOSTRUCT16
lpDrvInfo
)
LRESULT
WINAPI
DriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDrv
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
LPWINE_DRIVER
lpDrv
;
BOOL16
ret
=
FALSE
;
TRACE
(
"(%04x, %p);
\n
"
,
hDrvr
,
lpDrvInfo
);
if
(
lpDrvInfo
==
NULL
||
lpDrvInfo
->
length
!=
sizeof
(
DRIVERINFOSTRUCT16
))
return
FALSE
;
if
((
lpDrv
=
DRIVER_FindFromHDrvr16
(
hDrvr
))
!=
NULL
)
{
lpDrvInfo
->
hDriver
=
lpDrv
->
hDriver16
;
lpDrvInfo
->
hModule
=
lpDrv
->
hModule16
;
lstrcpynA
(
lpDrvInfo
->
szAliasName
,
lpDrv
->
szAliasName
,
sizeof
(
lpDrvInfo
->
szAliasName
));
ret
=
TRUE
;
}
return
ret
;
}
/**************************************************************************
* GetNextDriver (USER.257)
*/
HDRVR16
WINAPI
GetNextDriver16
(
HDRVR16
hDrvr
,
DWORD
dwFlags
)
{
HDRVR16
hRetDrv
=
0
;
LPWINE_DRIVER
lpDrv
;
TRACE
(
"(%04x, %08X);
\n
"
,
hDrvr
,
dwFlags
);
if
(
hDrvr
==
0
)
{
if
(
lpDrvItemList
==
NULL
)
{
FIXME
(
"drivers list empty !
\n
"
);
/* FIXME: code was using DRIVER_LoadStartupDrivers(); before ?
* I (EPP) don't quite understand this
*/
if
(
lpDrvItemList
==
NULL
)
return
0
;
}
lpDrv
=
lpDrvItemList
;
if
(
dwFlags
&
GND_REVERSE
)
{
while
(
lpDrv
->
lpNextItem
)
lpDrv
=
lpDrv
->
lpNextItem
;
}
}
else
{
if
((
lpDrv
=
DRIVER_FindFromHDrvr16
(
hDrvr
))
!=
NULL
)
{
if
(
dwFlags
&
GND_REVERSE
)
{
lpDrv
=
(
lpDrv
->
lpPrevItem
)
?
lpDrv
->
lpPrevItem
:
NULL
;
}
else
{
lpDrv
=
(
lpDrv
->
lpNextItem
)
?
lpDrv
->
lpNextItem
:
NULL
;
}
}
}
hRetDrv
=
(
lpDrv
)
?
lpDrv
->
hDriver16
:
0
;
TRACE
(
"return %04x !
\n
"
,
hRetDrv
);
return
hRetDrv
;
return
DrvDefDriverProc16
(
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
}
dlls/mmsystem.dll16/mmsystem.c
View file @
2a64c6b1
...
...
@@ -2221,59 +2221,7 @@ void WINAPI WMMMidiRunOnce16(void)
FIXME
(
"(), stub!
\n
"
);
}
/**************************************************************************
* DrvOpen [MMSYSTEM.1100]
*/
HDRVR16
WINAPI
DrvOpen16
(
LPSTR
lpDriverName
,
LPSTR
lpSectionName
,
LPARAM
lParam
)
{
return
OpenDriver16
(
lpDriverName
,
lpSectionName
,
lParam
);
}
/**************************************************************************
* DrvClose [MMSYSTEM.1101]
*/
LRESULT
WINAPI
DrvClose16
(
HDRVR16
hDrv
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
return
CloseDriver16
(
hDrv
,
lParam1
,
lParam2
);
}
/**************************************************************************
* DrvSendMessage [MMSYSTEM.1102]
*/
LRESULT
WINAPI
DrvSendMessage16
(
HDRVR16
hDrv
,
WORD
msg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
return
SendDriverMessage16
(
hDrv
,
msg
,
lParam1
,
lParam2
);
}
/**************************************************************************
* DrvGetModuleHandle [MMSYSTEM.1103]
*/
HANDLE16
WINAPI
DrvGetModuleHandle16
(
HDRVR16
hDrv
)
{
return
GetDriverModuleHandle16
(
hDrv
);
}
/**************************************************************************
* DrvDefDriverProc [MMSYSTEM.1104]
*/
LRESULT
WINAPI
DrvDefDriverProc16
(
DWORD
dwDriverID
,
HDRVR16
hDrv
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
return
DefDriverProc16
(
dwDriverID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
}
/**************************************************************************
* DriverProc [MMSYSTEM.6]
*/
LRESULT
WINAPI
DriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDrv
,
WORD
wMsg
,
DWORD
dwParam1
,
DWORD
dwParam2
)
{
TRACE
(
"dwDevID=%08x hDrv=%04x wMsg=%04x dwParam1=%08x dwParam2=%08x
\n
"
,
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
return
DrvDefDriverProc16
(
dwDevID
,
hDrv
,
wMsg
,
dwParam1
,
dwParam2
);
}
/* ###################################################
* # JOYSTICK #
...
...
dlls/user32/Makefile.in
View file @
2a64c6b1
...
...
@@ -27,7 +27,6 @@ C_SRCS = \
dialog.c
\
dialog16.c
\
driver.c
\
driver16.c
\
edit.c
\
exticon.c
\
focus.c
\
...
...
dlls/user32/user16.c
View file @
2a64c6b1
...
...
@@ -946,6 +946,80 @@ UINT16 WINAPI GetMenuState16( HMENU16 hMenu, UINT16 wItemID, UINT16 wFlags )
}
/**************************************************************************
* SendDriverMessage (USER.251)
*/
LRESULT
WINAPI
SendDriverMessage16
(
HDRVR16
hDriver
,
UINT16
msg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
FIXME
(
"(%04x, %04x, %08lx, %08lx): stub
\n
"
,
hDriver
,
msg
,
lParam1
,
lParam2
);
return
0
;
}
/**************************************************************************
* OpenDriver (USER.252)
*/
HDRVR16
WINAPI
OpenDriver16
(
LPCSTR
lpDriverName
,
LPCSTR
lpSectionName
,
LPARAM
lParam2
)
{
FIXME
(
"(%s, %s, %08lx): stub
\n
"
,
debugstr_a
(
lpDriverName
),
debugstr_a
(
lpSectionName
),
lParam2
);
return
0
;
}
/**************************************************************************
* CloseDriver (USER.253)
*/
LRESULT
WINAPI
CloseDriver16
(
HDRVR16
hDrvr
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
FIXME
(
"(%04x, %08lx, %08lx): stub
\n
"
,
hDrvr
,
lParam1
,
lParam2
);
return
FALSE
;
}
/**************************************************************************
* GetDriverModuleHandle (USER.254)
*/
HMODULE16
WINAPI
GetDriverModuleHandle16
(
HDRVR16
hDrvr
)
{
FIXME
(
"(%04x): stub
\n
"
,
hDrvr
);
return
0
;
}
/**************************************************************************
* DefDriverProc (USER.255)
*/
LRESULT
WINAPI
DefDriverProc16
(
DWORD
dwDevID
,
HDRVR16
hDriv
,
UINT16
wMsg
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
FIXME
(
"devID=0x%08x hDrv=0x%04x wMsg=%04x lP1=0x%08lx lP2=0x%08lx: stub
\n
"
,
dwDevID
,
hDriv
,
wMsg
,
lParam1
,
lParam2
);
return
0
;
}
/**************************************************************************
* GetDriverInfo (USER.256)
*/
struct
DRIVERINFOSTRUCT16
;
BOOL16
WINAPI
GetDriverInfo16
(
HDRVR16
hDrvr
,
struct
DRIVERINFOSTRUCT16
*
lpDrvInfo
)
{
FIXME
(
"(%04x, %p): stub
\n
"
,
hDrvr
,
lpDrvInfo
);
return
FALSE
;
}
/**************************************************************************
* GetNextDriver (USER.257)
*/
HDRVR16
WINAPI
GetNextDriver16
(
HDRVR16
hDrvr
,
DWORD
dwFlags
)
{
FIXME
(
"(%04x, %08x): stub
\n
"
,
hDrvr
,
dwFlags
);
return
0
;
}
/**********************************************************************
* GetMenuItemCount (USER.263)
*/
...
...
dlls/user32/user32.spec
View file @
2a64c6b1
...
...
@@ -775,15 +775,10 @@
# Wine extensions: Win16 functions that are needed by other dlls
#
@ stdcall CallWindowProc16(long long long long long)
@ stdcall CloseDriver16(long long long)
@ stdcall CreateDialogIndirectParam16(long ptr long long long)
@ stdcall DefDriverProc16(long long long long long)
@ stdcall DefWindowProc16(long long long long)
@ stdcall DestroyIcon32(long long)
@ stdcall DialogBoxIndirectParam16(long long long long long)
@ stdcall GetDriverModuleHandle16(long)
@ stdcall OpenDriver16(str str long)
@ stdcall SendDriverMessage16(long long long long)
################################################################
# Wine dll separation hacks, these will go away, don't use them
...
...
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