2020-04-17 10:42:47 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: ReactOS Utility Manager Resources DLL (UManDlg.dll)
|
|
|
|
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
|
|
|
* PURPOSE: DLL header file
|
|
|
|
* COPYRIGHT: Copyright 2020 Bișoc George (fraizeraust99 at gmail dot com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _UMANDLG_H
|
|
|
|
#define _UMANDLG_H
|
|
|
|
|
|
|
|
/* INCLUDES ******************************************************************/
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <windows.h>
|
|
|
|
#include <commctrl.h>
|
|
|
|
#include <tlhelp32.h>
|
|
|
|
#include <windowsx.h>
|
|
|
|
#include <debug.h>
|
|
|
|
#include <wchar.h>
|
|
|
|
#include <strsafe.h>
|
|
|
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
|
|
/* DEFINES ********************************************************************/
|
|
|
|
|
|
|
|
#define MAX_BUFFER 256
|
|
|
|
|
|
|
|
/* TYPES **********************************************************************/
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
HINSTANCE hInstance;
|
|
|
|
HICON hIcon;
|
|
|
|
UINT_PTR iTimer;
|
|
|
|
INT iSelectedIndex;
|
|
|
|
HWND hDlgCtlStart;
|
|
|
|
HWND hDlgCtlStop;
|
|
|
|
HWND hListDlg;
|
|
|
|
HWND hMainDlg;
|
|
|
|
WCHAR szRunning[MAX_BUFFER];
|
|
|
|
WCHAR szNotRunning[MAX_BUFFER];
|
|
|
|
WCHAR szGrpBoxTitle[MAX_BUFFER];
|
|
|
|
} UTILMAN_GLOBALS;
|
|
|
|
|
|
|
|
typedef struct _UTILMAN_STATE
|
|
|
|
{
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszProgram;
|
2020-04-17 10:42:47 +00:00
|
|
|
UINT uNameId;
|
|
|
|
WCHAR szResource[MAX_BUFFER];
|
|
|
|
BOOL bState;
|
|
|
|
} UTILMAN_STATE, *PUTILMAN_STATE;
|
|
|
|
|
|
|
|
typedef struct _REGISTRY_SETTINGS
|
|
|
|
{
|
|
|
|
/* Accessibility Registry settings */
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszAppPath;
|
2020-04-17 10:42:47 +00:00
|
|
|
DWORD dwAppType;
|
|
|
|
DWORD dwClientControlCode;
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszAppName;
|
|
|
|
LPCWSTR lpszErrorOnLaunch;
|
2020-04-17 10:42:47 +00:00
|
|
|
BOOL bHideClient;
|
|
|
|
BOOL bStartWithUtilman;
|
|
|
|
BOOL bStartWithROS;
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszHungRespondAction;
|
2020-04-17 10:42:47 +00:00
|
|
|
DWORD dwHungTimeOut;
|
|
|
|
|
|
|
|
/* Utility Manager Registry settings */
|
|
|
|
BOOL bShowWarning;
|
|
|
|
} REGISTRY_SETTINGS, *PREGISTRY_SETTINGS;
|
|
|
|
|
|
|
|
typedef struct _REGISTRY_DATA
|
|
|
|
{
|
|
|
|
/* On-Screen Keyboard Registry data */
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszOskPath;
|
|
|
|
LPCWSTR lpszOskDisplayName;
|
2020-04-17 10:42:47 +00:00
|
|
|
|
|
|
|
/* Magnify Registry data */
|
2020-04-26 12:14:17 +00:00
|
|
|
LPCWSTR lpszMagnifyPath;
|
|
|
|
LPCWSTR lpszMagnifyDisplayName;
|
2020-04-17 10:42:47 +00:00
|
|
|
} REGISTRY_DATA, *PREGISTRY_DATA;
|
|
|
|
|
|
|
|
/* ENUMERATIONS ***************************************************************/
|
|
|
|
|
|
|
|
typedef enum _WRITE_REGISTRY
|
|
|
|
{
|
|
|
|
REGISTRY_ACCESSIBILITY,
|
|
|
|
REGISTRY_UTILMAN
|
|
|
|
} WRITE_REGISTRY, *PWRITE_REGISTRY;
|
|
|
|
|
|
|
|
/* DECLARATIONS ***************************************************************/
|
|
|
|
|
|
|
|
/* umandlg.c */
|
|
|
|
BOOL DlgInitHandler(HWND hDlg);
|
|
|
|
INT_PTR APIENTRY DlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
INT ListBoxRefreshContents(VOID);
|
|
|
|
VOID CheckUtilityState(BOOL bUtilState);
|
|
|
|
BOOL WINAPI UManStartDlg(VOID);
|
|
|
|
|
|
|
|
/* process.c */
|
2020-04-26 12:14:17 +00:00
|
|
|
DWORD GetProcessID(IN LPCWSTR lpszProcessName);
|
|
|
|
BOOL IsProcessRunning(IN LPCWSTR lpszProcessName);
|
|
|
|
BOOL LaunchProcess(IN LPCWSTR lpszProcessName);
|
|
|
|
BOOL CloseProcess(IN LPCWSTR lpszProcessName);
|
2020-04-17 10:42:47 +00:00
|
|
|
|
|
|
|
/* about.c */
|
|
|
|
VOID ShowAboutDlg(HWND hDlgParent);
|
|
|
|
INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam);
|
|
|
|
|
|
|
|
/* registry.c */
|
2020-04-26 12:14:17 +00:00
|
|
|
BOOL InitAppRegKey(IN HKEY hPredefinedKey, IN LPCWSTR lpszSubKey, OUT PHKEY phKey, OUT LPDWORD lpdwDisposition);
|
|
|
|
BOOL QueryAppSettings(IN HKEY hKey, IN LPCWSTR lpszSubKey, IN LPCWSTR lpszRegValue, OUT PVOID ReturnedData, IN OUT LPDWORD lpdwSizeData);
|
|
|
|
BOOL SaveAppSettings(IN HKEY hKey, IN LPCWSTR lpszRegValue, IN DWORD dwRegType, IN PVOID Data, IN DWORD cbSize);
|
2020-04-17 10:42:47 +00:00
|
|
|
|
|
|
|
/* Struct variable declaration */
|
|
|
|
extern UTILMAN_GLOBALS Globals;
|
|
|
|
extern REGISTRY_SETTINGS Settings;
|
|
|
|
extern REGISTRY_DATA RegData;
|
|
|
|
|
|
|
|
#endif /* UMANDLG_H_ */
|
|
|
|
|
|
|
|
/* EOF */
|