2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS New devices installation
4 * FILE: lib/newdev/newdev.c
5 * PURPOSE: New devices installation
7 * PROGRAMMERS: Hervé Poussineau (hpoussin@reactos.org)
8 * PROGRAMMERS: Christoph von Wittich (Christoph@ActiveVB.de)
16 static BOOL
SearchDriver ( PDEVINSTDATA DevInstData
, LPCTSTR Path
);
17 static BOOL
InstallDriver ( PDEVINSTDATA DevInstData
);
18 static DWORD WINAPI
FindDriverProc( LPVOID lpParam
);
19 static BOOL
FindDriver ( PDEVINSTDATA DevInstData
);
21 static DEVINSTDATA DevInstData
;
22 HINSTANCE hDllInstance
;
34 ncm
.cbSize
= sizeof(NONCLIENTMETRICS
);
35 SystemParametersInfo(SPI_GETNONCLIENTMETRICS
, 0, &ncm
, 0);
37 LogFont
= ncm
.lfMessageFont
;
38 LogFont
.lfWeight
= FW_BOLD
;
39 _tcscpy(LogFont
.lfFaceName
, _T("MS Shell Dlg"));
43 LogFont
.lfHeight
= 0 - GetDeviceCaps (hdc
, LOGPIXELSY
) * FontSize
/ 72;
44 hFont
= CreateFontIndirect(&LogFont
);
51 CenterWindow(HWND hWnd
)
57 hWndParent
= GetParent(hWnd
);
58 if (hWndParent
== NULL
)
59 hWndParent
= GetDesktopWindow();
61 GetWindowRect(hWndParent
, &rcParent
);
62 GetWindowRect(hWnd
, &rcWindow
);
66 ((rcParent
.right
- rcParent
.left
) - (rcWindow
.right
- rcWindow
.left
)) / 2,
67 ((rcParent
.bottom
- rcParent
.top
) - (rcWindow
.bottom
- rcWindow
.top
)) / 2,
73 static INT_PTR CALLBACK
81 PDEVINSTDATA DevInstData
;
83 /* Retrieve pointer to the global setup data */
84 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
93 /* Get pointer to the global setup data */
94 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
95 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
97 hwndControl
= GetParent(hwndDlg
);
99 /* Center the wizard window */
100 CenterWindow (hwndControl
);
102 /* Hide the system menu */
103 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
104 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
107 SendDlgItemMessage(hwndDlg
,
110 (WPARAM
)DevInstData
->hTitleFont
,
113 SendDlgItemMessage(hwndDlg
,
117 (LPARAM
) DevInstData
->buffer
);
119 SendDlgItemMessage(hwndDlg
,
132 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
137 /* Enable the Next button */
138 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
);
142 /* Handle a Next button click, if necessary */
144 if (SendDlgItemMessage(hwndDlg
, IDC_RADIO_AUTO
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
)
145 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_SEARCHDRV
);
162 static INT_PTR CALLBACK
170 PDEVINSTDATA DevInstData
;
172 /* Retrieve pointer to the global setup data */
173 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
182 /* Get pointer to the global setup data */
183 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
184 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
186 hwndControl
= GetParent(hwndDlg
);
188 /* Center the wizard window */
189 CenterWindow (hwndControl
);
191 /* Hide the system menu */
192 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
193 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
195 SendDlgItemMessage(hwndDlg
,
196 IDC_RADIO_SEARCHHERE
,
207 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
212 /* Enable the Next and Back buttons */
213 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
| PSWIZB_BACK
);
217 /* Handle a Next button click, if necessary */
218 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, 4);
234 static INT_PTR CALLBACK
242 PDEVINSTDATA DevInstData
;
245 /* Retrieve pointer to the global setup data */
246 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
255 /* Get pointer to the global setup data */
256 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
257 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
259 DevInstData
->hDialog
= hwndDlg
;
260 hwndControl
= GetParent(hwndDlg
);
262 /* Center the wizard window */
263 CenterWindow (hwndControl
);
265 SendDlgItemMessage(hwndDlg
,
269 (LPARAM
) DevInstData
->buffer
);
271 /* Hide the system menu */
272 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
273 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
277 case WM_SEARCH_FINISHED
:
279 CloseHandle(hThread
);
282 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_NODRIVER
);
284 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_FINISHPAGE
);
289 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
294 PropSheet_SetWizButtons(GetParent(hwndDlg
), !PSWIZB_NEXT
| !PSWIZB_BACK
);
295 hThread
= CreateThread( NULL
, 0, FindDriverProc
, DevInstData
, 0, &dwThreadId
);
301 SetWindowLong ( hwndDlg
, DWL_MSGRESULT
, TRUE
);
306 /* Handle a Next button click, if necessary */
326 TCHAR drive
[] = {'?',':',0};
329 PDEVINSTDATA DevInstData
;
332 DevInstData
= (PDEVINSTDATA
)lpParam
;
334 dwDrives
= GetLogicalDrives();
335 for (drive
[0] = 'A'; drive
[0] <= 'Z'; drive
[0]++)
339 nType
= GetDriveType( drive
);
340 if ((nType
== DRIVE_CDROM
))
341 //if ((nType == DRIVE_CDROM) || (nType == DRIVE_FIXED))
343 /* search for inf file */
344 if (SearchDriver ( DevInstData
, drive
))
346 /* if we found a valid driver inf... */
347 if (FindDriver ( DevInstData
))
349 InstallDriver ( DevInstData
);
350 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 1, 0);
359 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 0, 0);
363 static INT_PTR CALLBACK
371 PDEVINSTDATA DevInstData
;
373 /* Retrieve pointer to the global setup data */
374 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
382 /* Get pointer to the global setup data */
383 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
384 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
386 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
387 ShowWindow (hwndControl
, SW_HIDE
);
388 EnableWindow (hwndControl
, FALSE
);
390 SendDlgItemMessage(hwndDlg
,
394 (LPARAM
) DevInstData
->drvInfoData
.Description
);
397 SendDlgItemMessage(hwndDlg
,
400 (WPARAM
)DevInstData
->hTitleFont
,
407 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
412 /* Enable the correct buttons on for the active page */
413 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_FINISH
);
417 /* Handle a Back button click, if necessary */
421 /* Handle a Finish button click, if necessary */
437 static INT_PTR CALLBACK
445 PDEVINSTDATA DevInstData
;
447 /* Get pointer to the global setup data */
448 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
456 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
457 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
459 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
460 ShowWindow (hwndControl
, SW_HIDE
);
461 EnableWindow (hwndControl
, FALSE
);
464 SendDlgItemMessage(hwndDlg
,
467 (WPARAM
)DevInstData
->hTitleFont
,
474 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
481 /* Enable the correct buttons on for the active page */
482 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_FINISH
);
486 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_WELCOMEPAGE
);
487 /* Handle a Back button click, if necessary */
491 /* Handle a Finish button click, if necessary */
492 if (SendDlgItemMessage(hwndDlg
, IDC_DONOTSHOWDLG
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
)
495 if(SetupDiGetDeviceRegistryProperty(DevInstData
->hDevInfo
,
496 &DevInstData
->devInfoData
,
499 (BYTE
*)&config_flags
,
500 sizeof(config_flags
),
503 config_flags
|= CONFIGFLAG_FAILEDINSTALL
;
504 ret
= SetupDiSetDeviceRegistryProperty(
505 DevInstData
->hDevInfo
,
506 &DevInstData
->devInfoData
,
530 IN PDEVINSTDATA DevInstData
)
535 ret
= SetupDiBuildDriverInfoList(DevInstData
->hDevInfo
, &DevInstData
->devInfoData
, SPDIT_COMPATDRIVER
);
538 DPRINT("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
542 DevInstData
->drvInfoData
.cbSize
= sizeof(SP_DRVINFO_DATA
);
543 ret
= SetupDiEnumDriverInfo(
544 DevInstData
->hDevInfo
,
545 &DevInstData
->devInfoData
,
548 &DevInstData
->drvInfoData
);
551 if (GetLastError() == ERROR_NO_MORE_ITEMS
)
553 DPRINT("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError());
556 DPRINT("Installing driver %S: %S\n", DevInstData
->drvInfoData
.MfgName
, DevInstData
->drvInfoData
.Description
);
563 IsDots(IN LPCTSTR str
)
565 if(_tcscmp(str
, _T(".")) && _tcscmp(str
, _T(".."))) return FALSE
;
570 GetFileExt(IN LPTSTR FileName
)
575 int i
= _tcsclen(FileName
);
576 while ((i
>= 0) && (FileName
[i
] != _T('.')))
579 FileName
= _tcslwr(FileName
);
589 IN PDEVINSTDATA DevInstData
,
593 SP_DEVINSTALL_PARAMS DevInstallParams
;
594 TCHAR DirPath
[MAX_PATH
];
595 TCHAR FileName
[MAX_PATH
];
596 TCHAR FullPath
[MAX_PATH
];
597 TCHAR LastDirPath
[MAX_PATH
] = _T("");
598 TCHAR PathWithPattern
[MAX_PATH
];
603 _tcscpy(DirPath
, Path
);
605 if (DirPath
[_tcsclen(DirPath
) - 1] != '\\')
606 _tcscat(DirPath
, _T("\\"));
608 _tcscpy(PathWithPattern
, DirPath
);
609 _tcscat(PathWithPattern
, _T("\\*"));
611 for (hFindFile
= FindFirstFile(PathWithPattern
, &wfd
); ((hFindFile
!= INVALID_HANDLE_VALUE
) && ok
); ok
= FindNextFile(hFindFile
, &wfd
))
614 _tcscpy(FileName
, wfd
.cFileName
);
615 if (IsDots(FileName
)) continue;
617 if((wfd
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
))
619 _tcscpy(FullPath
, DirPath
);
620 _tcscat(FullPath
, FileName
);
621 if(SearchDriver(DevInstData
, FullPath
))
626 LPCTSTR pszExtension
= GetFileExt(FileName
);
628 if ((_tcscmp(pszExtension
, _T(".inf")) == 0) && (_tcscmp(LastDirPath
, DirPath
) != 0))
630 _tcscpy(LastDirPath
, DirPath
);
631 ZeroMemory (&DevInstallParams
, sizeof(SP_DEVINSTALL_PARAMS
));
632 DevInstallParams
.cbSize
= sizeof(SP_DEVINSTALL_PARAMS
);
634 ret
= SetupDiGetDeviceInstallParams(
635 DevInstData
->hDevInfo
,
636 &DevInstData
->devInfoData
,
639 if (_tcsclen(DirPath
) <= MAX_PATH
)
641 memcpy(DevInstallParams
.DriverPath
, DirPath
, (_tcsclen(DirPath
) + 1) * sizeof(TCHAR
));
644 ret
= SetupDiSetDeviceInstallParams(
645 DevInstData
->hDevInfo
,
646 &DevInstData
->devInfoData
,
649 if ( FindDriver ( DevInstData
) )
651 if (hFindFile
!= INVALID_HANDLE_VALUE
)
652 FindClose(hFindFile
);
660 if (hFindFile
!= INVALID_HANDLE_VALUE
)
661 FindClose(hFindFile
);
668 IN PDEVINSTDATA DevInstData
)
673 ret
= SetupDiCallClassInstaller(
674 DIF_SELECTBESTCOMPATDRV
,
675 DevInstData
->hDevInfo
,
676 &DevInstData
->devInfoData
);
679 DPRINT("SetupDiCallClassInstaller(DIF_SELECTBESTCOMPATDRV) failed with error 0x%lx\n", GetLastError());
683 ret
= SetupDiCallClassInstaller(
685 DevInstData
->hDevInfo
,
686 &DevInstData
->devInfoData
);
689 DPRINT("SetupDiCallClassInstaller(DIF_ALLOW_INSTALL) failed with error 0x%lx\n", GetLastError());
693 ret
= SetupDiCallClassInstaller(
694 DIF_NEWDEVICEWIZARD_PREANALYZE
,
695 DevInstData
->hDevInfo
,
696 &DevInstData
->devInfoData
);
699 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_PREANALYZE) failed with error 0x%lx\n", GetLastError());
703 ret
= SetupDiCallClassInstaller(
704 DIF_NEWDEVICEWIZARD_POSTANALYZE
,
705 DevInstData
->hDevInfo
,
706 &DevInstData
->devInfoData
);
709 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_POSTANALYZE) failed with error 0x%lx\n", GetLastError());
713 ret
= SetupDiCallClassInstaller(
714 DIF_INSTALLDEVICEFILES
,
715 DevInstData
->hDevInfo
,
716 &DevInstData
->devInfoData
);
719 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICEFILES) failed with error 0x%lx\n", GetLastError());
723 ret
= SetupDiCallClassInstaller(
724 DIF_REGISTER_COINSTALLERS
,
725 DevInstData
->hDevInfo
,
726 &DevInstData
->devInfoData
);
729 DPRINT("SetupDiCallClassInstaller(DIF_REGISTER_COINSTALLERS) failed with error 0x%lx\n", GetLastError());
733 ret
= SetupDiCallClassInstaller(
734 DIF_INSTALLINTERFACES
,
735 DevInstData
->hDevInfo
,
736 &DevInstData
->devInfoData
);
739 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLINTERFACES) failed with error 0x%lx\n", GetLastError());
743 ret
= SetupDiCallClassInstaller(
745 DevInstData
->hDevInfo
,
746 &DevInstData
->devInfoData
);
749 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICE) failed with error 0x%lx\n", GetLastError());
753 ret
= SetupDiCallClassInstaller(
754 DIF_NEWDEVICEWIZARD_FINISHINSTALL
,
755 DevInstData
->hDevInfo
,
756 &DevInstData
->devInfoData
);
759 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_FINISHINSTALL) failed with error 0x%lx\n", GetLastError());
763 ret
= SetupDiCallClassInstaller(
764 DIF_DESTROYPRIVATEDATA
,
765 DevInstData
->hDevInfo
,
766 &DevInstData
->devInfoData
);
769 DPRINT("SetupDiCallClassInstaller(DIF_DESTROYPRIVATEDATA) failed with error 0x%lx\n", GetLastError());
781 if (DevInstData
.devInfoData
.cbSize
!= 0)
783 if (!SetupDiDestroyDriverInfoList(DevInstData
.hDevInfo
, &DevInstData
.devInfoData
, SPDIT_COMPATDRIVER
))
784 DPRINT("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError());
787 if (DevInstData
.hDevInfo
!= INVALID_HANDLE_VALUE
)
789 if (!SetupDiDestroyDeviceInfoList(DevInstData
.hDevInfo
))
790 DPRINT("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError());
793 if (DevInstData
.buffer
)
794 HeapFree(GetProcessHeap(), 0, DevInstData
.buffer
);
801 IN HINSTANCE hInstance
,
802 IN LPCWSTR InstanceId
,
807 HPROPSHEETPAGE ahpsp
[5];
813 /* Clear devinst data */
814 ZeroMemory(&DevInstData
, sizeof(DEVINSTDATA
));
815 DevInstData
.devInfoData
.cbSize
= 0; /* Tell if the devInfoData is valid */
818 DevInstData
.hDevInfo
= SetupDiCreateDeviceInfoListExW(NULL
, NULL
, NULL
, NULL
);
819 if (DevInstData
.hDevInfo
== INVALID_HANDLE_VALUE
)
821 DPRINT("SetupDiCreateDeviceInfoListExW() failed with error 0x%lx\n", GetLastError());
826 DevInstData
.devInfoData
.cbSize
= sizeof(SP_DEVINFO_DATA
);
827 ret
= SetupDiOpenDeviceInfoW(
828 DevInstData
.hDevInfo
,
832 &DevInstData
.devInfoData
);
835 DPRINT("SetupDiOpenDeviceInfoW() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId
);
836 DevInstData
.devInfoData
.cbSize
= 0;
841 SetLastError(ERROR_GEN_FAILURE
);
842 ret
= SetupDiGetDeviceRegistryProperty(
843 DevInstData
.hDevInfo
,
844 &DevInstData
.devInfoData
,
846 &DevInstData
.regDataType
,
848 &DevInstData
.requiredSize
);
850 if (!ret
&& GetLastError() == ERROR_INSUFFICIENT_BUFFER
&& DevInstData
.regDataType
== REG_SZ
)
852 DevInstData
.buffer
= HeapAlloc(GetProcessHeap(), 0, DevInstData
.requiredSize
);
853 if (!DevInstData
.buffer
)
855 DPRINT("HeapAlloc() failed\n");
856 SetLastError(ERROR_NOT_ENOUGH_MEMORY
);
860 ret
= SetupDiGetDeviceRegistryProperty(
861 DevInstData
.hDevInfo
,
862 &DevInstData
.devInfoData
,
864 &DevInstData
.regDataType
,
865 DevInstData
.buffer
, DevInstData
.requiredSize
,
866 &DevInstData
.requiredSize
);
871 DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId
);
876 if(SetupDiGetDeviceRegistryProperty(DevInstData
.hDevInfo
,
877 &DevInstData
.devInfoData
,
880 (BYTE
*)&config_flags
,
881 sizeof(config_flags
),
884 if (config_flags
& CONFIGFLAG_FAILEDINSTALL
)
893 swprintf(buf, _T("%ld"), GetLastError());
894 MessageBox(0,buf,buf,0);
898 DPRINT("Installing %S (%S)\n", DevInstData
.buffer
, InstanceId
);
900 if ((!FindDriver(&DevInstData
)) && (Show
!= SW_HIDE
))
903 /* Create the Welcome page */
904 ZeroMemory (&psp
, sizeof(PROPSHEETPAGE
));
905 psp
.dwSize
= sizeof(PROPSHEETPAGE
);
906 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
907 psp
.hInstance
= hDllInstance
;
908 psp
.lParam
= (LPARAM
)&DevInstData
;
909 psp
.pfnDlgProc
= WelcomeDlgProc
;
910 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_WELCOMEPAGE
);
911 ahpsp
[IDD_WELCOMEPAGE
] = CreatePropertySheetPage(&psp
);
913 /* Create the Select Source page */
914 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
915 psp
.pfnDlgProc
= CHSourceDlgProc
;
916 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_CHSOURCE
);
917 ahpsp
[IDD_CHSOURCE
] = CreatePropertySheetPage(&psp
);
919 /* Create the Search driver page */
920 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
921 psp
.pfnDlgProc
= SearchDrvDlgProc
;
922 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_SEARCHDRV
);
923 ahpsp
[IDD_SEARCHDRV
] = CreatePropertySheetPage(&psp
);
925 /* Create the Finish page */
926 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
927 psp
.pfnDlgProc
= FinishDlgProc
;
928 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_FINISHPAGE
);
929 ahpsp
[IDD_FINISHPAGE
] = CreatePropertySheetPage(&psp
);
931 /* Create the Install failed page */
932 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
933 psp
.pfnDlgProc
= InstFailDlgProc
;
934 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_NODRIVER
);
935 ahpsp
[IDD_NODRIVER
] = CreatePropertySheetPage(&psp
);
937 /* Create the property sheet */
938 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
939 psh
.dwFlags
= PSH_WIZARD97
| PSH_WATERMARK
| PSH_HEADER
;
940 psh
.hInstance
= hDllInstance
;
941 psh
.hwndParent
= NULL
;
945 psh
.pszbmWatermark
= MAKEINTRESOURCE(IDB_WATERMARK
);
946 psh
.pszbmHeader
= MAKEINTRESOURCE(IDB_HEADER
);
948 /* Create title font */
949 DevInstData
.hTitleFont
= CreateTitleFont();
951 /* Display the wizard */
954 DeleteObject(DevInstData
.hTitleFont
);
959 InstallDriver ( &DevInstData
);
968 IN HINSTANCE hInstance
,
970 IN LPVOID lpReserved
)
972 if (dwReason
== DLL_PROCESS_ATTACH
)
974 INITCOMMONCONTROLSEX InitControls
;
976 InitControls
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
977 InitControls
.dwICC
= ICC_PROGRESS_CLASS
;
978 InitCommonControlsEx(&InitControls
);
979 hDllInstance
= hInstance
;