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)
15 static BOOL
SearchDriver ( PDEVINSTDATA DevInstData
, LPCTSTR Path
);
16 static BOOL
InstallDriver ( PDEVINSTDATA DevInstData
);
17 static DWORD WINAPI
FindDriverProc( LPVOID lpParam
);
18 static BOOL
FindDriver ( PDEVINSTDATA DevInstData
);
20 static DEVINSTDATA DevInstData
;
21 HINSTANCE hDllInstance
;
33 ncm
.cbSize
= sizeof(NONCLIENTMETRICS
);
34 SystemParametersInfo(SPI_GETNONCLIENTMETRICS
, 0, &ncm
, 0);
36 LogFont
= ncm
.lfMessageFont
;
37 LogFont
.lfWeight
= FW_BOLD
;
38 _tcscpy(LogFont
.lfFaceName
, _T("MS Shell Dlg"));
42 LogFont
.lfHeight
= 0 - GetDeviceCaps (hdc
, LOGPIXELSY
) * FontSize
/ 72;
43 hFont
= CreateFontIndirect(&LogFont
);
50 CenterWindow(HWND hWnd
)
56 hWndParent
= GetParent(hWnd
);
57 if (hWndParent
== NULL
)
58 hWndParent
= GetDesktopWindow();
60 GetWindowRect(hWndParent
, &rcParent
);
61 GetWindowRect(hWnd
, &rcWindow
);
65 ((rcParent
.right
- rcParent
.left
) - (rcWindow
.right
- rcWindow
.left
)) / 2,
66 ((rcParent
.bottom
- rcParent
.top
) - (rcWindow
.bottom
- rcWindow
.top
)) / 2,
72 static INT_PTR CALLBACK
80 PDEVINSTDATA DevInstData
;
82 /* Retrieve pointer to the global setup data */
83 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
92 /* Get pointer to the global setup data */
93 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
94 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
96 hwndControl
= GetParent(hwndDlg
);
98 /* Center the wizard window */
99 CenterWindow (hwndControl
);
101 /* Hide the system menu */
102 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
103 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
106 SendDlgItemMessage(hwndDlg
,
109 (WPARAM
)DevInstData
->hTitleFont
,
112 SendDlgItemMessage(hwndDlg
,
116 (LPARAM
) DevInstData
->buffer
);
118 SendDlgItemMessage(hwndDlg
,
131 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
136 /* Enable the Next button */
137 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
);
141 /* Handle a Next button click, if necessary */
143 if (SendDlgItemMessage(hwndDlg
, IDC_RADIO_AUTO
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
)
144 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_SEARCHDRV
);
161 static INT_PTR CALLBACK
169 PDEVINSTDATA DevInstData
;
171 /* Retrieve pointer to the global setup data */
172 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
181 /* Get pointer to the global setup data */
182 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
183 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
185 hwndControl
= GetParent(hwndDlg
);
187 /* Center the wizard window */
188 CenterWindow (hwndControl
);
190 /* Hide the system menu */
191 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
192 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
194 SendDlgItemMessage(hwndDlg
,
195 IDC_RADIO_SEARCHHERE
,
206 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
211 /* Enable the Next and Back buttons */
212 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_NEXT
| PSWIZB_BACK
);
216 /* Handle a Next button click, if necessary */
217 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, 4);
233 static INT_PTR CALLBACK
241 PDEVINSTDATA DevInstData
;
244 /* Retrieve pointer to the global setup data */
245 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
254 /* Get pointer to the global setup data */
255 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
256 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
258 DevInstData
->hDialog
= hwndDlg
;
259 hwndControl
= GetParent(hwndDlg
);
261 /* Center the wizard window */
262 CenterWindow (hwndControl
);
264 SendDlgItemMessage(hwndDlg
,
268 (LPARAM
) DevInstData
->buffer
);
270 /* Hide the system menu */
271 dwStyle
= GetWindowLong(hwndControl
, GWL_STYLE
);
272 SetWindowLong(hwndControl
, GWL_STYLE
, dwStyle
& ~WS_SYSMENU
);
276 case WM_SEARCH_FINISHED
:
278 CloseHandle(hThread
);
281 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_NODRIVER
);
283 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_FINISHPAGE
);
288 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
293 PropSheet_SetWizButtons(GetParent(hwndDlg
), !PSWIZB_NEXT
| !PSWIZB_BACK
);
294 hThread
= CreateThread( NULL
, 0, FindDriverProc
, DevInstData
, 0, &dwThreadId
);
300 SetWindowLong ( hwndDlg
, DWL_MSGRESULT
, TRUE
);
305 /* Handle a Next button click, if necessary */
325 TCHAR drive
[] = {'?',':',0};
328 PDEVINSTDATA DevInstData
;
331 DevInstData
= (PDEVINSTDATA
)lpParam
;
333 dwDrives
= GetLogicalDrives();
334 for (drive
[0] = 'A'; drive
[0] <= 'Z'; drive
[0]++)
338 nType
= GetDriveType( drive
);
339 if ((nType
== DRIVE_CDROM
) || (nType
== DRIVE_FIXED
))
341 /* search for inf file */
342 if (SearchDriver ( DevInstData
, drive
))
344 /* if we found a valid driver inf... */
345 if (FindDriver ( DevInstData
))
347 InstallDriver ( DevInstData
);
348 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 1, 0);
357 PostMessage(DevInstData
->hDialog
, WM_SEARCH_FINISHED
, 0, 0);
361 static INT_PTR CALLBACK
369 PDEVINSTDATA DevInstData
;
371 /* Retrieve pointer to the global setup data */
372 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
380 /* Get pointer to the global setup data */
381 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
382 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
384 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
385 ShowWindow (hwndControl
, SW_HIDE
);
386 EnableWindow (hwndControl
, FALSE
);
388 SendDlgItemMessage(hwndDlg
,
392 (LPARAM
) DevInstData
->drvInfoData
.Description
);
395 SendDlgItemMessage(hwndDlg
,
398 (WPARAM
)DevInstData
->hTitleFont
,
405 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
410 /* Enable the correct buttons on for the active page */
411 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_FINISH
);
415 /* Handle a Back button click, if necessary */
419 /* Handle a Finish button click, if necessary */
435 static INT_PTR CALLBACK
443 PDEVINSTDATA DevInstData
;
445 /* Get pointer to the global setup data */
446 DevInstData
= (PDEVINSTDATA
)GetWindowLongPtr (hwndDlg
, GWL_USERDATA
);
454 DevInstData
= (PDEVINSTDATA
)((LPPROPSHEETPAGE
)lParam
)->lParam
;
455 SetWindowLongPtr(hwndDlg
, GWL_USERDATA
, (DWORD_PTR
)DevInstData
);
457 hwndControl
= GetDlgItem(GetParent(hwndDlg
), IDCANCEL
);
458 ShowWindow (hwndControl
, SW_HIDE
);
459 EnableWindow (hwndControl
, FALSE
);
462 SendDlgItemMessage(hwndDlg
,
465 (WPARAM
)DevInstData
->hTitleFont
,
472 LPNMHDR lpnm
= (LPNMHDR
)lParam
;
479 /* Enable the correct buttons on for the active page */
480 PropSheet_SetWizButtons(GetParent(hwndDlg
), PSWIZB_BACK
| PSWIZB_FINISH
);
484 PropSheet_SetCurSel(GetParent(hwndDlg
), 0, IDD_WELCOMEPAGE
);
485 /* Handle a Back button click, if necessary */
489 /* Handle a Finish button click, if necessary */
490 if (SendDlgItemMessage(hwndDlg
, IDC_DONOTSHOWDLG
, BM_GETCHECK
, (WPARAM
) 0, (LPARAM
) 0) == BST_CHECKED
)
493 if(SetupDiGetDeviceRegistryProperty(DevInstData
->hDevInfo
,
494 &DevInstData
->devInfoData
,
497 (BYTE
*)&config_flags
,
498 sizeof(config_flags
),
501 config_flags
|= CONFIGFLAG_FAILEDINSTALL
;
502 ret
= SetupDiSetDeviceRegistryProperty(
503 DevInstData
->hDevInfo
,
504 &DevInstData
->devInfoData
,
528 IN PDEVINSTDATA DevInstData
)
533 ret
= SetupDiBuildDriverInfoList(DevInstData
->hDevInfo
, &DevInstData
->devInfoData
, SPDIT_COMPATDRIVER
);
536 DPRINT("SetupDiBuildDriverInfoList() failed with error 0x%lx\n", GetLastError());
540 DevInstData
->drvInfoData
.cbSize
= sizeof(SP_DRVINFO_DATA
);
541 ret
= SetupDiEnumDriverInfo(
542 DevInstData
->hDevInfo
,
543 &DevInstData
->devInfoData
,
546 &DevInstData
->drvInfoData
);
549 if (GetLastError() == ERROR_NO_MORE_ITEMS
)
551 DPRINT("SetupDiEnumDriverInfo() failed with error 0x%lx\n", GetLastError());
554 DPRINT("Installing driver %S: %S\n", DevInstData
->drvInfoData
.MfgName
, DevInstData
->drvInfoData
.Description
);
561 IsDots(IN LPCTSTR str
)
563 if(_tcscmp(str
, _T(".")) && _tcscmp(str
, _T(".."))) return FALSE
;
568 GetFileExt(IN LPTSTR FileName
)
573 int i
= _tcsclen(FileName
);
574 while ((i
>= 0) && (FileName
[i
] != _T('.')))
577 FileName
= _tcslwr(FileName
);
587 IN PDEVINSTDATA DevInstData
,
591 SP_DEVINSTALL_PARAMS DevInstallParams
;
592 TCHAR DirPath
[MAX_PATH
];
593 TCHAR FileName
[MAX_PATH
];
594 TCHAR FullPath
[MAX_PATH
];
595 TCHAR LastDirPath
[MAX_PATH
] = _T("");
596 TCHAR PathWithPattern
[MAX_PATH
];
601 _tcscpy(DirPath
, Path
);
603 if (DirPath
[_tcsclen(DirPath
) - 1] != '\\')
604 _tcscat(DirPath
, _T("\\"));
606 _tcscpy(PathWithPattern
, DirPath
);
607 _tcscat(PathWithPattern
, _T("\\*"));
609 for (hFindFile
= FindFirstFile(PathWithPattern
, &wfd
); ((hFindFile
!= INVALID_HANDLE_VALUE
) && ok
); ok
= FindNextFile(hFindFile
, &wfd
))
612 _tcscpy(FileName
, wfd
.cFileName
);
613 if (IsDots(FileName
)) continue;
615 if((wfd
.dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
))
617 _tcscpy(FullPath
, DirPath
);
618 _tcscat(FullPath
, FileName
);
619 if(SearchDriver(DevInstData
, FullPath
))
624 LPCTSTR pszExtension
= GetFileExt(FileName
);
626 if ((_tcscmp(pszExtension
, _T(".inf")) == 0) && (_tcscmp(LastDirPath
, DirPath
) != 0))
628 _tcscpy(LastDirPath
, DirPath
);
629 ZeroMemory (&DevInstallParams
, sizeof(SP_DEVINSTALL_PARAMS
));
630 DevInstallParams
.cbSize
= sizeof(SP_DEVINSTALL_PARAMS
);
632 ret
= SetupDiGetDeviceInstallParams(
633 DevInstData
->hDevInfo
,
634 &DevInstData
->devInfoData
,
637 if (_tcsclen(DirPath
) <= MAX_PATH
)
639 memcpy(DevInstallParams
.DriverPath
, DirPath
, (_tcsclen(DirPath
) + 1) * sizeof(TCHAR
));
642 ret
= SetupDiSetDeviceInstallParams(
643 DevInstData
->hDevInfo
,
644 &DevInstData
->devInfoData
,
647 if ( FindDriver ( DevInstData
) )
649 if (hFindFile
!= INVALID_HANDLE_VALUE
)
650 FindClose(hFindFile
);
658 if (hFindFile
!= INVALID_HANDLE_VALUE
)
659 FindClose(hFindFile
);
666 IN PDEVINSTDATA DevInstData
)
671 ret
= SetupDiCallClassInstaller(
672 DIF_SELECTBESTCOMPATDRV
,
673 DevInstData
->hDevInfo
,
674 &DevInstData
->devInfoData
);
677 DPRINT("SetupDiCallClassInstaller(DIF_SELECTBESTCOMPATDRV) failed with error 0x%lx\n", GetLastError());
681 ret
= SetupDiCallClassInstaller(
683 DevInstData
->hDevInfo
,
684 &DevInstData
->devInfoData
);
687 DPRINT("SetupDiCallClassInstaller(DIF_ALLOW_INSTALL) failed with error 0x%lx\n", GetLastError());
691 ret
= SetupDiCallClassInstaller(
692 DIF_NEWDEVICEWIZARD_PREANALYZE
,
693 DevInstData
->hDevInfo
,
694 &DevInstData
->devInfoData
);
697 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_PREANALYZE) failed with error 0x%lx\n", GetLastError());
701 ret
= SetupDiCallClassInstaller(
702 DIF_NEWDEVICEWIZARD_POSTANALYZE
,
703 DevInstData
->hDevInfo
,
704 &DevInstData
->devInfoData
);
707 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_POSTANALYZE) failed with error 0x%lx\n", GetLastError());
711 ret
= SetupDiCallClassInstaller(
712 DIF_INSTALLDEVICEFILES
,
713 DevInstData
->hDevInfo
,
714 &DevInstData
->devInfoData
);
717 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICEFILES) failed with error 0x%lx\n", GetLastError());
721 ret
= SetupDiCallClassInstaller(
722 DIF_REGISTER_COINSTALLERS
,
723 DevInstData
->hDevInfo
,
724 &DevInstData
->devInfoData
);
727 DPRINT("SetupDiCallClassInstaller(DIF_REGISTER_COINSTALLERS) failed with error 0x%lx\n", GetLastError());
731 ret
= SetupDiCallClassInstaller(
732 DIF_INSTALLINTERFACES
,
733 DevInstData
->hDevInfo
,
734 &DevInstData
->devInfoData
);
737 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLINTERFACES) failed with error 0x%lx\n", GetLastError());
741 ret
= SetupDiCallClassInstaller(
743 DevInstData
->hDevInfo
,
744 &DevInstData
->devInfoData
);
747 DPRINT("SetupDiCallClassInstaller(DIF_INSTALLDEVICE) failed with error 0x%lx\n", GetLastError());
751 ret
= SetupDiCallClassInstaller(
752 DIF_NEWDEVICEWIZARD_FINISHINSTALL
,
753 DevInstData
->hDevInfo
,
754 &DevInstData
->devInfoData
);
757 DPRINT("SetupDiCallClassInstaller(DIF_NEWDEVICEWIZARD_FINISHINSTALL) failed with error 0x%lx\n", GetLastError());
761 ret
= SetupDiCallClassInstaller(
762 DIF_DESTROYPRIVATEDATA
,
763 DevInstData
->hDevInfo
,
764 &DevInstData
->devInfoData
);
767 DPRINT("SetupDiCallClassInstaller(DIF_DESTROYPRIVATEDATA) failed with error 0x%lx\n", GetLastError());
779 if (DevInstData
.devInfoData
.cbSize
!= 0)
781 if (!SetupDiDestroyDriverInfoList(DevInstData
.hDevInfo
, &DevInstData
.devInfoData
, SPDIT_COMPATDRIVER
))
782 DPRINT("SetupDiDestroyDriverInfoList() failed with error 0x%lx\n", GetLastError());
785 if (DevInstData
.hDevInfo
!= INVALID_HANDLE_VALUE
)
787 if (!SetupDiDestroyDeviceInfoList(DevInstData
.hDevInfo
))
788 DPRINT("SetupDiDestroyDeviceInfoList() failed with error 0x%lx\n", GetLastError());
791 if (DevInstData
.buffer
)
792 HeapFree(GetProcessHeap(), 0, DevInstData
.buffer
);
799 IN HINSTANCE hInstance
,
800 IN LPCWSTR InstanceId
,
805 HPROPSHEETPAGE ahpsp
[5];
809 /* Clear devinst data */
810 ZeroMemory(&DevInstData
, sizeof(DEVINSTDATA
));
811 DevInstData
.devInfoData
.cbSize
= 0; /* Tell if the devInfoData is valid */
814 DevInstData
.hDevInfo
= SetupDiCreateDeviceInfoListExW(NULL
, NULL
, NULL
, NULL
);
815 if (DevInstData
.hDevInfo
== INVALID_HANDLE_VALUE
)
817 DPRINT("SetupDiCreateDeviceInfoListExW() failed with error 0x%lx\n", GetLastError());
822 DevInstData
.devInfoData
.cbSize
= sizeof(SP_DEVINFO_DATA
);
823 ret
= SetupDiOpenDeviceInfoW(
824 DevInstData
.hDevInfo
,
828 &DevInstData
.devInfoData
);
831 DPRINT("SetupDiOpenDeviceInfoW() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId
);
832 DevInstData
.devInfoData
.cbSize
= 0;
837 SetLastError(ERROR_GEN_FAILURE
);
838 ret
= SetupDiGetDeviceRegistryProperty(
839 DevInstData
.hDevInfo
,
840 &DevInstData
.devInfoData
,
842 &DevInstData
.regDataType
,
844 &DevInstData
.requiredSize
);
846 if (!ret
&& GetLastError() == ERROR_INSUFFICIENT_BUFFER
&& DevInstData
.regDataType
== REG_SZ
)
848 DevInstData
.buffer
= HeapAlloc(GetProcessHeap(), 0, DevInstData
.requiredSize
);
849 if (!DevInstData
.buffer
)
851 DPRINT("HeapAlloc() failed\n");
852 SetLastError(ERROR_NOT_ENOUGH_MEMORY
);
856 ret
= SetupDiGetDeviceRegistryProperty(
857 DevInstData
.hDevInfo
,
858 &DevInstData
.devInfoData
,
860 &DevInstData
.regDataType
,
861 DevInstData
.buffer
, DevInstData
.requiredSize
,
862 &DevInstData
.requiredSize
);
867 DPRINT("SetupDiGetDeviceRegistryProperty() failed with error 0x%lx (InstanceId %S)\n", GetLastError(), InstanceId
);
872 DPRINT("Installing %S (%S)\n", DevInstData
.buffer
, InstanceId
);
874 if ((!FindDriver(&DevInstData
)) && (Show
!= SW_HIDE
))
877 /* Create the Welcome page */
878 ZeroMemory (&psp
, sizeof(PROPSHEETPAGE
));
879 psp
.dwSize
= sizeof(PROPSHEETPAGE
);
880 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
881 psp
.hInstance
= hDllInstance
;
882 psp
.lParam
= (LPARAM
)&DevInstData
;
883 psp
.pfnDlgProc
= WelcomeDlgProc
;
884 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_WELCOMEPAGE
);
885 ahpsp
[IDD_WELCOMEPAGE
] = CreatePropertySheetPage(&psp
);
887 /* Create the Select Source page */
888 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
889 psp
.pfnDlgProc
= CHSourceDlgProc
;
890 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_CHSOURCE
);
891 ahpsp
[IDD_CHSOURCE
] = CreatePropertySheetPage(&psp
);
893 /* Create the Search driver page */
894 psp
.dwFlags
= PSP_DEFAULT
| PSP_USEHEADERTITLE
| PSP_USEHEADERSUBTITLE
;
895 psp
.pfnDlgProc
= SearchDrvDlgProc
;
896 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_SEARCHDRV
);
897 ahpsp
[IDD_SEARCHDRV
] = CreatePropertySheetPage(&psp
);
899 /* Create the Finish page */
900 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
901 psp
.pfnDlgProc
= FinishDlgProc
;
902 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_FINISHPAGE
);
903 ahpsp
[IDD_FINISHPAGE
] = CreatePropertySheetPage(&psp
);
905 /* Create the Install failed page */
906 psp
.dwFlags
= PSP_DEFAULT
| PSP_HIDEHEADER
;
907 psp
.pfnDlgProc
= InstFailDlgProc
;
908 psp
.pszTemplate
= MAKEINTRESOURCE(IDD_NODRIVER
);
909 ahpsp
[IDD_NODRIVER
] = CreatePropertySheetPage(&psp
);
911 /* Create the property sheet */
912 psh
.dwSize
= sizeof(PROPSHEETHEADER
);
913 psh
.dwFlags
= PSH_WIZARD97
| PSH_WATERMARK
| PSH_HEADER
;
914 psh
.hInstance
= hDllInstance
;
915 psh
.hwndParent
= NULL
;
919 psh
.pszbmWatermark
= MAKEINTRESOURCE(IDB_WATERMARK
);
920 psh
.pszbmHeader
= MAKEINTRESOURCE(IDB_HEADER
);
922 /* Create title font */
923 DevInstData
.hTitleFont
= CreateTitleFont();
925 /* Display the wizard */
928 DeleteObject(DevInstData
.hTitleFont
);
933 InstallDriver ( &DevInstData
);
942 IN HINSTANCE hInstance
,
944 IN LPVOID lpReserved
)
946 if (dwReason
== DLL_PROCESS_ATTACH
)
948 INITCOMMONCONTROLSEX InitControls
;
950 InitControls
.dwSize
= sizeof(INITCOMMONCONTROLSEX
);
951 InitControls
.dwICC
= ICC_PROGRESS_CLASS
;
952 InitCommonControlsEx(&InitControls
);
953 hDllInstance
= hInstance
;