ReactOS 0.4.15-dev-8241-g63935f8
disk.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS system libraries
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: Storage device properties
5 * COPYRIGHT: 2021 Eric Kohl (eric.kohl@reactos.org)
6 */
7
8#include "precomp.h"
9
10#define NDEBUG
11#include <debug.h>
12
13
14static
19 _In_ UINT uMsg,
22{
23 DPRINT1("DiskPropPageDialog()\n");
24
25 switch (uMsg)
26 {
27 case WM_INITDIALOG:
28 return TRUE; //OnInitDialog(hwnd, wParam, lParam);
29
30 case WM_COMMAND:
31 EndDialog(hwnd, 0); //OnCommand(hwnd, wParam, lParam);
32 break;
33/*
34 case WM_NOTIFY:
35 OnNotify(hwnd, wParam, lParam);
36 break;
37
38 case WM_DESTROY:
39 OnDestroy(hwnd);
40 break;
41*/
42 }
43
44 return FALSE;
45}
46
47
48/*
49 * @unimplemented
50 */
54 _In_ DI_FUNCTION InstallFunction,
57{
58 SP_ADDPROPERTYPAGE_DATA AddPropertyPageData = {0};
60 HPROPSHEETPAGE PageHandle;
61
62 DPRINT1("DiskClassInstaller(%u %p %p)\n",
63 InstallFunction, DeviceInfoSet, DeviceInfoData);
64
65 if (InstallFunction == DIF_ADDPROPERTYPAGE_ADVANCED)
66 {
67 if (DeviceInfoData == NULL)
69
70 AddPropertyPageData.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
73 (PSP_CLASSINSTALL_HEADER)&AddPropertyPageData,
75 NULL))
76 {
77 DPRINT1("\n");
78 if (AddPropertyPageData.NumDynamicPages >= MAX_INSTALLWIZARD_DYNAPAGES)
79 return ERROR_SUCCESS;
80
81 ZeroMemory(&Page, sizeof(PROPSHEETPAGE));
82 Page.dwSize = sizeof(PROPSHEETPAGE);
83 Page.dwFlags = PSP_USECALLBACK;
84 Page.hInstance = hInstance;
86 Page.pfnDlgProc = DiskPropPageDialog;
87 Page.pfnCallback = NULL; //DiskPropPageCallback;
88 Page.lParam = (LPARAM)NULL;
89
90 PageHandle = CreatePropertySheetPage(&Page);
91 if (PageHandle == NULL)
92 {
93 DPRINT1("CreatePropertySheetPage() failed!\n");
94 return ERROR_SUCCESS;
95 }
96
97 AddPropertyPageData.DynamicPages[AddPropertyPageData.NumDynamicPages] = PageHandle;
98 AddPropertyPageData.NumDynamicPages++;
99 DPRINT1("Pages: %ld\n", AddPropertyPageData.NumDynamicPages);
100
103 (PSP_CLASSINSTALL_HEADER)&AddPropertyPageData,
105 {
106 DPRINT1("SetupDiSetClassInstallParamsW() failed (Error %lu)\n", GetLastError());
107 }
108 }
109
110 return ERROR_SUCCESS;
111 }
112
113 return ERROR_DI_DO_DEFAULT;
114}
115
116/* EOF */
#define DPRINT1
Definition: precomp.h:8
HINSTANCE hInstance
Definition: charmap.c:19
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CALLBACK
Definition: compat.h:35
BOOL WINAPI SetupDiSetClassInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize)
Definition: devclass.c:972
BOOL WINAPI SetupDiGetClassInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize, OUT PDWORD RequiredSize OPTIONAL)
Definition: devclass.c:642
DWORD WINAPI DiskClassInstaller(_In_ DI_FUNCTION InstallFunction, _In_ HDEVINFO DeviceInfoSet, _In_ PSP_DEVINFO_DATA DeviceInfoData OPTIONAL)
Definition: disk.c:53
static INT_PTR CALLBACK DiskPropPageDialog(_In_ HWND hwnd, _In_ UINT uMsg, _In_ WPARAM wParam, _In_ LPARAM lParam)
Definition: disk.c:17
#define IDD_DISK_POLICIES
Definition: resource.h:3
unsigned long DWORD
Definition: ntddk_ex.h:95
#define _In_
Definition: ms_sal.h:308
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
unsigned int UINT
Definition: ndis.h:50
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
Definition: mm.h:1306
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_USECALLBACK
Definition: prsht.h:30
#define PROPSHEETPAGE
Definition: prsht.h:389
struct _SP_CLASSINSTALL_HEADER SP_CLASSINSTALL_HEADER
#define MAX_INSTALLWIZARD_DYNAPAGES
Definition: setupapi.h:459
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1528
#define ERROR_DI_DO_DEFAULT
Definition: setupapi.h:310
UINT DI_FUNCTION
Definition: setupapi.h:672
#define DIF_ADDPROPERTYPAGE_ADVANCED
Definition: setupapi.h:154
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
SP_CLASSINSTALL_HEADER ClassInstallHeader
Definition: setupapi.h:976
int32_t INT_PTR
Definition: typedefs.h:64
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_INITDIALOG
Definition: winuser.h:1739
#define MAKEINTRESOURCE
Definition: winuser.h:591
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)