VOID PhShowJobProperties( _In_ HWND ParentWindowHandle, _In_ PPH_OPEN_OBJECT OpenObject, _In_opt_ PVOID Context, _In_opt_ PWSTR Title ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; HPROPSHEETPAGE pages[1]; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_PROPTITLE; propSheetHeader.hInstance = PhInstanceHandle; propSheetHeader.hwndParent = ParentWindowHandle; propSheetHeader.pszCaption = Title ? Title : L"Job"; propSheetHeader.nPages = 1; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; pages[0] = PhCreateJobPage(OpenObject, Context, NULL); PhModalPropertySheet(&propSheetHeader); }
VOID PhpShowJobAdvancedProperties( _In_ HWND ParentWindowHandle, _In_ PJOB_PAGE_CONTEXT Context ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; HPROPSHEETPAGE pages[2]; PROPSHEETPAGE statisticsPage; PH_STD_OBJECT_SECURITY stdObjectSecurity; PPH_ACCESS_ENTRY accessEntries; ULONG numberOfAccessEntries; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_PROPTITLE; propSheetHeader.hInstance = PhInstanceHandle; propSheetHeader.hwndParent = ParentWindowHandle; propSheetHeader.pszCaption = L"Job"; propSheetHeader.nPages = 2; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; // General memset(&statisticsPage, 0, sizeof(PROPSHEETPAGE)); statisticsPage.dwSize = sizeof(PROPSHEETPAGE); statisticsPage.pszTemplate = MAKEINTRESOURCE(IDD_JOBSTATISTICS); statisticsPage.hInstance = PhInstanceHandle; statisticsPage.pfnDlgProc = PhpJobStatisticsPageProc; statisticsPage.lParam = (LPARAM)Context; pages[0] = CreatePropertySheetPage(&statisticsPage); // Security stdObjectSecurity.OpenObject = Context->OpenObject; stdObjectSecurity.ObjectType = L"Job"; stdObjectSecurity.Context = Context->Context; if (PhGetAccessEntries(L"Job", &accessEntries, &numberOfAccessEntries)) { pages[1] = PhCreateSecurityPage( L"Job", PhStdGetObjectSecurity, PhStdSetObjectSecurity, &stdObjectSecurity, accessEntries, numberOfAccessEntries ); PhFree(accessEntries); } PhModalPropertySheet(&propSheetHeader); }
VOID NTAPI ShowOptionsCallback( _In_opt_ PVOID Parameter, _In_opt_ PVOID Context ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; PROPSHEETPAGE propSheetPage; HPROPSHEETPAGE pages[4]; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_PROPTITLE; propSheetHeader.hwndParent = (HWND)Parameter; propSheetHeader.pszCaption = L"Extended Notifications"; propSheetHeader.nPages = 0; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; // Processes memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSES); propSheetPage.pfnDlgProc = ProcessesDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Services memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_SERVICES); propSheetPage.pfnDlgProc = ServicesDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Logging memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_LOGGING); propSheetPage.pfnDlgProc = LoggingDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Growl memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_GROWL); propSheetPage.pfnDlgProc = GrowlDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); PhModalPropertySheet(&propSheetHeader); }
VOID NTAPI ShowOptionsCallback( _In_opt_ PVOID Parameter, _In_opt_ PVOID Context ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; PROPSHEETPAGE propSheetPage; HPROPSHEETPAGE pages[2]; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP; propSheetHeader.hwndParent = (HWND)Parameter; propSheetHeader.pszCaption = L"Hardware Devices Plugin"; propSheetHeader.nPages = 0; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; // Disk Drives memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DISKDRIVE_OPTIONS); propSheetPage.pfnDlgProc = DiskDriveOptionsDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Network Adapters memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.hInstance = PluginInstance->DllBase; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_NETADAPTER_OPTIONS); propSheetPage.pfnDlgProc = NetworkAdapterOptionsDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); PhModalPropertySheet(&propSheetHeader); }
INT WINAPI wWinMain( _In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ PWSTR lpCmdLine, _In_ INT nCmdShow ) { PROPSHEETPAGE propSheetPage = { sizeof(PROPSHEETPAGE) }; PROPSHEETHEADER propSheetHeader = { sizeof(PROPSHEETHEADER) }; HPROPSHEETPAGE pages[5]; if (!NT_SUCCESS(PhInitializePhLibEx(0, 0, 0))) return 1; CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE); PhApplicationName = L"Process Hacker - Setup"; PhGuiSupportInitialization(); PvpInitializeDpi(); propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_USECALLBACK | PSH_WIZARD_LITE; propSheetHeader.hInstance = PhLibImageBase; propSheetHeader.pszIcon = MAKEINTRESOURCE(IDI_ICON1); propSheetHeader.pfnCallback = MainPropSheet_Callback; propSheetHeader.phpage = pages; // page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG1); propSheetPage.pfnDlgProc = PropSheetPage1_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG2); propSheetPage.pfnDlgProc = PropSheetPage2_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG3); propSheetPage.pfnDlgProc = PropSheetPage3_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG4); propSheetPage.pfnDlgProc = PropSheetPage4_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG5); propSheetPage.pfnDlgProc = PropSheetPage5_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); PhModalPropertySheet(&propSheetHeader); return EXIT_SUCCESS; }
VOID PhShowOptionsDialog( _In_ HWND ParentWindowHandle ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; PROPSHEETPAGE propSheetPage; HPROPSHEETPAGE pages[5]; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_USECALLBACK | PSH_USEPSTARTPAGE; propSheetHeader.hwndParent = ParentWindowHandle; propSheetHeader.pszCaption = L"Options"; propSheetHeader.nPages = 0; propSheetHeader.pStartPage = !PhStartupParameters.ShowOptions ? L"General" : L"Advanced"; propSheetHeader.phpage = pages; propSheetHeader.pfnCallback = PhpOptionsPropSheetProc; if (!PhStartupParameters.ShowOptions) { // Disable all pages other than Advanced. // General page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_OPTGENERAL); propSheetPage.pfnDlgProc = PhpOptionsGeneralDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); } // Advanced page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_OPTADVANCED); propSheetPage.pfnDlgProc = PhpOptionsAdvancedDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); if (!PhStartupParameters.ShowOptions) { // Symbols page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_OPTSYMBOLS); propSheetPage.pfnDlgProc = PhpOptionsSymbolsDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); } if (!PhStartupParameters.ShowOptions) { // Highlighting page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_OPTHIGHLIGHTING); propSheetPage.pfnDlgProc = PhpOptionsHighlightingDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); } if (!PhStartupParameters.ShowOptions) { // Graphs page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_OPTGRAPHS); propSheetPage.pfnDlgProc = PhpOptionsGraphsDlgProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); } PageInit = FALSE; PressedOk = FALSE; RestartRequired = FALSE; if (PhStartupParameters.ShowOptions) StartLocation = PhStartupParameters.Point; else StartLocation.x = MINLONG; OldTaskMgrDebugger = NULL; PhModalPropertySheet(&propSheetHeader); if (PressedOk) { if (!PhStartupParameters.ShowOptions) { PhUpdateCachedSettings(); ProcessHacker_SaveAllSettings(PhMainWndHandle); PhInvalidateAllProcessNodes(); PhReloadSettingsProcessTreeList(); PhSiNotifyChangeSettings(); if (RestartRequired) { if (PhShowMessage( PhMainWndHandle, MB_ICONQUESTION | MB_YESNO, L"One or more options you have changed requires a restart of Process Hacker. " L"Do you want to restart Process Hacker now?" ) == IDYES) { ProcessHacker_PrepareForEarlyShutdown(PhMainWndHandle); PhShellProcessHacker( PhMainWndHandle, L"-v", SW_SHOW, 0, PH_SHELL_APP_PROPAGATE_PARAMETERS | PH_SHELL_APP_PROPAGATE_PARAMETERS_IGNORE_VISIBILITY, 0, NULL ); ProcessHacker_Destroy(PhMainWndHandle); } } } else { // Main window not available. if (PhSettingsFileName) PhSaveSettings(PhSettingsFileName->Buffer); } } }
VOID PhShowServiceProperties( _In_ HWND ParentWindowHandle, _In_ PPH_SERVICE_ITEM ServiceItem ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; PROPSHEETPAGE propSheetPage; HPROPSHEETPAGE pages[32]; SERVICE_PROPERTIES_CONTEXT context; PH_STD_OBJECT_SECURITY stdObjectSecurity; PPH_ACCESS_ENTRY accessEntries; ULONG numberOfAccessEntries; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_PROPTITLE; propSheetHeader.hwndParent = ParentWindowHandle; propSheetHeader.pszCaption = ServiceItem->Name->Buffer; propSheetHeader.nPages = 0; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; // General memset(&context, 0, sizeof(SERVICE_PROPERTIES_CONTEXT)); context.ServiceItem = ServiceItem; context.Ready = FALSE; context.Dirty = FALSE; memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_SRVGENERAL); propSheetPage.pfnDlgProc = PhpServiceGeneralDlgProc; propSheetPage.lParam = (LPARAM)&context; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Security stdObjectSecurity.OpenObject = PhpOpenService; stdObjectSecurity.ObjectType = L"Service"; stdObjectSecurity.Context = ServiceItem; if (PhGetAccessEntries(L"Service", &accessEntries, &numberOfAccessEntries)) { pages[propSheetHeader.nPages++] = PhCreateSecurityPage( ServiceItem->Name->Buffer, PhStdGetObjectSecurity, PhpSetServiceSecurity, &stdObjectSecurity, accessEntries, numberOfAccessEntries ); PhFree(accessEntries); } if (PhPluginsEnabled) { PH_PLUGIN_OBJECT_PROPERTIES objectProperties; objectProperties.Parameter = ServiceItem; objectProperties.NumberOfPages = propSheetHeader.nPages; objectProperties.MaximumNumberOfPages = sizeof(pages) / sizeof(HPROPSHEETPAGE); objectProperties.Pages = pages; PhInvokeCallback(PhGetGeneralCallback(GeneralCallbackServicePropertiesInitializing), &objectProperties); propSheetHeader.nPages = objectProperties.NumberOfPages; } PhModalPropertySheet(&propSheetHeader); }
VOID PhShowHandleProperties( _In_ HWND ParentWindowHandle, _In_ HANDLE ProcessId, _In_ PPH_HANDLE_ITEM HandleItem ) { PROPSHEETHEADER propSheetHeader = { sizeof(propSheetHeader) }; PROPSHEETPAGE propSheetPage; HPROPSHEETPAGE pages[16]; HANDLE_PROPERTIES_CONTEXT context; PH_STD_OBJECT_SECURITY stdObjectSecurity; PPH_ACCESS_ENTRY accessEntries; ULONG numberOfAccessEntries; context.ProcessId = ProcessId; context.HandleItem = HandleItem; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_PROPTITLE; propSheetHeader.hwndParent = ParentWindowHandle; propSheetHeader.pszCaption = L"Handle"; propSheetHeader.nPages = 0; propSheetHeader.nStartPage = 0; propSheetHeader.phpage = pages; // General page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_HNDLGENERAL); propSheetPage.pfnDlgProc = PhpHandleGeneralDlgProc; propSheetPage.lParam = (LPARAM)&context; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // Object-specific page if (!HandleItem->TypeName) { // Dummy } else if (PhEqualString2(HandleItem->TypeName, L"Event", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateEventPage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"EventPair", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateEventPairPage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"Job", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateJobPage( PhpDuplicateHandleFromProcess, &context, NULL ); } else if (PhEqualString2(HandleItem->TypeName, L"Mutant", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateMutantPage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"Section", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateSectionPage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"Semaphore", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateSemaphorePage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"Timer", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateTimerPage( PhpDuplicateHandleFromProcess, &context ); } else if (PhEqualString2(HandleItem->TypeName, L"Token", TRUE)) { pages[propSheetHeader.nPages++] = PhCreateTokenPage( PhpDuplicateHandleFromProcess, &context, NULL ); } // Security page stdObjectSecurity.OpenObject = PhpDuplicateHandleFromProcess; stdObjectSecurity.ObjectType = HandleItem->TypeName->Buffer; stdObjectSecurity.Context = &context; if (PhGetAccessEntries(HandleItem->TypeName->Buffer, &accessEntries, &numberOfAccessEntries)) { pages[propSheetHeader.nPages++] = PhCreateSecurityPage( PhGetStringOrEmpty(HandleItem->BestObjectName), PhStdGetObjectSecurity, PhStdSetObjectSecurity, &stdObjectSecurity, accessEntries, numberOfAccessEntries ); PhFree(accessEntries); } if (PhPluginsEnabled) { PH_PLUGIN_OBJECT_PROPERTIES objectProperties; PH_PLUGIN_HANDLE_PROPERTIES_CONTEXT propertiesContext; propertiesContext.ProcessId = ProcessId; propertiesContext.HandleItem = HandleItem; objectProperties.Parameter = &propertiesContext; objectProperties.NumberOfPages = propSheetHeader.nPages; objectProperties.MaximumNumberOfPages = sizeof(pages) / sizeof(HPROPSHEETPAGE); objectProperties.Pages = pages; PhInvokeCallback(PhGetGeneralCallback(GeneralCallbackHandlePropertiesInitializing), &objectProperties); propSheetHeader.nPages = objectProperties.NumberOfPages; } PhModalPropertySheet(&propSheetHeader); }
VOID SetupShowInstallDialog( VOID ) { PROPSHEETPAGE propSheetPage = { sizeof(PROPSHEETPAGE) }; PROPSHEETHEADER propSheetHeader = { sizeof(PROPSHEETHEADER) }; HPROPSHEETPAGE pages[6]; propSheetHeader.dwFlags = PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP | PSH_USECALLBACK | PSH_WIZARD_LITE; propSheetHeader.pszIcon = MAKEINTRESOURCE(IDI_ICON1); propSheetHeader.pfnCallback = MainPropSheet_Callback; propSheetHeader.hInstance = PhInstanceHandle; propSheetHeader.phpage = pages; // welcome page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG1); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupPropPage1_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // eula page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG2); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupPropPage2_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // config page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG3); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupPropPage3_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // download page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG5); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupPropPage5_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // extract page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_DIALOG4); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupInstallPropPage_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); // error page memset(&propSheetPage, 0, sizeof(PROPSHEETPAGE)); propSheetPage.dwSize = sizeof(PROPSHEETPAGE); propSheetPage.dwFlags = PSP_USETITLE; propSheetPage.pszTitle = PhApplicationName; propSheetPage.pszTemplate = MAKEINTRESOURCE(IDD_ERROR); propSheetPage.hInstance = PhInstanceHandle; propSheetPage.pfnDlgProc = SetupErrorPage_WndProc; pages[propSheetHeader.nPages++] = CreatePropertySheetPage(&propSheetPage); PhModalPropertySheet(&propSheetHeader); }