From: Eric Kohl Date: Sun, 22 Mar 2020 15:37:48 +0000 (+0100) Subject: [STORPROP] Add storprop.dll and implement the DiskClassInstaller stub X-Git-Tag: 0.4.14-RC~343 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=38788a2b0794eacd10fca7febf450904b7d5a572 [STORPROP] Add storprop.dll and implement the DiskClassInstaller stub --- diff --git a/dll/win32/CMakeLists.txt b/dll/win32/CMakeLists.txt index 015003826d4..d8ecf5ca50f 100644 --- a/dll/win32/CMakeLists.txt +++ b/dll/win32/CMakeLists.txt @@ -201,6 +201,7 @@ add_subdirectory(srclient) add_subdirectory(stdole2.tlb) add_subdirectory(stdole32.tlb) add_subdirectory(sti) +add_subdirectory(storprop) add_subdirectory(streamci) add_subdirectory(sxs) add_subdirectory(syssetup) diff --git a/dll/win32/storprop/CMakeLists.txt b/dll/win32/storprop/CMakeLists.txt new file mode 100644 index 00000000000..3244c669a6d --- /dev/null +++ b/dll/win32/storprop/CMakeLists.txt @@ -0,0 +1,13 @@ + +spec2def(storprop.dll storprop.spec) + +add_library(storprop MODULE + storprop.c + storprop.rc + ${CMAKE_CURRENT_BINARY_DIR}/storprop_stubs.c + ${CMAKE_CURRENT_BINARY_DIR}/storprop.def) + +set_module_type(storprop win32dll UNICODE) +target_link_libraries(storprop wine) +add_importlibs(storprop setupapi advapi32 msvcrt kernel32 ntdll) +add_cd_file(TARGET storprop DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/storprop/resource.h b/dll/win32/storprop/resource.h new file mode 100644 index 00000000000..6f70f09beec --- /dev/null +++ b/dll/win32/storprop/resource.h @@ -0,0 +1 @@ +#pragma once diff --git a/dll/win32/storprop/storprop.c b/dll/win32/storprop/storprop.c new file mode 100644 index 00000000000..09149c8d795 --- /dev/null +++ b/dll/win32/storprop/storprop.c @@ -0,0 +1,58 @@ +/* + * PROJECT: ReactOS system libraries + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) + * PURPOSE: Storage device properties + * COPYRIGHT: 2020 Eric Kohl (eric.kohl@reactos.org) + */ + +#define WIN32_NO_STATUS +#include +#include +#include +#include +#include +#include +#include + +#define NDEBUG +#include + +HINSTANCE hInstance = NULL; + +DWORD +WINAPI +DiskClassInstaller( + _In_ DI_FUNCTION InstallFunction, + _In_ HDEVINFO DeviceInfoSet, + _In_ PSP_DEVINFO_DATA DeviceInfoData OPTIONAL) +{ + DPRINT("DiskClassInstaller(%u %p %p)\n", + InstallFunction, DeviceInfoSet, DeviceInfoData); + + return ERROR_DI_DO_DEFAULT; +} + + +BOOL +WINAPI +DllMain( + _In_ HINSTANCE hinstDll, + _In_ DWORD dwReason, + _In_ LPVOID reserved) +{ + switch (dwReason) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDll); + hInstance = hinstDll; + break; + + case DLL_PROCESS_DETACH: + hInstance = NULL; + break; + } + + return TRUE; +} + +/* EOF */ diff --git a/dll/win32/storprop/storprop.rc b/dll/win32/storprop/storprop.rc new file mode 100644 index 00000000000..594b67b6666 --- /dev/null +++ b/dll/win32/storprop/storprop.rc @@ -0,0 +1,12 @@ +#include + +#include "resource.h" + +LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL + +#define REACTOS_VERSION_DLL +#define REACTOS_STR_FILE_DESCRIPTION "Storage device properties" +#define REACTOS_STR_INTERNAL_NAME "storprop" +#define REACTOS_STR_ORIGINAL_FILENAME "storprop.dll" +#include + diff --git a/dll/win32/storprop/storprop.spec b/dll/win32/storprop/storprop.spec new file mode 100644 index 00000000000..f04a9ac8020 --- /dev/null +++ b/dll/win32/storprop/storprop.spec @@ -0,0 +1,10 @@ +@ stub CdromDisableDigitalPlayback +@ stub CdromEnableDigitalPlayback +@ stub CdromIsDigitalPlaybackEnabled +@ stdcall DiskClassInstaller(long ptr ptr) +@ stdcall DllMain(ptr long ptr) +@ stub DvdClassInstaller +@ stub DvdLauncher +@ stub DvdPropPageProvider +@ stub IdePropPageProvider +@ stub VolumePropPageProvider diff --git a/media/inf/disk.inf b/media/inf/disk.inf index 72d08fded36..e84f39822f7 100644 --- a/media/inf/disk.inf +++ b/media/inf/disk.inf @@ -12,14 +12,16 @@ Provider = %ReactOS% DriverVer = 10/19/1999,5.00.2157.1 [DestinationDirs] -DefaultDestDir = 12 +disk_CopyFiles.NT = 12 +storprop_CopyFiles.NT = 11 [ClassInstall32.NT] AddReg = DiskClass.NT.AddReg +Copyfiles = storprop_CopyFiles.NT [DiskClass.NT.AddReg] HKR, , , 0, %DiskClassName% -;HKR, , Installer32, 0, "StorProp.dll,DiskClassInstaller" +HKR, , Installer32, 0, "storprop.dll,DiskClassInstaller" HKR, , Icon, 0, "-53" HKR, , NoInstallClass, 0, 1 HKR, , SilentInstall, 0, 1 @@ -49,6 +51,11 @@ ServiceBinary = %12%\disk.sys [disk_CopyFiles.NT] disk.sys +;---------------------------- DISK INSTALLER ---------------------------- + +[storprop_CopyFiles.NT] +storprop.dll + ;-------------------------------- STRINGS ------------------------------- [Strings]