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)
23 static DEVINSTDATA DevInstData
;
24 HINSTANCE hDllInstance
;
36 ncm
.cbSize
= sizeof(NONCLIENTMETRICS
);
37 SystemParametersInfo(SPI_GETNONCLIENTMETRICS
, 0, &ncm
, 0);
39 LogFont
= ncm
.lfMessageFont
;
40 LogFont
.lfWeight
= FW_BOLD
;
41 _tcscpy(LogFont
.lfFaceName
, _T("MS Shell Dlg"));
45 LogFont
.lfHeight
= 0 - GetDeviceCaps (hdc
, LOGPIXELSY
) * FontSize
/ 72;
46 hFont
= CreateFontIndirect(&LogFont
);
53 CenterWindow(HWND hWnd
)
59 hWndParent
= GetParent(hWnd
);
60 if (hWndParent
== NULL
)
61 hWndParent
= GetDesktopWindow();
63 GetWindowRect(hWndParent
, &rcParent
);
64 GetWindowRect(hWnd
, &rcWindow
);
68 ((rcParent
.right
- rcParent
.left
) - (rcWindow
.right
- rcWindow
.left
)) / 2,
69 ((rcParent
.bottom
- rcParent
.top
) - (rcWindow
.bottom
- rcWindow
.top
)) / 2,
76 WelcomeDlgProc(HWND hwndDlg
,
82 PDEVINSTDATA DevInstData
;
84 /* Retrieve pointer to the global setup data */
85 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
94 /* Get pointer to the global setup data */
95 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
96 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
98 hwndControl
= GetParent(hwndDlg
);
100 /* Center the wizard window */
101 CenterWindow (hwndControl
);
103 /* Hide the system menu */
104 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
105 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
108 SendDlgItemMessage(hwndDlg
,
111 (WPARAM
)DevInstData
->hTitleFont
,
114 SendDlgItemMessage(hwndDlg
,
118 (LPARAM
) DevInstData
->buffer
);
120 SendDlgItemMessage(hwndDlg
,
133 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
138 /* Enable the Next button */
139 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
);
143 /* Handle a Next button click, if necessary */
145 if (SendDlgItemMessage(hwndDlg
, IDC_RADIO_AUTO
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
)
146 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_SEARCHDRV
);
164 CHSourceDlgProc(HWND hwndDlg
,
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
,
208 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
213 /* Enable the Next and Back buttons */
214 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
| PSWIZB_BACK
);
218 /* Handle a Next button click, if necessary */
219 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, 4);
236 SearchDrvDlgProc(HWND hwndDlg
,
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
);
300 SetWindowLong ( hwndDlg
, DWL_MSGRESULT
, TRUE
);
305 /* Handle a Next button click, if necessary */
321 DWORD WINAPI
FindDriverProc( LPVOID lpParam
)
323 TCHAR drive
[] = {'?',':',0};
326 PDEVINSTDATA DevInstData
;
329 DevInstData
= (PDEVINSTDATA
)lpParam
;
331 dwDrives
= GetLogicalDrives();
332 for (drive
[0] = 'A'; drive
[0] <= 'Z'; drive
[0]++) {
334 nType
= GetDriveType( drive
);
335 if ((nType
== DRIVE_CDROM
) || (nType
== DRIVE_FIXED
)) {
336 /* search for inf file */
337 if (SearchDriver ( DevInstData
, drive
)) {
338 /* if we found a valid driver inf... */
339 if (FindDriver ( DevInstData
)) {
340 InstallDriver ( DevInstData
);
341 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 1, 0);
350 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 0, 0);
355 FinishDlgProc(HWND hwndDlg
,
361 PDEVINSTDATA DevInstData
;
363 /* Retrieve pointer to the global setup data */
364 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
372 /* Get pointer to the global setup data */
373 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
374 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
376 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
377 ShowWindow (hwndControl
, SW_HIDE
);
378 EnableWindow (hwndControl
, FALSE
);
380 SendDlgItemMessage(hwndDlg
,
384 (LPARAM
) DevInstData
->buffer
);
387 SendDlgItemMessage(hwndDlg
,
390 (WPARAM
)DevInstData
->hTitleFont
,
397 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
402 /* Enable the correct buttons on for the active page */
403 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_FINISH
);
407 /* Handle a Back button click, if necessary */
411 /* Handle a Finish button click, if necessary */
428 InstFailDlgProc(HWND hwndDlg
,
434 PDEVINSTDATA DevInstData
;
436 /* Get pointer to the global setup data */
437 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
445 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
446 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
448 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
449 ShowWindow (hwndControl
, SW_HIDE
);
450 EnableWindow (hwndControl
, FALSE
);
453 SendDlgItemMessage(hwndDlg
,
456 (WPARAM
)DevInstData
->hTitleFont
,
463 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
470 /* Enable the correct buttons on for the active page */
471 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_FINISH
);
475 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_WELCOMEPAGE
);
476 /* Handle a Back button click, if necessary */
480 /* Handle a Finish button click, if necessary */
481 if (SendDlgItemMessage(hwndDlg
, IDC_DONOTSHOWDLG
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
) {
483 if(SetupDiGetDeviceRegistryProperty(DevInstData
->hDevInfo
,
484 &DevInstData
->devInfoData
,
487 (BYTE
*)&config_flags
,
488 sizeof(config_flags
),
491 config_flags
|= CONFIGFLAG_FAILEDINSTALL
;
492 ret
= SetupDiSetDeviceRegistryProperty(
493 DevInstData
->hDevInfo
,
494 &DevInstData
->devInfoData
,
516 BOOL
FindDriver ( PDEVINSTDATA DevInstData
) {
519 ret
= SetupDiBuildDriverInfoList(DevInstData
->hDevInfo
, &DevInstData
->devInfoData
, SPDIT_COMPATDRIVER
);
522 DPRINT("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
526 DevInstData
->drvInfoData
.cbSize
= sizeof(SP_DRVINFO_DATA
);
527 ret
= SetupDiEnumDriverInfo(
528 DevInstData
->hDevInfo
,
529 &DevInstData
->devInfoData
,
532 &DevInstData
->drvInfoData
);
535 if (GetLastError() == ERROR_NO_MORE_ITEMS
)
537 DPRINT("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError());
540 DPRINT("Installing driver %S: %S\n", DevInstData
->drvInfoData
.MfgName
, DevInstData
->drvInfoData
.Description
);
546 BOOL
IsDots(const TCHAR
* str
) {
547 if(_tcscmp(str
, _T(".")) && _tcscmp(str
, _T(".."))) return FALSE
;
551 TCHAR
* GetFileExt(TCHAR
* FileName
)
556 int i
= _tcsclen(FileName
);
557 while ((i
>= 0) && (FileName
[i
] != _T('.')))
560 FileName
= _tcslwr(FileName
);
568 BOOL
SearchDriver ( PDEVINSTDATA DevInstData
, const TCHAR
* Path
) {
570 SP_DEVINSTALL_PARAMS DevInstallParams
;
571 TCHAR DirPath
[MAX_PATH
];
572 TCHAR FileName
[MAX_PATH
];
573 TCHAR FullPath
[MAX_PATH
];
574 TCHAR LastDirPath
[MAX_PATH
] = _T("");
575 TCHAR PathWithPattern
[MAX_PATH
];
580 _tcscpy(DirPath
, Path
);
582 if (DirPath
[_tcsclen(DirPath
) - 1] != '\\')
583 _tcscat(DirPath
, _T("\\"));
585 _tcscpy(PathWithPattern
, DirPath
);
586 _tcscat(PathWithPattern
, _T("\\*"));
588 for (hFindFile
= FindFirstFile(PathWithPattern
, &wfd
); ((hFindFile
!= INVALID_HANDLE_VALUE
) && ok
); ok
= FindNextFile(hFindFile
, &wfd
))
591 _tcscpy(FileName
, wfd
.cFileName
);
592 if(IsDots(FileName
)) continue;
594 if((wfd
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)) {
595 _tcscpy(FullPath
, DirPath
);
596 _tcscat(FullPath
, FileName
);
597 if(SearchDriver(DevInstData
, FullPath
))
601 TCHAR
* pszExtension
= GetFileExt(FileName
);
603 if ((_tcscmp(pszExtension
, _T(".inf")) == 0) && (_tcscmp(LastDirPath
, DirPath
) != 0)){
604 _tcscpy(LastDirPath
, DirPath
);
605 ZeroMemory (&DevInstallParams
, sizeof(SP_DEVINSTALL_PARAMS
));
606 DevInstallParams
.cbSize
= sizeof(SP_DEVINSTALL_PARAMS
);
608 ret
= SetupDiGetDeviceInstallParams(
609 DevInstData
->hDevInfo
,
610 &DevInstData
->devInfoData
,
613 if (_tcsclen(DirPath
) <= MAX_PATH
) {
614 memcpy(DevInstallParams
.DriverPath
, DirPath
, (_tcsclen(DirPath
) + 1) * sizeof(TCHAR
));
617 ret
= SetupDiSetDeviceInstallParams(
618 DevInstData
->hDevInfo
,
619 &DevInstData
->devInfoData
,
622 if ( FindDriver ( DevInstData
) ) {
623 if (hFindFile
!= INVALID_HANDLE_VALUE
)
624 FindClose(hFindFile
);
632 if (hFindFile
!= INVALID_HANDLE_VALUE
)
633 FindClose(hFindFile
);
638 BOOL
InstallDriver ( PDEVINSTDATA DevInstData
) {
641 ret
= SetupDiCallClassInstaller(
642 DIF_SELECTBESTCOMPATDRV
,
643 DevInstData
->hDevInfo
,
644 &DevInstData
->devInfoData
);
647 DPRINT("SetupDiCallClassInstaller(DIF_SELECTBESTCOMPATDRV) failed with error 0x%lx\n", GetLastError());
651 ret
= SetupDiCallClassInstaller(
653 DevInstData
->hDevInfo
,
654 &DevInstData
->devInfoData
);
657 DPRINT("SetupDiCallClassInstaller(DIF_ALLOW_INSTALL) failed with error 0x%lx\n", GetLastError());
661 ret
= SetupDiCallClassInstaller(
662 DIF_NEWDEVICEWIZARD_PREANALYZE
,
663 DevInstData
->hDevInfo
,
664 &DevInstData
->devInfoData
);
667 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_PREANALYZE) failed with error 0x%lx\n", GetLastError());
671 ret
= SetupDiCallClassInstaller(
672 DIF_NEWDEVICEWIZARD_POSTANALYZE
,
673 DevInstData
->hDevInfo
,
674 &DevInstData
->devInfoData
);
677 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_POSTANALYZE) failed with error 0x%lx\n", GetLastError());
681 ret
= SetupDiCallClassInstaller(
682 DIF_INSTALLDEVICEFILES
,
683 DevInstData
->hDevInfo
,
684 &DevInstData
->devInfoData
);
687 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICEFILES) failed with error 0x%lx\n", GetLastError());
691 ret
= SetupDiCallClassInstaller(
692 DIF_REGISTER_COINSTALLERS
,
693 DevInstData
->hDevInfo
,
694 &DevInstData
->devInfoData
);
697 DPRINT("SetupDiCallClassInstaller(DIF_REGISTER_COINSTALLERS) failed with error 0x%lx\n", GetLastError());
701 ret
= SetupDiCallClassInstaller(
702 DIF_INSTALLINTERFACES
,
703 DevInstData
->hDevInfo
,
704 &DevInstData
->devInfoData
);
707 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLINTERFACES) failed with error 0x%lx\n", GetLastError());
711 ret
= SetupDiCallClassInstaller(
713 DevInstData
->hDevInfo
,
714 &DevInstData
->devInfoData
);
717 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICE) failed with error 0x%lx\n", GetLastError());
721 ret
= SetupDiCallClassInstaller(
722 DIF_NEWDEVICEWIZARD_FINISHINSTALL
,
723 DevInstData
->hDevInfo
,
724 &DevInstData
->devInfoData
);
727 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_FINISHINSTALL) failed with error 0x%lx\n", GetLastError());
731 ret
= SetupDiCallClassInstaller(
732 DIF_DESTROYPRIVATEDATA
,
733 DevInstData
->hDevInfo
,
734 &DevInstData
->devInfoData
);
737 DPRINT("SetupDiCallClassInstaller(DIF_DESTROYPRIVATEDATA) failed with error 0x%lx\n", GetLastError());
745 void CleanUp ( void ) {
747 if (DevInstData
.devInfoData
.cbSize
!= 0)
749 if (!SetupDiDestroyDriverInfoList(DevInstData
.hDevInfo
, &DevInstData
.devInfoData
, SPDIT_COMPATDRIVER
))
750 DPRINT("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError());
753 if (DevInstData
.hDevInfo
!= INVALID_HANDLE_VALUE
)
755 if (!SetupDiDestroyDeviceInfoList(DevInstData
.hDevInfo
))
756 DPRINT("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError());
759 if (DevInstData
.buffer
)
760 HeapFree(GetProcessHeap(), 0, DevInstData
.buffer
);
767 IN HINSTANCE hInstance
,
768 IN LPCWSTR InstanceId
,
773 HPROPSHEETPAGE ahpsp
[5];
777 /* Clear devinst data */
778 ZeroMemory(&DevInstData
, sizeof(DEVINSTDATA
));
779 DevInstData
.devInfoData
.cbSize
= 0; /* Tell if the devInfoData is valid */
782 DevInstData
.hDevInfo
= SetupDiCreateDeviceInfoListExW(NULL
, NULL
, NULL
, NULL
);
783 if (DevInstData
.hDevInfo
== INVALID_HANDLE_VALUE
)
785 DPRINT("SetupDiCreateDeviceInfoListExW() failed with error 0x%lx\n", GetLastError());
790 DevInstData
.devInfoData
.cbSize
= sizeof(SP_DEVINFO_DATA
);
791 ret
= SetupDiOpenDeviceInfoW(
792 DevInstData
.hDevInfo
,
796 &DevInstData
.devInfoData
);
799 DPRINT("SetupDiOpenDeviceInfoW() failed with error 0x%lx\n", GetLastError());
800 DevInstData
.devInfoData
.cbSize
= 0;
805 SetLastError(ERROR_GEN_FAILURE
);
806 ret
= SetupDiGetDeviceRegistryProperty(
807 DevInstData
.hDevInfo
,
808 &DevInstData
.devInfoData
,
810 &DevInstData
.regDataType
,
812 &DevInstData
.requiredSize
);
814 if (!ret
&& GetLastError() == ERROR_INSUFFICIENT_BUFFER
&& DevInstData
.regDataType
== REG_SZ
)
816 DevInstData
.buffer
= HeapAlloc(GetProcessHeap(), 0, DevInstData
.requiredSize
);
817 if (!DevInstData
.buffer
)
819 DPRINT("HeapAlloc() failed\n");
820 SetLastError(ERROR_NOT_ENOUGH_MEMORY
);
824 ret
= SetupDiGetDeviceRegistryProperty(
825 DevInstData
.hDevInfo
,
826 &DevInstData
.devInfoData
,
828 &DevInstData
.regDataType
,
829 DevInstData
.buffer
, DevInstData
.requiredSize
,
830 &DevInstData
.requiredSize
);
835 DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx\n", GetLastError());
840 DPRINT("Installing %S (%S)\n", DevInstData
.buffer
, InstanceId
);
842 if ((Show
=! SW_HIDE
) && (!FindDriver(&DevInstData
))) {
844 /* Create the Welcome page */
845 ZeroMemory (&psp
, sizeof(PROPSHEETPAGE
));
846 psp
.dwSize
= sizeof(PROPSHEETPAGE
);
847 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
848 psp
.hInstance
= hDllInstance
;
849 psp
.lParam
= (LPARAM
)&DevInstData
;
850 psp
.pfnDlgProc
= WelcomeDlgProc
;
851 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_WELCOMEPAGE
);
852 ahpsp
[IDD_WELCOMEPAGE
] = CreatePropertySheetPage(&psp
);
854 /* Create the Select Source page */
855 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
856 psp
.pfnDlgProc
= CHSourceDlgProc
;
857 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_CHSOURCE
);
858 ahpsp
[IDD_CHSOURCE
] = CreatePropertySheetPage(&psp
);
860 /* Create the Search driver page */
861 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
862 psp
.pfnDlgProc
= SearchDrvDlgProc
;
863 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_SEARCHDRV
);
864 ahpsp
[IDD_SEARCHDRV
] = CreatePropertySheetPage(&psp
);
866 /* Create the Finish page */
867 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
868 psp
.pfnDlgProc
= FinishDlgProc
;
869 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_FINISHPAGE
);
870 ahpsp
[IDD_FINISHPAGE
] = CreatePropertySheetPage(&psp
);
872 /* Create the Install failed page */
873 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
874 psp
.pfnDlgProc
= InstFailDlgProc
;
875 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_NODRIVER
);
876 ahpsp
[IDD_NODRIVER
] = CreatePropertySheetPage(&psp
);
878 /* Create the property sheet */
879 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
880 psh
.dwFlags
= PSH_WIZARD97
| PSH_WATERMARK
| PSH_HEADER
;
881 psh
.hInstance
= hDllInstance
;
882 psh
.hwndParent
= NULL
;
886 psh
.pszbmWatermark
= MAKEINTRESOURCE(IDB_WATERMARK
);
887 psh
.pszbmHeader
= MAKEINTRESOURCE(IDB_HEADER
);
889 /* Create title font */
890 DevInstData
.hTitleFont
= CreateTitleFont();
892 /* Display the wizard */
895 DeleteObject(DevInstData
.hTitleFont
);
899 InstallDriver ( &DevInstData
);
907 DllMain (HINSTANCE hInstance
,
911 if (dwReason
== DLL_PROCESS_ATTACH
)
913 INITCOMMONCONTROLSEX InitControls
;
915 InitControls
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
916 InitControls
.dwICC
= ICC_PROGRESS_CLASS
;
917 InitCommonControlsEx(&InitControls
);
918 hDllInstance
= hInstance
;