ReactOS 0.4.16-dev-2104-gb84fa49
wizard.c File Reference
#include "newdev_private.h"
#include <wincon.h>
#include <cfgmgr32.h>
#include <shlobj.h>
#include <shlwapi.h>
Include dependency graph for wizard.c:

Go to the source code of this file.

Functions

static VOID CenterWindow (IN HWND hWnd)
 
static BOOL SetFailedInstall (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOLEAN Set)
 
static BOOL CanDisableDevice (IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *CanDisable)
 
static BOOL IsDeviceStarted (IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *IsEnabled)
 
static BOOL StartDevice (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
 
static DWORD WINAPI FindDriverProc (IN LPVOID lpParam)
 
static DWORD WINAPI InstallDriverProc (IN LPVOID lpParam)
 
static VOID PopulateCustomPathCombo (IN HWND hwndCombo)
 
static VOID SaveCustomPath (IN HWND hwndCombo)
 
static INT_PTR CALLBACK WelcomeDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static void IncludePath (HWND Dlg, BOOL Enabled)
 
static void AutoDriver (HWND Dlg, BOOL Enabled)
 
static INT CALLBACK BrowseCallbackProc (HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
 
static INT_PTR CALLBACK CHSourceDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK SearchDrvDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK InstallDrvDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK NoDriverDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK InstallFailedDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK NeedRebootDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static INT_PTR CALLBACK FinishDlgProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static HFONT CreateTitleFont (VOID)
 
BOOL DisplayWizard (IN PDEVINSTDATA DevInstData, IN HWND hwndParent, IN UINT startPage)
 

Variables

HANDLE hThread
 

Function Documentation

◆ AutoDriver()

static void AutoDriver ( HWND  Dlg,
BOOL  Enabled 
)
static

Definition at line 575 of file wizard.c.

576{
580}
#define IDC_CHECK_PATH
Definition: resource.h:15
#define IDC_CHECK_MEDIA
Definition: resource.h:14
@ Enabled
Definition: mountmgr.h:179
static void IncludePath(HWND Dlg, BOOL Enabled)
Definition: wizard.c:568
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT WINAPI IsDlgButtonChecked(_In_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)

Referenced by CHSourceDlgProc().

◆ BrowseCallbackProc()

static INT CALLBACK BrowseCallbackProc ( HWND  hwnd,
UINT  uMsg,
LPARAM  lParam,
LPARAM  lpData 
)
static

Definition at line 583 of file wizard.c.

584{
585 BOOL bValid = FALSE;
586
587 switch (uMsg)
588 {
589 case BFFM_INITIALIZED:
590 {
591 PCWSTR pszPath = ((PDEVINSTDATA)lpData)->CustomSearchPath;
592
593 bValid = CheckBestDriver((PDEVINSTDATA)lpData, pszPath);
595 SendMessageW(hwnd, BFFM_ENABLEOK, 0, bValid);
596 break;
597 }
598
599 case BFFM_SELCHANGED:
600 {
601 WCHAR szDir[MAX_PATH];
602
604 {
605 bValid = CheckBestDriver((PDEVINSTDATA)lpData, szDir);
606 }
607 PostMessageW(hwnd, BFFM_ENABLEOK, 0, bValid);
608 break;
609 }
610 }
611 return 0;
612}
LPARAM lParam
Definition: combotst.c:139
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
unsigned int BOOL
Definition: ntddk_ex.h:94
LONG_PTR LPARAM
Definition: minwindef.h:175
BOOL CheckBestDriver(_In_ PDEVINSTDATA DevInstData, _In_ PCWSTR pszDir)
Definition: newdev.c:420
struct _DEVINSTDATA * PDEVINSTDATA
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1490
#define BFFM_SELCHANGED
Definition: shlobj.h:1242
#define BFFM_ENABLEOK
Definition: shlobj.h:1249
#define BFFM_SETSELECTION
Definition: shlobj.h:1261
#define BFFM_INITIALIZED
Definition: shlobj.h:1241
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
const uint16_t * PCWSTR
Definition: typedefs.h:57
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CHSourceDlgProc(), and CCopyMoveToMenu::DoAction().

◆ CanDisableDevice()

static BOOL CanDisableDevice ( IN DEVINST  DevInst,
IN HMACHINE  hMachine,
OUT BOOL CanDisable 
)
static

Definition at line 124 of file wizard.c.

128{
129 CONFIGRET cr;
130 ULONG Status, ProblemNumber;
131 BOOL Ret = FALSE;
132
134 &ProblemNumber,
135 DevInst,
136 0,
137 hMachine);
138 if (cr == CR_SUCCESS)
139 {
140 *CanDisable = ((Status & DN_DISABLEABLE) != 0);
141 Ret = TRUE;
142 }
143
144 return Ret;
145}
#define DN_DISABLEABLE
Definition: cfg.h:131
RETURN_TYPE CONFIGRET
Definition: cfgmgr32.h:74
#define CR_SUCCESS
Definition: cfgmgr32.h:842
CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(_Out_ PULONG pulStatus, _Out_ PULONG pulProblemNumber, _In_ DEVINST dnDevInst, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine)
Definition: cfgmgr.c:3684
Status
Definition: gdiplustypes.h:25
uint32_t ULONG
Definition: typedefs.h:59

Referenced by NoDriverDlgProc().

◆ CenterWindow()

static VOID CenterWindow ( IN HWND  hWnd)
static

Definition at line 31 of file wizard.c.

33{
35 RECT rcParent;
36 RECT rcWindow;
37
39 if (hWndParent == NULL)
41
42 GetWindowRect(hWndParent, &rcParent);
43 GetWindowRect(hWnd, &rcWindow);
44
45 /* Check if the child window fits inside the parent window */
46 if (rcWindow.left < rcParent.left || rcWindow.top < rcParent.top ||
47 rcWindow.right > rcParent.right || rcWindow.bottom > rcParent.bottom)
48 {
49 return;
50 }
51
53 hWnd,
55 ((rcParent.right - rcParent.left) - (rcWindow.right - rcWindow.left)) / 2,
56 ((rcParent.bottom - rcParent.top) - (rcWindow.bottom - rcWindow.top)) / 2,
57 0,
58 0,
60}
HWND hWnd
Definition: settings.c:17
#define NULL
Definition: types.h:112
Definition: windef.h:99
LONG right
Definition: windef.h:102
LONG bottom
Definition: windef.h:103
LONG top
Definition: windef.h:101
LONG left
Definition: windef.h:100
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOSIZE
Definition: winuser.h:1256
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
#define HWND_TOP
Definition: winuser.h:1218
HWND WINAPI GetParent(_In_ HWND)

Referenced by CHSourceDlgProc(), FinishDlgProc(), InstallDrvDlgProc(), InstallFailedDlgProc(), NeedRebootDlgProc(), NoDriverDlgProc(), SearchDrvDlgProc(), and WelcomeDlgProc().

◆ CHSourceDlgProc()

static INT_PTR CALLBACK CHSourceDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 615 of file wizard.c.

620{
621 PDEVINSTDATA DevInstData;
622
623 /* Retrieve pointer to the global setup data */
624 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
625
626 switch (uMsg)
627 {
628 case WM_INITDIALOG:
629 {
630 HWND hwndControl, hwndCombo;
631 DWORD dwStyle;
632 COMBOBOXINFO info = { sizeof(info) };
633
634 /* Get pointer to the global setup data */
635 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
636 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
637
638 hwndControl = GetParent(hwndDlg);
639
640 /* Center the wizard window */
641 CenterWindow(hwndControl);
642
643 /* Hide the system menu */
644 dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
645 SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
646
647 hwndCombo = GetDlgItem(hwndDlg, IDC_COMBO_PATH);
648 PopulateCustomPathCombo(hwndCombo);
649
650 GetComboBoxInfo(hwndCombo, &info);
652
654 hwndDlg,
657 (WPARAM)TRUE,
658 (LPARAM)0);
659 AutoDriver(hwndDlg, TRUE);
660 IncludePath(hwndDlg, FALSE);
661
662 /* Disable manual driver choice for now */
664
665 break;
666 }
667
668 case WM_COMMAND:
669 {
670 switch (LOWORD(wParam))
671 {
673 AutoDriver(hwndDlg, TRUE);
674 return TRUE;
675
676 case IDC_RADIO_CHOOSE:
677 AutoDriver(hwndDlg, FALSE);
678 return TRUE;
679
680 case IDC_CHECK_PATH:
682 return TRUE;
683
684 case IDC_BROWSE:
685 {
686 BROWSEINFOW bi = { 0 };
687 LPITEMIDLIST pidl = NULL;
690
691 if (PrepareFoldersToScan(DevInstData,
692 FALSE,
693 TRUE,
694 GetDlgItem(hwndDlg, IDC_COMBO_PATH)))
695 {
696 bi.hwndOwner = hwndDlg;
698 bi.lpszTitle = Title;
700 bi.lParam = (LPARAM)DevInstData;
701 pidl = SHBrowseForFolderW(&bi);
702 }
703
704 if (pidl)
705 {
708
710 {
711 /* Remove previous item selection */
713
714 /* Set the IDC_COMBO_PATH text */
716 }
717
718 /* Free memory, if possible */
720 {
721 IMalloc_Free(malloc, pidl);
722 IMalloc_Release(malloc);
723 }
724 return TRUE;
725 }
726 break;
727 }
728 }
729 break;
730 }
731
732 case WM_NOTIFY:
733 {
734 LPNMHDR lpnm = (LPNMHDR)lParam;
735
736 switch (lpnm->code)
737 {
738 case PSN_SETACTIVE:
739 /* Enable the Next and Back buttons */
741 break;
742
743 case PSN_WIZNEXT:
744 /* Handle a Next button click, if necessary */
746 {
748 HeapFree(GetProcessHeap(), 0, DevInstData->CustomSearchPath);
749 DevInstData->CustomSearchPath = NULL;
751 DevInstData,
754 GetDlgItem(hwndDlg, IDC_COMBO_PATH)))
755 {
757 }
758 else
759 {
761 }
762 }
763 else
764 {
765 /* FIXME */;
766 }
767 return TRUE;
768
769 default:
770 break;
771 }
772 break;
773 }
774
775 default:
776 break;
777 }
778
779 return FALSE;
780}
#define IDC_BROWSE
Definition: resource.h:21
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
Definition: brfolder.cpp:1460
static HINSTANCE hDllInstance
Definition: clb.c:9
WPARAM wParam
Definition: combotst.c:138
#define malloc
Definition: debug_ros.c:4
static const WCHAR Title[]
Definition: oid.c:1259
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
#define IDC_RADIO_SEARCHHERE
Definition: resource.h:12
#define IDD_SEARCHDRV
Definition: resource.h:23
#define IDD_INSTALLFAILED
Definition: resource.h:26
#define IDC_COMBO_PATH
Definition: resource.h:18
#define IDC_RADIO_CHOOSE
Definition: resource.h:13
#define IDS_BROWSE_FOR_FOLDER_TITLE
Definition: resource.h:37
HRESULT WINAPI SHGetMalloc(LPMALLOC *lpmal)
Definition: shellole.c:329
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SUCCEEDED(hr)
Definition: intsafe.h:50
UINT_PTR WPARAM
Definition: minwindef.h:174
static VOID PopulateCustomPathCombo(IN HWND hwndCombo)
Definition: wizard.c:284
static INT CALLBACK BrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lParam, LPARAM lpData)
Definition: wizard.c:583
static void AutoDriver(HWND Dlg, BOOL Enabled)
Definition: wizard.c:575
static VOID SaveCustomPath(IN HWND hwndCombo)
Definition: wizard.c:359
static VOID CenterWindow(IN HWND hWnd)
Definition: wizard.c:31
BOOL PrepareFoldersToScan(IN PDEVINSTDATA DevInstData, IN BOOL IncludeRemovableDevices, IN BOOL IncludeCustomPath, IN HWND hwndCombo OPTIONAL)
Definition: newdev.c:463
#define LOWORD(l)
Definition: pedump.c:82
#define WS_SYSMENU
Definition: pedump.c:629
#define PSN_WIZNEXT
Definition: prsht.h:121
#define PSWIZB_NEXT
Definition: prsht.h:154
#define PSWIZB_BACK
Definition: prsht.h:153
#define PropSheet_SetWizButtons(d, f)
Definition: prsht.h:357
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define PSN_SETACTIVE
Definition: prsht.h:115
#define SHACF_FILESYS_DIRS
Definition: shlwapi.h:53
#define WM_NOTIFY
Definition: richedit.h:61
#define BIF_STATUSTEXT
Definition: shlobj.h:1224
#define BIF_RETURNONLYFSDIRS
Definition: shlobj.h:1222
#define BIF_USENEWUI
Definition: shlobj.h:1229
#define BIF_NONEWFOLDERBUTTON
Definition: shlobj.h:1232
HRESULT WINAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags)
Definition: autocomp.cpp:191
#define _countof(array)
Definition: sndvol32.h:70
base for all directory entries
Definition: entries.h:138
LPWSTR CustomSearchPath
BFFCALLBACK lpfn
Definition: shlobj.h:1210
UINT ulFlags
Definition: shlobj.h:1209
HWND hwndOwner
Definition: shlobj.h:1205
LPCWSTR lpszTitle
Definition: shlobj.h:1208
LPARAM lParam
Definition: shlobj.h:1211
UINT code
Definition: winuser.h:3261
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
#define GWLP_USERDATA
Definition: treelist.c:63
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define WM_COMMAND
Definition: winuser.h:1768
#define CB_SETCURSEL
Definition: winuser.h:1990
#define WM_INITDIALOG
Definition: winuser.h:1767
#define BM_SETCHECK
Definition: winuser.h:1950
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI GetComboBoxInfo(_In_ HWND, _Inout_ PCOMBOBOXINFO)
struct tagNMHDR * LPNMHDR
#define DWLP_MSGRESULT
Definition: winuser.h:881
#define GWL_STYLE
Definition: winuser.h:863
#define SendDlgItemMessage
Definition: winuser.h:5953

Referenced by DisplayWizard().

◆ CreateTitleFont()

static HFONT CreateTitleFont ( VOID  )
static

Definition at line 1347 of file wizard.c.

1348{
1349 NONCLIENTMETRICSW ncm;
1350 LOGFONTW LogFont;
1351 HDC hdc;
1352 INT FontSize;
1353 HFONT hFont;
1354
1355 ncm.cbSize = sizeof(NONCLIENTMETRICSW);
1356 SystemParametersInfo(SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
1357
1358 LogFont = ncm.lfMessageFont;
1359 LogFont.lfWeight = FW_BOLD;
1360 wcscpy(LogFont.lfFaceName, L"MS Shell Dlg");
1361
1362 hdc = GetDC(NULL);
1363 FontSize = 12;
1364 LogFont.lfHeight = 0 - GetDeviceCaps (hdc, LOGPIXELSY) * FontSize / 72;
1365 hFont = CreateFontIndirectW(&LogFont);
1366 ReleaseDC(NULL, hdc);
1367
1368 return hFont;
1369}
HFONT hFont
Definition: main.c:53
#define L(x)
Definition: resources.c:13
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
wcscpy
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
int32_t INT
Definition: typedefs.h:58
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define FW_BOLD
Definition: wingdi.h:378
#define LOGPIXELSY
Definition: wingdi.h:719
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)
#define SystemParametersInfo
Definition: winuser.h:5969

Referenced by DisplayWizard(), and InstallWizard().

◆ DisplayWizard()

BOOL DisplayWizard ( IN PDEVINSTDATA  DevInstData,
IN HWND  hwndParent,
IN UINT  startPage 
)

Definition at line 1372 of file wizard.c.

1376{
1377 PROPSHEETHEADER psh = {0};
1379 PROPSHEETPAGE psp = {0};
1380 HRESULT hr = CoInitialize(NULL); /* for SHAutoComplete */
1381
1382 /* zero based index */
1383 startPage -= IDD_FIRSTPAGE;
1384
1385 /* Create the Welcome page */
1386 ZeroMemory(&psp, sizeof(PROPSHEETPAGE));
1387 psp.dwSize = sizeof(PROPSHEETPAGE);
1388 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
1389 psp.hInstance = hDllInstance;
1390 psp.lParam = (LPARAM)DevInstData;
1391 psp.pszTitle = MAKEINTRESOURCE(DevInstData->bUpdate ? IDS_UPDATEWIZARDTITLE : IDS_INSTALLWIZARDTITLE);
1392 psp.pfnDlgProc = WelcomeDlgProc;
1393 psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
1395
1396 /* Create the Select Source page */
1397 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
1398 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_CHSOURCE_TITLE);
1399 psp.pfnDlgProc = CHSourceDlgProc;
1400 psp.pszTemplate = MAKEINTRESOURCE(IDD_CHSOURCE);
1402
1403 /* Create the Search driver page */
1404 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
1405 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_SEARCHDRV_TITLE);
1406 psp.pfnDlgProc = SearchDrvDlgProc;
1407 psp.pszTemplate = MAKEINTRESOURCE(IDD_SEARCHDRV);
1409
1410 /* Create the Install driver page */
1411 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USETITLE;
1412 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_INSTALLDRV_TITLE);
1413 psp.pfnDlgProc = InstallDrvDlgProc;
1414 psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLDRV);
1416
1417 /* Create the No driver page */
1418 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
1419 psp.pfnDlgProc = NoDriverDlgProc;
1420 psp.pszTemplate = MAKEINTRESOURCE(IDD_NODRIVER);
1422
1423 /* Create the Install failed page */
1424 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
1425 psp.pfnDlgProc = InstallFailedDlgProc;
1426 psp.pszTemplate = MAKEINTRESOURCE(IDD_INSTALLFAILED);
1428
1429 /* Create the Need reboot page */
1430 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
1431 psp.pfnDlgProc = NeedRebootDlgProc;
1432 psp.pszTemplate = MAKEINTRESOURCE(IDD_NEEDREBOOT);
1434
1435 /* Create the Finish page */
1436 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER | PSP_USETITLE;
1437 psp.pfnDlgProc = FinishDlgProc;
1438 psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
1440
1441 /* Create the property sheet */
1442 psh.dwSize = sizeof(PROPSHEETHEADER);
1443 psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER;
1444 psh.hInstance = hDllInstance;
1445 psh.hwndParent = hwndParent;
1446 psh.nPages = IDD_MAXIMUMPAGE + 1;
1447 psh.nStartPage = startPage;
1448 psh.phpage = ahpsp;
1449 psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
1450 psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
1451
1452 /* Create title font */
1453 DevInstData->hTitleFont = CreateTitleFont();
1454
1455 /* Display the wizard */
1456 PropertySheet(&psh);
1457
1458 DeleteObject(DevInstData->hTitleFont);
1459
1460 if (SUCCEEDED(hr))
1462 return TRUE;
1463}
#define IDB_HEADER
Definition: resource.h:30
#define IDB_WATERMARK
Definition: resource.h:4
static HWND hwndParent
Definition: cryptui.c:300
#define IDD_FINISHPAGE
Definition: resource.h:34
#define IDD_CHSOURCE
Definition: resource.h:22
#define IDS_CHSOURCE_TITLE
Definition: resource.h:34
#define IDS_SEARCHDRV_TITLE
Definition: resource.h:35
#define IDD_INSTALLDRV
Definition: resource.h:24
#define IDD_FIRSTPAGE
Definition: resource.h:29
#define IDD_NODRIVER
Definition: resource.h:25
#define IDS_INSTALLDRV_TITLE
Definition: resource.h:36
#define IDD_WELCOMEPAGE
Definition: resource.h:21
#define IDS_INSTALLWIZARDTITLE
Definition: resource.h:32
#define IDD_MAXIMUMPAGE
Definition: resource.h:30
#define IDD_NEEDREBOOT
Definition: resource.h:27
#define IDS_UPDATEWIZARDTITLE
Definition: resource.h:33
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
pKey DeleteObject()
#define ZeroMemory
Definition: minwinbase.h:31
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
static HFONT CreateTitleFont(VOID)
Definition: wizard.c:1347
static INT_PTR CALLBACK NoDriverDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:989
static INT_PTR CALLBACK NeedRebootDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:1189
static INT_PTR CALLBACK WelcomeDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:469
static INT_PTR CALLBACK FinishDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:1268
static INT_PTR CALLBACK InstallDrvDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:878
static INT_PTR CALLBACK SearchDrvDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:783
static INT_PTR CALLBACK CHSourceDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:615
static INT_PTR CALLBACK InstallFailedDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:1110
#define MAKEINTRESOURCE(i)
Definition: ntverrsrc.c:25
#define PROPSHEETHEADER
Definition: prsht.h:392
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_USETITLE
Definition: prsht.h:26
#define PSP_DEFAULT
Definition: prsht.h:22
#define PropertySheet
Definition: prsht.h:400
#define PROPSHEETPAGE
Definition: prsht.h:389
HRESULT hr
Definition: shlfolder.c:183

Referenced by DevInstallW(), and InstallDevInstEx().

◆ FindDriverProc()

static DWORD WINAPI FindDriverProc ( IN LPVOID  lpParam)
static

Definition at line 242 of file wizard.c.

244{
245 PDEVINSTDATA DevInstData;
246 BOOL result = FALSE;
247
248 DevInstData = (PDEVINSTDATA)lpParam;
249
250 result = ScanFoldersForDriver(DevInstData);
251
252 if (result)
253 {
254 PostMessage(DevInstData->hDialog, WM_SEARCH_FINISHED, 1, 0);
255 }
256 else
257 {
258 if (!DevInstData->bUpdate)
259 {
260 /* Update device configuration */
261 SetFailedInstall(DevInstData->hDevInfo,
262 &DevInstData->devInfoData,
263 TRUE);
264 }
265 PostMessage(DevInstData->hDialog, WM_SEARCH_FINISHED, 0, 0);
266 }
267 return 0;
268}
GLuint64EXT * result
Definition: glext.h:11304
static BOOL SetFailedInstall(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOLEAN Set)
Definition: wizard.c:63
BOOL ScanFoldersForDriver(IN PDEVINSTDATA DevInstData)
Definition: newdev.c:428
#define WM_SEARCH_FINISHED
SP_DEVINFO_DATA devInfoData
HDEVINFO hDevInfo
#define PostMessage
Definition: winuser.h:5943

Referenced by SearchDrvDlgProc().

◆ FinishDlgProc()

static INT_PTR CALLBACK FinishDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 1268 of file wizard.c.

1273{
1274 PDEVINSTDATA DevInstData;
1276
1277 /* Retrieve pointer to the global setup data */
1278 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
1279
1280 switch (uMsg)
1281 {
1282 case WM_INITDIALOG:
1283 {
1284 HWND hwndControl;
1285
1286 /* Get pointer to the global setup data */
1287 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
1288 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
1289
1290 /* Center the wizard window */
1291 CenterWindow(GetParent(hwndDlg));
1292
1293 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
1294 ShowWindow(hwndControl, SW_HIDE);
1295 EnableWindow(hwndControl, FALSE);
1296
1298 hwndDlg,
1299 IDC_DEVICE,
1300 WM_SETTEXT,
1301 0,
1302 (LPARAM)DevInstData->drvInfoData.Description);
1303
1304 /* Set title font */
1306 hwndDlg,
1308 WM_SETFONT,
1309 (WPARAM)DevInstData->hTitleFont,
1310 (LPARAM)TRUE);
1311 break;
1312 }
1313
1314 case WM_NOTIFY:
1315 {
1316 LPNMHDR lpnm = (LPNMHDR)lParam;
1317
1318 switch (lpnm->code)
1319 {
1320 case PSN_SETACTIVE:
1321 /* Enable the correct buttons on for the active page */
1323 break;
1324
1325 case PSN_WIZBACK:
1326 /* Handle a Back button click, if necessary */
1327 break;
1328
1329 case PSN_WIZFINISH:
1330 /* Handle a Finish button click, if necessary */
1331 break;
1332
1333 default:
1334 break;
1335 }
1336 break;
1337 }
1338
1339 default:
1340 break;
1341 }
1342
1343 return FALSE;
1344}
#define IDC_FINISHTITLE
Definition: resource.h:66
#define IDC_DEVICE
Definition: resource.h:8
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
#define PSWIZB_FINISH
Definition: prsht.h:155
#define PSN_WIZFINISH
Definition: prsht.h:122
#define PSN_WIZBACK
Definition: prsht.h:120
SP_DRVINFO_DATA_W drvInfoData
WCHAR Description[LINE_LEN]
Definition: setupapi.h:1017
#define SW_HIDE
Definition: winuser.h:779
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDCANCEL
Definition: winuser.h:842
#define WM_SETTEXT
Definition: winuser.h:1645
#define WM_SETFONT
Definition: winuser.h:1678

Referenced by DisplayWizard(), and InstallWizard().

◆ IncludePath()

static void IncludePath ( HWND  Dlg,
BOOL  Enabled 
)
static

Definition at line 568 of file wizard.c.

Referenced by AutoDriver(), and CHSourceDlgProc().

◆ InstallDriverProc()

static DWORD WINAPI InstallDriverProc ( IN LPVOID  lpParam)
static

Definition at line 271 of file wizard.c.

273{
274 PDEVINSTDATA DevInstData;
275 BOOL res;
276
277 DevInstData = (PDEVINSTDATA)lpParam;
278 res = InstallCurrentDriver(DevInstData);
279 PostMessage(DevInstData->hDialog, WM_INSTALL_FINISHED, res ? 0 : 1, 0);
280 return 0;
281}
GLuint res
Definition: glext.h:9613
BOOL InstallCurrentDriver(IN PDEVINSTDATA DevInstData)
Definition: newdev.c:541
#define WM_INSTALL_FINISHED

Referenced by InstallDrvDlgProc().

◆ InstallDrvDlgProc()

static INT_PTR CALLBACK InstallDrvDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 878 of file wizard.c.

883{
884 PDEVINSTDATA DevInstData;
886
887 /* Retrieve pointer to the global setup data */
888 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
889
890 switch (uMsg)
891 {
892 case WM_INITDIALOG:
893 {
894 HWND hwndControl;
895 DWORD dwStyle;
896
897 /* Get pointer to the global setup data */
898 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
899 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
900
901 DevInstData->hDialog = hwndDlg;
902 hwndControl = GetParent(hwndDlg);
903
904 /* Center the wizard window */
905 CenterWindow(hwndControl);
906
908 hwndDlg,
911 0,
912 (LPARAM)DevInstData->drvInfoData.Description);
913
914 /* Hide the system menu */
915 dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
916 SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
917 break;
918 }
919
921 {
923 hThread = 0;
924 if (wParam == 0)
925 {
926 SP_DEVINSTALL_PARAMS installParams;
927
928 SetFailedInstall(DevInstData->hDevInfo,
929 &DevInstData->devInfoData,
930 FALSE);
931
932 /* Should we reboot? */
933 installParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
935 DevInstData->hDevInfo,
936 &DevInstData->devInfoData,
937 &installParams))
938 {
939 if (installParams.Flags & (DI_NEEDRESTART | DI_NEEDREBOOT))
940 {
942 }
943 else
945 break;
946 }
947 }
949 break;
950 }
951
952 case WM_NOTIFY:
953 {
954 LPNMHDR lpnm = (LPNMHDR)lParam;
955
956 switch (lpnm->code)
957 {
958 case PSN_SETACTIVE:
960 hThread = CreateThread(NULL, 0, InstallDriverProc, DevInstData, 0, &dwThreadId);
961 break;
962
963 case PSN_KILLACTIVE:
964 if (hThread != 0)
965 {
967 return TRUE;
968 }
969 break;
970
971 case PSN_WIZNEXT:
972 /* Handle a Next button click, if necessary */
973 break;
974
975 default:
976 break;
977 }
978 break;
979 }
980
981 default:
982 break;
983 }
984
985 return FALSE;
986}
#define CloseHandle
Definition: compat.h:739
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
DWORD dwThreadId
Definition: fdebug.c:31
static DWORD WINAPI InstallDriverProc(IN LPVOID lpParam)
Definition: wizard.c:271
HANDLE hThread
Definition: wizard.c:28
#define PSN_KILLACTIVE
Definition: prsht.h:116
#define PropSheet_SetCurSelByID(d, i)
Definition: prsht.h:354
#define DI_NEEDRESTART
Definition: setupapi.h:53
#define SetupDiGetDeviceInstallParams
Definition: setupapi.h:2600
SP_DEVINSTALL_PARAMS_A SP_DEVINSTALL_PARAMS
Definition: setupapi.h:1156
#define DI_NEEDREBOOT
Definition: setupapi.h:54

Referenced by DisplayWizard().

◆ InstallFailedDlgProc()

static INT_PTR CALLBACK InstallFailedDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 1110 of file wizard.c.

1115{
1116 PDEVINSTDATA DevInstData;
1118
1119 /* Retrieve pointer to the global setup data */
1120 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
1121
1122 switch (uMsg)
1123 {
1124 case WM_INITDIALOG:
1125 {
1126 HWND hwndControl;
1127
1128 /* Get pointer to the global setup data */
1129 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
1130 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
1131
1132 /* Center the wizard window */
1133 CenterWindow(GetParent(hwndDlg));
1134
1135 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
1136 ShowWindow(hwndControl, SW_HIDE);
1137 EnableWindow(hwndControl, FALSE);
1138
1140 hwndDlg,
1141 IDC_DEVICE,
1142 WM_SETTEXT,
1143 0,
1144 (LPARAM)DevInstData->drvInfoData.Description);
1145
1146 /* Set title font */
1148 hwndDlg,
1150 WM_SETFONT,
1151 (WPARAM)DevInstData->hTitleFont,
1152 (LPARAM)TRUE);
1153 break;
1154 }
1155
1156 case WM_NOTIFY:
1157 {
1158 LPNMHDR lpnm = (LPNMHDR)lParam;
1159
1160 switch (lpnm->code)
1161 {
1162 case PSN_SETACTIVE:
1163 /* Enable the correct buttons on for the active page */
1165 break;
1166
1167 case PSN_WIZBACK:
1168 /* Handle a Back button click, if necessary */
1169 break;
1170
1171 case PSN_WIZFINISH:
1172 /* Handle a Finish button click, if necessary */
1173 break;
1174
1175 default:
1176 break;
1177 }
1178 break;
1179 }
1180
1181 default:
1182 break;
1183 }
1184
1185 return FALSE;
1186}

Referenced by DisplayWizard().

◆ IsDeviceStarted()

static BOOL IsDeviceStarted ( IN DEVINST  DevInst,
IN HMACHINE  hMachine,
OUT BOOL IsEnabled 
)
static

Definition at line 148 of file wizard.c.

152{
153 CONFIGRET cr;
154 ULONG Status, ProblemNumber;
155 BOOL Ret = FALSE;
156
158 &Status,
159 &ProblemNumber,
160 DevInst,
161 0,
162 hMachine);
163 if (cr == CR_SUCCESS)
164 {
165 *IsEnabled = ((Status & DN_STARTED) != 0);
166 Ret = TRUE;
167 }
168
169 return Ret;
170}
#define DN_STARTED
Definition: cfg.h:121
return pProvider IsEnabled(ProviderControl)

Referenced by NoDriverDlgProc().

◆ NeedRebootDlgProc()

static INT_PTR CALLBACK NeedRebootDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 1189 of file wizard.c.

1194{
1195 PDEVINSTDATA DevInstData;
1197
1198 /* Retrieve pointer to the global setup data */
1199 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
1200
1201 switch (uMsg)
1202 {
1203 case WM_INITDIALOG:
1204 {
1205 HWND hwndControl;
1206
1207 /* Get pointer to the global setup data */
1208 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
1209 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
1210
1211 /* Center the wizard window */
1212 CenterWindow(GetParent(hwndDlg));
1213
1214 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
1215 ShowWindow(hwndControl, SW_HIDE);
1216 EnableWindow(hwndControl, FALSE);
1217
1219 hwndDlg,
1220 IDC_DEVICE,
1221 WM_SETTEXT,
1222 0,
1223 (LPARAM)DevInstData->drvInfoData.Description);
1224
1225 /* Set title font */
1227 hwndDlg,
1229 WM_SETFONT,
1230 (WPARAM)DevInstData->hTitleFont,
1231 (LPARAM)TRUE);
1232 break;
1233 }
1234
1235 case WM_NOTIFY:
1236 {
1237 LPNMHDR lpnm = (LPNMHDR)lParam;
1238
1239 switch (lpnm->code)
1240 {
1241 case PSN_SETACTIVE:
1242 /* Enable the correct buttons on for the active page */
1244 break;
1245
1246 case PSN_WIZBACK:
1247 /* Handle a Back button click, if necessary */
1248 break;
1249
1250 case PSN_WIZFINISH:
1251 /* Handle a Finish button click, if necessary */
1252 break;
1253
1254 default:
1255 break;
1256 }
1257 break;
1258 }
1259
1260 default:
1261 break;
1262 }
1263
1264 return FALSE;
1265}

Referenced by DisplayWizard().

◆ NoDriverDlgProc()

static INT_PTR CALLBACK NoDriverDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 989 of file wizard.c.

994{
995 PDEVINSTDATA DevInstData;
996 HWND hwndControl;
997
999
1000 /* Get pointer to the global setup data */
1001 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
1002
1003 switch (uMsg)
1004 {
1005 case WM_INITDIALOG:
1006 {
1007 BOOL DisableableDevice = FALSE;
1008
1009 /* Get pointer to the global setup data */
1010 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
1011 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
1012
1013 /* Center the wizard window */
1014 CenterWindow(GetParent(hwndDlg));
1015
1016 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
1017 ShowWindow(hwndControl, SW_HIDE);
1018 EnableWindow(hwndControl, FALSE);
1019
1020 /* Set title font */
1022 hwndDlg,
1024 WM_SETFONT,
1025 (WPARAM)DevInstData->hTitleFont,
1026 (LPARAM)TRUE);
1027
1028 /* disable the "do not show this dialog anymore" checkbox
1029 if the device cannot be disabled */
1031 DevInstData->devInfoData.DevInst,
1032 NULL,
1033 &DisableableDevice);
1035 GetDlgItem(hwndDlg, IDC_DONOTSHOWDLG),
1036 DisableableDevice);
1037 break;
1038 }
1039
1040 case WM_NOTIFY:
1041 {
1042 LPNMHDR lpnm = (LPNMHDR)lParam;
1043
1044 switch (lpnm->code)
1045 {
1046 case PSN_SETACTIVE:
1047 /* Enable the correct buttons on for the active page */
1049 break;
1050
1051 case PSN_WIZBACK:
1052 /* Handle a Back button click, if necessary */
1053 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
1054 ShowWindow(hwndControl, SW_SHOW);
1055 EnableWindow(hwndControl, TRUE);
1057 return TRUE;
1058
1059 case PSN_WIZFINISH:
1060 {
1061 BOOL DisableableDevice = FALSE;
1062 BOOL IsStarted = FALSE;
1063
1064 if (CanDisableDevice(DevInstData->devInfoData.DevInst,
1065 NULL,
1066 &DisableableDevice) &&
1067 DisableableDevice &&
1069 DevInstData->devInfoData.DevInst,
1070 NULL,
1071 &IsStarted) &&
1072 !IsStarted &&
1074 hwndDlg,
1077 (WPARAM)0, (LPARAM)0) == BST_CHECKED)
1078 {
1079 /* disable the device */
1081 DevInstData->hDevInfo,
1082 &DevInstData->devInfoData,
1083 FALSE,
1084 0,
1085 NULL);
1086 }
1087 else
1088 {
1089 SetFailedInstall(DevInstData->hDevInfo,
1090 &DevInstData->devInfoData,
1091 FALSE);
1092 }
1093 break;
1094 }
1095
1096 default:
1097 break;
1098 }
1099 break;
1100 }
1101
1102 default:
1103 break;
1104 }
1105
1106 return FALSE;
1107}
#define IDC_DONOTSHOWDLG
Definition: resource.h:11
static BOOL StartDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
Definition: wizard.c:173
static BOOL IsDeviceStarted(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *IsEnabled)
Definition: wizard.c:148
static BOOL CanDisableDevice(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *CanDisable)
Definition: wizard.c:124
#define SW_SHOW
Definition: winuser.h:786
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1947

Referenced by DisplayWizard().

◆ PopulateCustomPathCombo()

static VOID PopulateCustomPathCombo ( IN HWND  hwndCombo)
static

Definition at line 284 of file wizard.c.

286{
287 HKEY hKey = NULL;
288 DWORD dwRegType;
289 DWORD dwPathLength = 0;
292 LONG rc;
293
294 (void)ComboBox_ResetContent(hwndCombo);
295
296 /* RegGetValue would have been better... */
297 rc = RegOpenKeyEx(
300 0,
302 &hKey);
303 if (rc != ERROR_SUCCESS)
304 {
305 TRACE("RegOpenKeyEx() failed with error 0x%lx\n", rc);
306 goto cleanup;
307 }
308 rc = RegQueryValueExW(
309 hKey,
310 L"Installation Sources",
311 NULL,
312 &dwRegType,
313 NULL,
314 &dwPathLength);
315 if (rc != ERROR_SUCCESS || dwRegType != REG_MULTI_SZ)
316 {
317 TRACE("RegQueryValueEx() failed with error 0x%lx\n", rc);
318 goto cleanup;
319 }
320
321 /* Allocate enough space to add 2 NULL chars at the end of the string */
322 Buffer = HeapAlloc(GetProcessHeap(), 0, dwPathLength + 2 * sizeof(WCHAR));
323 if (!Buffer)
324 {
325 TRACE("HeapAlloc() failed\n");
326 goto cleanup;
327 }
328 rc = RegQueryValueExW(
329 hKey,
330 L"Installation Sources",
331 NULL,
332 NULL,
333 (LPBYTE)Buffer,
334 &dwPathLength);
335 if (rc != ERROR_SUCCESS)
336 {
337 TRACE("RegQueryValueEx() failed with error 0x%lx\n", rc);
338 goto cleanup;
339 }
340
341 Buffer[dwPathLength / sizeof(WCHAR)] = UNICODE_NULL;
342 Buffer[dwPathLength / sizeof(WCHAR) + 1] = UNICODE_NULL;
343
344 /* Populate combo box */
345 for (Path = Buffer; *Path; Path += wcslen(Path) + 1)
346 {
347 (void)ComboBox_AddString(hwndCombo, Path);
348 if (Path == Buffer)
349 (void)ComboBox_SetCurSel(hwndCombo, 0);
350 }
351
352cleanup:
353 if (hKey != NULL)
356}
PRTL_UNICODE_STRING_BUFFER Path
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: bufpool.h:45
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
#define HeapAlloc
Definition: compat.h:733
static void cleanup(void)
Definition: main.c:1335
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2983
FxAutoRegKey hKey
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
#define REG_MULTI_SZ
Definition: nt_native.h:1504
#define UNICODE_NULL
long LONG
Definition: pedump.c:60
#define REGSTR_KEY_SETUP
Definition: regstr.h:105
#define REGSTR_PATH_SETUP
Definition: regstr.h:23
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char * LPBYTE
Definition: typedefs.h:53
#define ComboBox_SetCurSel(hwndCtl, index)
Definition: windowsx.h:66
#define ComboBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:41
#define ComboBox_ResetContent(hwndCtl)
Definition: windowsx.h:63
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define RegOpenKeyEx
Definition: winreg.h:527
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by CHSourceDlgProc().

◆ SaveCustomPath()

static VOID SaveCustomPath ( IN HWND  hwndCombo)
static

Definition at line 359 of file wizard.c.

361{
362 LPWSTR CustomPath = NULL;
363 DWORD CustomPathLength;
365 LPWSTR pBuffer; /* Pointer into Buffer */
366 int ItemsCount, Length;
367 int i;
368 DWORD TotalLength = 0;
369 BOOL UseCustomPath = TRUE;
370 HKEY hKey = NULL;
371 LONG rc;
372
373 /* Get custom path */
374 Length = ComboBox_GetTextLength(hwndCombo) + 1;
375 CustomPath = HeapAlloc(GetProcessHeap(), 0, Length * sizeof(WCHAR));
376 if (!CustomPath)
377 {
378 TRACE("HeapAlloc() failed\n");
379 goto cleanup;
380 }
381 CustomPathLength = GetWindowTextW(hwndCombo, CustomPath, Length) + 1;
382
383 /* Calculate length of the buffer */
384 ItemsCount = ComboBox_GetCount(hwndCombo);
385 if (ItemsCount == CB_ERR)
386 {
387 TRACE("ComboBox_GetCount() failed\n");
388 goto cleanup;
389 }
390 for (i = 0; i < ItemsCount; i++)
391 {
392 Length = ComboBox_GetLBTextLen(hwndCombo, i);
393 if (Length == CB_ERR)
394 {
395 TRACE("ComboBox_GetLBTextLen() failed\n");
396 goto cleanup;
397 }
398 TotalLength += Length + 1;
399 }
400 TotalLength++; /* Final NULL char */
401
402 /* Allocate buffer */
403 Buffer = HeapAlloc(GetProcessHeap(), 0, (CustomPathLength + TotalLength + 1) * sizeof(WCHAR));
404 if (!Buffer)
405 {
406 TRACE("HeapAlloc() failed\n");
407 goto cleanup;
408 }
409
410 /* Fill the buffer */
411 pBuffer = &Buffer[CustomPathLength];
412 for (i = 0; i < ItemsCount; i++)
413 {
414 Length = ComboBox_GetLBText(hwndCombo, i, pBuffer);
415 if (Length == CB_ERR)
416 {
417 TRACE("ComboBox_GetLBText() failed\n");
418 goto cleanup;
419 }
420 else if (UseCustomPath && _wcsicmp(CustomPath, pBuffer) == 0)
421 UseCustomPath = FALSE;
422 pBuffer += 1 + Length;
423 }
424 *pBuffer = '\0'; /* Add final NULL char */
425
426 if (!UseCustomPath)
427 {
428 /* Nothing to save to registry */
429 goto cleanup;
430 }
431
432 TotalLength += CustomPathLength;
433 wcscpy(Buffer, CustomPath);
434
435 /* Save the buffer */
436 /* RegSetKeyValue would have been better... */
437 rc = RegOpenKeyEx(
440 0,
442 &hKey);
443 if (rc != ERROR_SUCCESS)
444 {
445 TRACE("RegOpenKeyEx() failed with error 0x%lx\n", rc);
446 goto cleanup;
447 }
448 rc = RegSetValueExW(
449 hKey,
450 L"Installation Sources",
451 0,
453 (const BYTE*)Buffer,
454 TotalLength * sizeof(WCHAR));
455 if (rc != ERROR_SUCCESS)
456 {
457 TRACE("RegSetValueEx() failed with error 0x%lx\n", rc);
458 goto cleanup;
459 }
460
461cleanup:
462 if (hKey != NULL)
464 HeapFree(GetProcessHeap(), 0, CustomPath);
466}
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:159
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define KEY_SET_VALUE
Definition: nt_native.h:1020
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
PVOID pBuffer
_In_ ULONG TotalLength
Definition: usbdlib.h:158
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1382
#define ComboBox_GetTextLength(hwndCtl)
Definition: windowsx.h:59
#define ComboBox_GetCount(hwndCtl)
Definition: windowsx.h:48
#define ComboBox_GetLBText(hwndCtl, index, lpszBuffer)
Definition: windowsx.h:56
#define ComboBox_GetLBTextLen(hwndCtl, index)
Definition: windowsx.h:57
#define CB_ERR
Definition: winuser.h:2471
unsigned char BYTE
Definition: xxhash.c:193

Referenced by CHSourceDlgProc().

◆ SearchDrvDlgProc()

static INT_PTR CALLBACK SearchDrvDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 783 of file wizard.c.

788{
789 PDEVINSTDATA DevInstData;
791
792 /* Retrieve pointer to the global setup data */
793 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
794
795 switch (uMsg)
796 {
797 case WM_INITDIALOG:
798 {
799 HWND hwndControl;
800 DWORD dwStyle;
801
802 /* Get pointer to the global setup data */
803 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
804 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
805
806 DevInstData->hDialog = hwndDlg;
807 hwndControl = GetParent(hwndDlg);
808
809 /* Center the wizard window */
810 CenterWindow(hwndControl);
811
813 hwndDlg,
816 0,
817 (LPARAM)DevInstData->buffer);
818
819 /* Hide the system menu */
820 dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
821 SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
822 break;
823 }
824
826 {
828 hThread = 0;
829 if (wParam == 0)
831 else
833 break;
834 }
835
836 case WM_NOTIFY:
837 {
838 LPNMHDR lpnm = (LPNMHDR)lParam;
839
840 switch (lpnm->code)
841 {
842 case PSN_SETACTIVE:
844 /* Yes, we can safely ignore the problem (if any) */
846 DevInstData->hDevInfo,
847 &DevInstData->devInfoData,
849 hThread = CreateThread(NULL, 0, FindDriverProc, DevInstData, 0, &dwThreadId);
850 break;
851
852 case PSN_KILLACTIVE:
853 if (hThread != 0)
854 {
856 return TRUE;
857 }
858 break;
859
860 case PSN_WIZNEXT:
861 /* Handle a Next button click, if necessary */
862 break;
863
864 default:
865 break;
866 }
867 break;
868 }
869
870 default:
871 break;
872 }
873
874 return FALSE;
875}
BOOL WINAPI SetupDiDestroyDriverInfoList(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
Definition: driver.c:1208
static DWORD WINAPI FindDriverProc(IN LPVOID lpParam)
Definition: wizard.c:242
#define SPDIT_COMPATDRIVER
Definition: setupapi.h:507

Referenced by DisplayWizard().

◆ SetFailedInstall()

static BOOL SetFailedInstall ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DevInfoData  OPTIONAL,
IN BOOLEAN  Set 
)
static

Definition at line 63 of file wizard.c.

67{
68 DWORD dwType, dwSize, dwFlags = 0;
69
70 dwSize = sizeof(dwFlags);
72 DevInfoData,
74 &dwType,
75 (PBYTE)&dwFlags,
76 dwSize,
77 &dwSize))
78 {
79 return FALSE;
80 }
81
82 if (Set)
84 else
85 dwFlags &= ~CONFIGFLAG_FAILEDINSTALL;
86
88 DevInfoData,
90 (PBYTE)&dwFlags,
91 dwSize))
92 {
93
94 return FALSE;
95 }
96
97 if (Set)
98 {
99 /* Set the 'Unknown' device class */
100 PWSTR pszUnknown = L"Unknown";
102 DevInfoData,
104 (PBYTE)pszUnknown,
105 (wcslen(pszUnknown) + 1) * sizeof(WCHAR));
106
107 PWSTR pszUnknownGuid = L"{4D36E97E-E325-11CE-BFC1-08002BE10318}";
109 DevInfoData,
111 (PBYTE)pszUnknownGuid,
112 (wcslen(pszUnknownGuid) + 1) * sizeof(WCHAR));
113
114 /* Set device problem code CM_PROB_FAILED_INSTALL */
115 CM_Set_DevNode_Problem(DevInfoData->DevInst,
118 }
119
120 return TRUE;
121}
#define CM_PROB_FAILED_INSTALL
Definition: cfg.h:58
#define CM_SET_DEVNODE_PROBLEM_OVERRIDE
Definition: cfgmgr32.h:807
CONFIGRET WINAPI CM_Set_DevNode_Problem(_In_ DEVINST dnDevInst, _In_ ULONG ulProblem, _In_ ULONG ulFlags)
Definition: cfgmgr.c:8068
BOOL WINAPI SetupDiSetDeviceRegistryPropertyW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Property, const BYTE *PropertyBuffer, DWORD PropertyBufferSize)
Definition: devinst.c:3452
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
static BOOL Set
Definition: pageheap.c:10
BYTE * PBYTE
Definition: pedump.c:66
#define CONFIGFLAG_FAILEDINSTALL
Definition: regstr.h:396
#define SPDRP_CLASS
Definition: setupapi.h:515
#define SetupDiGetDeviceRegistryProperty
Definition: setupapi.h:2604
#define SPDRP_CLASSGUID
Definition: setupapi.h:516
#define SetupDiSetDeviceRegistryProperty
Definition: setupapi.h:2621
#define SPDRP_CONFIGFLAGS
Definition: setupapi.h:518
uint16_t * PWSTR
Definition: typedefs.h:56

Referenced by FindDriverProc(), InstallDrvDlgProc(), NoDriverDlgProc(), and WelcomeDlgProc().

◆ StartDevice()

static BOOL StartDevice ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DevInfoData  OPTIONAL,
IN BOOL  bEnable,
IN DWORD HardwareProfile  OPTIONAL,
OUT BOOL *bNeedReboot  OPTIONAL 
)
static

Definition at line 173 of file wizard.c.

179{
182 DWORD LastErr;
183 BOOL Ret = FALSE;
184
187 pcp.HwProfile = HardwareProfile;
188
189 if (bEnable)
190 {
191 /* try to enable the device on the global profile */
194
195 /* ignore errors */
196 LastErr = GetLastError();
199 DevInfoData,
201 sizeof(SP_PROPCHANGE_PARAMS)))
202 {
206 DevInfoData);
207 }
208 SetLastError(LastErr);
209 }
210
211 /* try config-specific */
214
217 DevInfoData,
219 sizeof(SP_PROPCHANGE_PARAMS)) &&
222 DevInfoData))
223 {
224 dp.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
227 DevInfoData,
228 &dp))
229 {
230 if (bNeedReboot != NULL)
231 {
232 *bNeedReboot = ((dp.Flags & (DI_NEEDRESTART | DI_NEEDREBOOT)) != 0);
233 }
234
235 Ret = TRUE;
236 }
237 }
238 return Ret;
239}
#define SetLastError(x)
Definition: compat.h:752
BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
Definition: devinst.c:4024
struct _SP_CLASSINSTALL_HEADER SP_CLASSINSTALL_HEADER
#define SetupDiSetClassInstallParams
Definition: setupapi.h:2618
#define DICS_DISABLE
Definition: setupapi.h:114
#define DICS_ENABLE
Definition: setupapi.h:112
#define DICS_FLAG_CONFIGSPECIFIC
Definition: setupapi.h:115
#define DICS_FLAG_GLOBAL
Definition: setupapi.h:113
#define DIF_PROPERTYCHANGE
Definition: setupapi.h:138
DI_FUNCTION InstallFunction
Definition: setupapi.h:905
SP_CLASSINSTALL_HEADER ClassInstallHeader
Definition: setupapi.h:917
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ BOOL bEnable
Definition: winddi.h:3426

Referenced by AddDevice(), NoDriverDlgProc(), PcAddAdapterDevice(), and PciPdoIrpStartDevice().

◆ WelcomeDlgProc()

static INT_PTR CALLBACK WelcomeDlgProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 469 of file wizard.c.

474{
475 PDEVINSTDATA DevInstData;
477
478 /* Retrieve pointer to the global setup data */
479 DevInstData = (PDEVINSTDATA)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
480
481 switch (uMsg)
482 {
483 case WM_INITDIALOG:
484 {
485 HWND hwndControl;
486 DWORD dwStyle;
487
488 /* Get pointer to the global setup data */
489 DevInstData = (PDEVINSTDATA)((LPPROPSHEETPAGE)lParam)->lParam;
490 SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (DWORD_PTR)DevInstData);
491
492 hwndControl = GetParent(hwndDlg);
493
494 /* Center the wizard window */
495 CenterWindow(hwndControl);
496
497 /* Hide the system menu */
498 dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
499 SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
500
501 /* Set title font */
503 hwndDlg,
506 (WPARAM)DevInstData->hTitleFont,
507 (LPARAM)TRUE);
508
510 hwndDlg,
513 0,
514 (LPARAM)DevInstData->buffer);
515
517 hwndDlg,
520 (WPARAM)TRUE,
521 (LPARAM)0);
522
523 if (!DevInstData->bUpdate)
524 {
525 SetFailedInstall(DevInstData->hDevInfo,
526 &DevInstData->devInfoData,
527 TRUE);
528 }
529 break;
530 }
531
532 case WM_NOTIFY:
533 {
534 LPNMHDR lpnm = (LPNMHDR)lParam;
535
536 switch (lpnm->code)
537 {
538 case PSN_SETACTIVE:
539 /* Enable the Next button */
541 break;
542
543 case PSN_WIZNEXT:
544 /* Handle a Next button click, if necessary */
546 {
547 if (PrepareFoldersToScan(DevInstData, TRUE, FALSE, NULL))
549 else
551 }
552 return TRUE;
553
554 default:
555 break;
556 }
557 break;
558 }
559
560 default:
561 break;
562 }
563
564 return FALSE;
565}
#define IDC_WELCOMETITLE
Definition: resource.h:16
#define IDC_RADIO_AUTO
Definition: resource.h:9

Referenced by DisplayWizard(), and InstallWizard().

Variable Documentation

◆ hThread

HANDLE hThread

Definition at line 28 of file wizard.c.

Referenced by _DoDLLInjection(), _ServiceMain(), AcceptConnections(), addr_to_linear(), check_thread_instance(), CommonInstall(), CreateLobbyMessageReceptionThread(), CreateRemoteThread(), CreateServers(), CreateServiceThread(), CSysTray::CreateSysTrayThread(), CreateTestThread(), CsrAddStaticServerThread(), CsrApiPortInitialize(), CsrCreateProcess(), CsrCreateRemoteThread(), CsrCreateThread(), CsrExecServerThread(), CsrpCheckRequestThreads(), CsrSbCreateSession(), CtfImmSetLangBand(), DbgUiIssueRemoteBreakin(), DialogProc_0(), DialogProc_1(), CTrayWindow::DisplayProperties(), CTrayWindow::DisplayRunFileDlg(), EndLocalThread(), ExpCreateWorkerThread(), fetch_thread_info(), GetExitCodeThread(), GetThreadContext(), GetThreadIOPendingFlag(), GetThreadPriority(), GetThreadPriorityBoost(), GetThreadSelectorEntry(), GetThreadTimes(), GuiConsoleInputThread(), HandleLogoff(), i386_get_addr(), IDirectSoundCaptureBufferImpl_Start(), init(), COutputPin::InitializeIOThread(), InitiateSoundStreaming(), InitProgressDialog(), InstallDrvDlgProc(), CZipFolder::InvokeCommand(), JustDoIt(), LocalScheduleJob(), MailSlotReader(), main(), mmTaskCreate(), NtOpenThread(), Window::OnCommand(), OnInitDialog(), OpenPropSheet(), PlayLogonSound(), PrintThreads(), proc_PlaySoundAsync(), ProgressDlg::ProcessWindowMessage(), PspCreateThread(), QueueUserAPC(), CDeviceView::Refresh(), ResumeThread(), RunLogoffShutdownThread(), RunSetup(), CZipCreator::runThread(), SaveThreadHandle(), SearchDrvDlgProc(), ServiceInit(), ServiceMain(), SetThreadAffinityMask(), SetThreadContext(), SetThreadIdealProcessor(), SetThreadPriority(), SetThreadPriorityBoost(), SetThreadToken(), SHCreateThread(), SlideWindow(), StackWalk(), StackWalk64(), START_TEST(), CProgressDialog::StartProgressDialog(), StartSystemShutdown(), CAsyncLoadIcon::StartTasks(), StartTestCORE10188(), CUTBLangBarDlg::StartThread(), SuspendThread(), TerminateThread(), test_attach_input(), Test_AVX(), Test_AVX512(), test_CreateRemoteThread(), test_DragQueryFile(), test_events(), test_http_connection(), test_ImmThreads(), test_interthread_messages(), test_menu_input(), test_pack_CREATE_PROCESS_DEBUG_INFO(), test_pack_CREATE_THREAD_DEBUG_INFO(), test_pack_PROCESS_INFORMATION(), test_QueryInformationJobObject(), test_runner(), Test_SimpleParameters(), test_smresult(), Test_SSE(), test_thread_handle_close(), test_thread_invalid_params(), test_thread_setlocale(), test_thread_suspended(), TEST_Tracking(), Test_WS_FORCEMINIMIZE_Sub(), TestMessages(), TestMultipleUserAPCs(), WdmAudSetMixerDeviceFormatByLegacy(), WinMain(), WlxAssignShellProtection(), wmain(), WriterThread::WriterThread(), and wWinMain().