https://git.reactos.org/?p=reactos.git;a=commitdiff;h=38788a2b0794eacd10fca…
commit 38788a2b0794eacd10fca7febf450904b7d5a572
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Mar 22 16:37:48 2020 +0100
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Mar 22 16:40:35 2020 +0100
[STORPROP] Add storprop.dll and implement the DiskClassInstaller stub
---
dll/win32/CMakeLists.txt | 1 +
dll/win32/storprop/CMakeLists.txt | 13 +++++++++
dll/win32/storprop/resource.h | 1 +
dll/win32/storprop/storprop.c | 58 +++++++++++++++++++++++++++++++++++++++
dll/win32/storprop/storprop.rc | 12 ++++++++
dll/win32/storprop/storprop.spec | 10 +++++++
media/inf/disk.inf | 11 ++++++--
7 files changed, 104 insertions(+), 2 deletions(-)
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(a)reactos.org)
+ */
+
+#define WIN32_NO_STATUS
+#include <stdarg.h>
+#include <windef.h>
+#include <winbase.h>
+#include <winreg.h>
+#include <winuser.h>
+#include <commctrl.h>
+#include <setupapi.h>
+
+#define NDEBUG
+#include <debug.h>
+
+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 <windef.h>
+
+#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 <reactos/version.rc>
+
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]