[STORPROP] Add storprop.dll and implement the DiskClassInstaller stub
authorEric Kohl <eric.kohl@reactos.org>
Sun, 22 Mar 2020 15:37:48 +0000 (16:37 +0100)
committerEric Kohl <eric.kohl@reactos.org>
Sun, 22 Mar 2020 15:40:35 +0000 (16:40 +0100)
dll/win32/CMakeLists.txt
dll/win32/storprop/CMakeLists.txt [new file with mode: 0644]
dll/win32/storprop/resource.h [new file with mode: 0644]
dll/win32/storprop/storprop.c [new file with mode: 0644]
dll/win32/storprop/storprop.rc [new file with mode: 0644]
dll/win32/storprop/storprop.spec [new file with mode: 0644]
media/inf/disk.inf

index 0150038..d8ecf5c 100644 (file)
@@ -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 (file)
index 0000000..3244c66
--- /dev/null
@@ -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 (file)
index 0000000..6f70f09
--- /dev/null
@@ -0,0 +1 @@
+#pragma once
diff --git a/dll/win32/storprop/storprop.c b/dll/win32/storprop/storprop.c
new file mode 100644 (file)
index 0000000..09149c8
--- /dev/null
@@ -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 <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 (file)
index 0000000..594b67b
--- /dev/null
@@ -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 (file)
index 0000000..f04a9ac
--- /dev/null
@@ -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
index 72d08fd..e84f398 100644 (file)
@@ -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]