From: Aric Stewart Subject: [PATCH v2 1/8] Add wineplugplay.sys for the Plug and Play Manager Kernel Message-Id: Date: Mon, 22 Aug 2016 09:19:14 -0500 Signed-off-by: Aric Stewart --- configure | 2 ++ configure.ac | 1 + dlls/wineplugplay.sys/Makefile.in | 6 +++++ dlls/wineplugplay.sys/main.c | 40 +++++++++++++++++++++++++++++ dlls/wineplugplay.sys/wineplugplay.sys.spec | 1 + loader/wine.inf.in | 14 ++++++++++ 6 files changed, 64 insertions(+) create mode 100644 dlls/wineplugplay.sys/Makefile.in create mode 100644 dlls/wineplugplay.sys/main.c create mode 100644 dlls/wineplugplay.sys/wineplugplay.sys.spec diff --git a/configure b/configure index 3eba2d2..c60bce8 100755 --- a/configure +++ b/configure @@ -1381,6 +1381,7 @@ enable_winejoystick_drv enable_winemac_drv enable_winemapi enable_winemp3_acm +enable_wineplugplay_sys enable_wineoss_drv enable_wineps_drv enable_winepulse_drv @@ -18138,6 +18139,7 @@ wine_fn_config_dll winemac.drv enable_winemac_drv clean wine_fn_config_dll winemapi enable_winemapi wine_fn_config_dll winemp3.acm enable_winemp3_acm wine_fn_config_dll wineoss.drv enable_wineoss_drv +wine_fn_config_dll wineplugplay.sys enable_wineplugplay_sys wine_fn_config_dll wineps.drv enable_wineps_drv clean wine_fn_config_dll wineps16.drv16 enable_win16 wine_fn_config_dll winepulse.drv enable_winepulse_drv diff --git a/configure.ac b/configure.ac index 24e5190..074f14b 100644 --- a/configure.ac +++ b/configure.ac @@ -3368,6 +3368,7 @@ WINE_CONFIG_DLL(winemac.drv,,[clean]) WINE_CONFIG_DLL(winemapi) WINE_CONFIG_DLL(winemp3.acm) WINE_CONFIG_DLL(wineoss.drv) +WINE_CONFIG_DLL(wineplugplay.sys,,[implib]) WINE_CONFIG_DLL(wineps.drv,,[clean]) WINE_CONFIG_DLL(wineps16.drv16,enable_win16) WINE_CONFIG_DLL(winepulse.drv) diff --git a/dlls/wineplugplay.sys/Makefile.in b/dlls/wineplugplay.sys/Makefile.in new file mode 100644 index 0000000..4039a8d --- /dev/null +++ b/dlls/wineplugplay.sys/Makefile.in @@ -0,0 +1,6 @@ +MODULE = wineplugplay.sys +IMPORTS = ntoskrnl +EXTRADLLFLAGS = -Wb,--subsystem,native + +C_SRCS = \ + main.c diff --git a/dlls/wineplugplay.sys/main.c b/dlls/wineplugplay.sys/main.c new file mode 100644 index 0000000..51b5d97 --- /dev/null +++ b/dlls/wineplugplay.sys/main.c @@ -0,0 +1,40 @@ +/* + * WINE Plug and Play Kernel Driver + * + * Copyright 2016 Aric Stewart + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define NONAMELESSUNION +#include +#include +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winternl.h" +#include "ddk/wdm.h" +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(plugplay); + +/* main entry point for the driver */ +NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) +{ + TRACE("\n"); + return STATUS_SUCCESS; +} diff --git a/dlls/wineplugplay.sys/wineplugplay.sys.spec b/dlls/wineplugplay.sys/wineplugplay.sys.spec new file mode 100644 index 0000000..76421d7 --- /dev/null +++ b/dlls/wineplugplay.sys/wineplugplay.sys.spec @@ -0,0 +1 @@ +# nothing to export diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 48fcb09..94f12bb 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -121,6 +121,7 @@ AddReg=\ AddService=BITS,0,BITSService AddService=MSIServer,0,MSIService AddService=MountMgr,0x800,MountMgrService +AddService=WinePlugPlay,0x800,WinePlugPlayService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService AddService=TermService,0,TerminalServices @@ -134,6 +135,7 @@ AddService=Schedule,0,TaskSchedulerService AddService=BITS,0,BITSService AddService=MSIServer,0,MSIService AddService=MountMgr,0x800,MountMgrService +AddService=WinePlugPlay,0x800,WinePlugPlayService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService AddService=TermService,0,TerminalServices @@ -147,6 +149,7 @@ AddService=Schedule,0,TaskSchedulerService AddService=BITS,0,BITSService AddService=MSIServer,0,MSIService AddService=MountMgr,0x800,MountMgrService +AddService=WinePlugPlay,0x800,WinePlugPlayService AddService=Spooler,0,SpoolerService AddService=StiSvc,0,StiService AddService=TermService,0,TerminalServices @@ -2513,6 +2516,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,winetest.exe,- 12,,fltmgr.sys,- 12,,mountmgr.sys,- +12,,wineplugplay.sys,- 12,,ndis.sys,- 12,,tdi.sys,- ; skip .NET fake dlls in Wine Mono package @@ -2555,6 +2559,7 @@ HKLM,%CurrentVersion%\Telephony\Country List\998,"SameAreaRule",,"G" 11,,winetest.exe,- 12,,fltmgr.sys 12,,mountmgr.sys +12,,wineplugplay.sys 12,,ndis.sys 12,,tdi.sys ; skip .NET fake dlls in Wine Mono package @@ -3165,6 +3170,15 @@ ServiceType=1 StartType=2 ErrorControl=1 +[WinePlugPlayService] +Description="Wine Plug and Play Kernel" +DisplayName="Plug and Play Kernel" +ServiceBinary="%12%\wineplugplay.sys" +LoadOrderGroup="WinePlugPlay" +ServiceType=1 +StartType=2 +ErrorControl=1 + [SpoolerService] Description="Loads files to memory for later printing" DisplayName="Print Spooler"