ReactOS 0.4.15-dev-7788-g1ad9096
main.h
Go to the documentation of this file.
1/*
2 * Regedit definitions
3 *
4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#pragma once
22
23#include "resource.h"
24
25
26#define STATUS_WINDOW 2001
27#define TREE_WINDOW 2002
28#define LIST_WINDOW 2003
29
30#define SPLIT_WIDTH 5
31#define SPLIT_MIN 30
32
33#define ARRAY_SIZE(A) (sizeof(A)/sizeof(*A))
34
35#define PM_MODIFYVALUE 0
36#define PM_NEW 1
37#define PM_TREECONTEXT 2
38#define PM_ROOTITEM 3
39#define PM_HEXEDIT 4
40
41#define MAX_NEW_KEY_LEN 128
42#define KEY_MAX_LEN 1024
43
44#define REG_FORMAT_5 1
45#define REG_FORMAT_4 2
46
47/******************************************************************************/
48
50{
58};
59
60typedef struct
61{
68 int nFocusPanel; /* 0: left 1: right */
72} ChildWnd;
73extern ChildWnd* g_pChildWnd;
74
75/*******************************************************************************
76 * Global Variables:
77 */
78extern HINSTANCE hInst;
79extern HWND hFrameWnd;
80extern HMENU hMenuFrame;
81extern HWND hStatusBar;
82extern HMENU hPopupMenus;
83extern HFONT hFont;
84extern enum OPTION_FLAGS Options;
85
86extern WCHAR szTitle[];
87extern WCHAR szFrameClass[];
88extern WCHAR szChildClass[];
89
90extern const WCHAR g_szGeneralRegKey[];
91extern const WCHAR* reg_class_namesW[];
92
93/* about.c */
95
96/* childwnd.c */
98void ResizeWnd(int cx, int cy);
100VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone);
101
102/* edit.c */
103BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin);
104BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
105LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName);
106LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue);
107LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen);
108BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey);
109
110/* error.c */
111int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode, ...);
112int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage, ...);
113
114/* find.c */
115void FindDialog(HWND hWnd);
118
119/* framewnd.c */
121void SetupStatusBar(HWND hWnd, BOOL bResize);
122void UpdateStatusBar(void);
123BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName);
125
126/* listview.c */
128BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone);
129WCHAR *GetValueName(HWND hwndLV, int iStartAt);
132BOOL IsDefaultValue(HWND hwndLV, int i);
133
134/* regedit.c */
135void WINAPIV output_message(unsigned int id, ...);
136void WINAPIV error_exit(unsigned int id, ...);
137
138/* regproc.c */
139char *GetMultiByteString(const WCHAR *strW);
141void delete_registry_key(WCHAR *reg_key_name);
143
144/* security.c */
145BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName);
146
147/* settings.c */
148void LoadSettings(void);
149void SaveSettings(void);
150
151/* treeview.c */
156LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
159HWND StartKeyRename(HWND hwndTV);
161BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath);
162void DestroyTreeView(HWND hwndTV);
163void DestroyListView(HWND hwndLV);
164void DestroyMainMenu(void);
165
166/* txtproc.c */
168
169/* EOF */
HWND hWnd
Definition: settings.c:17
BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName)
Definition: framewnd.c:810
void SetupStatusBar(HWND hWnd, BOOL bResize)
Definition: framewnd.c:161
BOOL IsDefaultValue(HWND hwndLV, int i)
Definition: listview.c:108
HFONT hFont
Definition: main.c:53
BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:118
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
Definition: treeview.c:752
BOOL import_registry_file(FILE *reg_file)
Definition: regproc.c:1054
void DestroyTreeView(HWND hwndTV)
Definition: treeview.c:774
BOOL RefreshTreeItem(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:152
void FindNextMessageBox(HWND hWnd)
Definition: find.c:812
int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage,...)
Definition: error.c:51
enum OPTION_FLAGS Options
Definition: setupldr.c:335
BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW *pnmtv)
Definition: treeview.c:516
HMENU hPopupMenus
Definition: main.c:38
LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: framewnd.c:1385
void DestroyMainMenu(void)
Definition: main.c:164
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
Definition: edit.c:1656
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
Definition: treeview.c:785
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
Definition: edit.c:2072
HINSTANCE hInst
Definition: dxdiag.c:13
WCHAR szFrameClass[]
Definition: main.c:44
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode,...)
Definition: error.c:24
ChildWnd * g_pChildWnd
Definition: childwnd.c:23
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath, BOOL bSelectNone)
Definition: listview.c:672
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: treeview.c:641
const WCHAR * reg_class_namesW[]
Definition: main.c:25
LPCWSTR get_root_key_name(HKEY hRootKey)
Definition: childwnd.c:29
HWND hFrameWnd
Definition: main.c:35
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
Definition: treeview.c:88
const WCHAR g_szGeneralRegKey[]
Definition: settings.c:16
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
Definition: listview.c:545
void SaveSettings(void)
Definition: settings.c:115
BOOL ExportRegistryFile(HWND hWnd)
Definition: framewnd.c:593
void UpdateStatusBar(void)
Definition: solitaire.cpp:150
HWND StartKeyRename(HWND hwndTV)
Definition: treeview.c:399
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath, BOOL bSelectNone)
Definition: childwnd.c:232
HMENU hMenuFrame
Definition: main.c:37
void WINAPIV output_message(unsigned int id,...)
Definition: reg.c:92
HWND CreateListView(HWND hwndParent, HMENU id, INT cx)
Definition: listview.c:632
LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue)
Definition: edit.c:2140
WCHAR szChildClass[]
Definition: main.c:45
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName)
Definition: security.c:838
void FindDialog(HWND hWnd)
Definition: find.c:824
HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name)
Definition: treeview.c:347
LONG RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName)
Definition: edit.c:2105
char * GetMultiByteString(const WCHAR *strW)
Definition: regproc.c:86
BOOL FindNext(HWND hWnd)
Definition: find.c:622
void ShowAboutBox(HWND hWnd)
Definition: about.c:25
void WINAPIV error_exit(unsigned int id,...)
Definition: regedit.c:101
LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen)
Definition: edit.c:2172
WCHAR szTitle[]
Definition: magnifier.c:35
LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM)
Definition: childwnd.c:302
BOOL RefreshTreeView(HWND hWndTV)
Definition: treeview.c:322
WCHAR * GetValueName(HWND hwndLV, int iStartAt)
Definition: listview.c:55
void LoadSettings(void)
Definition: settings.c:53
void DestroyListView(HWND hwndLV)
Definition: listview.c:655
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)
Definition: edit.c:2206
HWND hStatusBar
Definition: main.c:36
BOOL export_registry_key(WCHAR *file_name, WCHAR *path, DWORD format)
Definition: regproc.c:1579
void delete_registry_key(WCHAR *reg_key_name)
Definition: regproc.c:1102
BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem)
Definition: treeview.c:584
BOOL txt_export_registry_key(LPCWSTR file_name, LPCWSTR path)
Definition: txtproc.c:401
void ResizeWnd(int cx, int cy)
Definition: childwnd.c:41
OPTION_FLAGS
Definition: main.h:50
@ OPTIONS_VIEW_DATA_ONLY
Definition: main.h:57
@ OPTIONS_DISPLAY_BINARY_DATA
Definition: main.h:55
@ OPTIONS_AUTO_REFRESH
Definition: main.h:51
@ OPTIONS_CONFIRM_ON_DELETE
Definition: main.h:53
@ OPTIONS_READ_ONLY_MODE
Definition: main.h:52
@ OPTIONS_VIEW_TREE_ONLY
Definition: main.h:56
@ OPTIONS_SAVE_ON_EXIT
Definition: main.h:54
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
TCHAR lpTitle[80]
Definition: ctm.c:69
#define MAX_PATH
Definition: compat.h:34
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
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
LPCWSTR szPath
Definition: env.c:37
static HICON
Definition: imagelist.c:84
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static LPCWSTR file_name
Definition: protocol.c:147
WCHAR strW[12]
Definition: clipboard.c:2029
unsigned int UINT
Definition: ndis.h:50
long LONG
Definition: pedump.c:60
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
#define NMTREEVIEW
Definition: commctrl.h:3642
#define WINAPIV
Definition: sdbpapi.h:64
Definition: main.h:61
int nSplitPos
Definition: main.h:69
HWND hAddressBtnWnd
Definition: main.h:66
int nFocusPanel
Definition: main.h:68
WINDOWPLACEMENT pos
Definition: main.h:70
HICON hArrowIcon
Definition: main.h:67
HWND hTreeWnd
Definition: main.h:63
HWND hListWnd
Definition: main.h:64
HWND hAddressBarWnd
Definition: main.h:65
HWND hWnd
Definition: main.h:62
Definition: name.c:39
int32_t INT
Definition: typedefs.h:58
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185