31 #define FAVORITES_MENU_POSITION 3 69 DWORD dwIndex, cbValueName, cbValueData, dwType;
70 WCHAR szValueName[256];
71 BYTE abValueData[256];
72 static int s_nFavoriteMenuSubPos = -1;
80 if (s_nFavoriteMenuSubPos < 0)
97 cbValueData =
sizeof(abValueData);
98 lResult =
RegEnumValueW(
hKey, dwIndex, szValueName, &cbValueName,
NULL, &dwType, abValueData, &cbValueData);
104 bDisplayedAny =
TRUE;
146 if (nItemID == 2) nItemID = 5;
248 for(
i = 0;
i < PairCount;
i++)
289 #define LOADHIVE_KEYNAMELENGTH 128 326 tp.PrivilegeCount = 1;
331 &
tp.Privileges[0].Luid))
407 LONG regUnloadResult;
529 HWND hwndExportBranch;
530 HWND hwndExportBranchText;
549 if (hwndExportBranch)
553 if (hwndExportBranchText)
565 if (hwndExportBranch && hwndExportBranchText
572 pszSelectedKey[0] =
L'\0';
716 hResult = PrintDlgEx(&pd);
719 switch (pd.dwResultAction)
765 WCHAR szFavoritePath[512];
766 DWORD cbData, dwType;
771 cbData =
sizeof(szFavoritePath);
772 memset(szFavoritePath, 0,
sizeof(szFavoritePath));
794 bClipboardOpened =
TRUE;
814 if (bClipboardOpened)
821 WCHAR szNewValueFormat[128];
822 WCHAR szNewValue[128];
825 DWORD dwExistingType, cbData;
838 wsprintf(szNewValue, szNewValueFormat, iIndex++);
839 cbData =
sizeof(
data);
847 cbData =
sizeof(
DWORD);
851 cbData =
sizeof(
WCHAR);
863 cbData =
sizeof(
WCHAR);
883 memset(&lvfi, 0,
sizeof(lvfi));
885 lvfi.psz = szNewValue;
898 *pDsObjectPicker =
NULL;
902 CLSCTX_INPROC_SERVER,
903 &IID_IDsObjectPicker,
904 (
LPVOID*)pDsObjectPicker);
931 InitInfo.
cbSize =
sizeof(InitInfo);
939 hRet = (*pDsObjectPicker)->lpVtbl->Initialize(*pDsObjectPicker,
945 (*pDsObjectPicker)->lpVtbl->Release(*pDsObjectPicker);
961 hRet = pDsObjectPicker->lpVtbl->InvokeDialog(pDsObjectPicker,
971 fe.dwAspect = DVASPECT_CONTENT;
973 fe.tymed = TYMED_HGLOBAL;
975 hRet = pdo->lpVtbl->
GetData(pdo,
981 if (SelectionList !=
NULL)
983 if (SelectionList->
cItems == 1)
993 nlen *
sizeof(
WCHAR));
1013 pDsObjectPicker->lpVtbl->
Release(pDsObjectPicker);
1051 IDsObjectPicker *ObjectPicker;
1267 if (keyPath == 0 || *keyPath == 0)
1301 WCHAR szFavorite[512];
1305 memset(&mii, 0,
sizeof(mii));
1306 mii.
cbSize =
sizeof(mii);
#define ID_REGISTRY_IMPORTREGISTRYFILE
#define ListView_GetNextItem(hwnd, i, flags)
#define DSOP_SCOPE_TYPE_GLOBAL_CATALOG
#define WM_SYSCOLORCHANGE
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
void SetupStatusBar(HWND hWnd, BOOL bResize)
static void resize_frame_rect(HWND hWnd, PRECT prect)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
#define ID_TREE_COLLAPSEBRANCH
WCHAR FileTitleBuffer[_MAX_PATH]
BOOL WINAPI LookupPrivilegeValueW(LPCWSTR lpSystemName, LPCWSTR lpPrivilegeName, PLUID lpLuid)
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode,...)
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define ID_REGISTRY_LOADHIVE
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL ExportRegistryFile(HWND hWnd)
#define CDERR_LOADRESFAILURE
#define ID_EDIT_COPYKEYNAME
static void OnExitMenuLoop(HWND hWnd)
void ShowAboutBox(HWND hWnd)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
struct _DS_SELECTION_LIST * PDS_SELECTION_LIST
_Check_return_ _CRTIMP FILE *__cdecl _wfopen(_In_z_ const wchar_t *_Filename, _In_z_ const wchar_t *_Mode)
#define ID_EDIT_NEW_EXPANDABLESTRINGVALUE
static void resize_frame_client(HWND hWnd)
#define UNREFERENCED_PARAMETER(P)
UINT WINAPI RegisterClipboardFormatW(_In_ LPCWSTR)
static struct netconfig_info ni
#define TreeView_EditLabel(hwnd, hitem)
#define HKEY_CURRENT_USER
static WCHAR s_szFavoritesRegKey[]
#define CDERR_NOHINSTANCE
#define IDS_QUERY_IMPORT_HIVE_MSG
static void OnMenuSelect(HWND hWnd, UINT nItemID, UINT nFlags, HMENU hSysMenu)
#define IDS_QUERY_IMPORT_HIVE_CAPTION
BOOL WINAPI MessageBeep(_In_ UINT uType)
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
DWORD WINAPI GetLastError(VOID)
WCHAR * GetValueName(HWND hwndLV, int iStartAt)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
int InfoMessageBox(HWND hWnd, UINT uType, LPCWSTR lpTitle, LPCWSTR lpMessage,...)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
PCWSTR * apwzAttributeNames
#define FNERR_SUBCLASSFAILURE
#define IDS_QUERY_DELETE_MORE
static HRESULT InitializeRemoteRegistryPicker(OUT IDsObjectPicker **pDsObjectPicker)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define ID_HELP_HELPTOPICS
LONG WINAPI RegFlushKey(HKEY hKey)
static void ChooseFavorite(LPCWSTR pszFavorite)
HWND WINAPI GetNextDlgTabItem(_In_ HWND, _In_opt_ HWND, _In_ BOOL)
BOOL WINAPI DestroyWindow(_In_ HWND)
#define IDC_EXPORT_BRANCH
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HANDLE WINAPI SetClipboardData(_In_ UINT, _In_opt_ HANDLE)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static BOOL LoadHive(HWND hWnd)
#define ID_EDIT_NEW_BINARYVALUE
#define CDERR_FINDRESFAILURE
#define SE_PRIVILEGE_ENABLED
#define CFSTR_DSOP_DS_SELECTION_LIST
static VOID FreeObjectPicker(IN IDsObjectPicker *pDsObjectPicker)
#define PD_USEDEVMODECOPIESANDCOLLATE
#define ID_VIEW_STATUSBAR
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ListView_GetSelectedCount(hwndLV)
void UpdateStatusBar(void)
static BOOL UnloadHive(HWND hWnd)
#define ID_TREE_SUGGESTION_MIN
#define IDS_IMPORT_REG_FILE
#define IDC_EXPORT_BRANCH_TEXT
#define IDS_EXPORT_REG_FILE
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
#define OFN_ENABLETEMPLATE
BOOL CopyKeyName(HWND hWnd, HKEY hRootKey, LPCWSTR keyName)
static UINT_PTR CALLBACK ExportRegistryFile_OFNHookProc(HWND hdlg, UINT uiMsg, WPARAM wParam, LPARAM lParam)
static BOOL EnablePrivilege(LPCWSTR lpszPrivilegeName, LPCWSTR lpszSystemName, BOOL bEnablePrivilege)
#define ID_REGISTRY_CONNECTNETWORKREGISTRY
#define ID_EDIT_PERMISSIONS
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
struct _DSOP_SCOPE_INIT_INFO DSOP_SCOPE_INIT_INFO
#define CDERR_LOADSTRFAILURE
static HRESULT InvokeRemoteRegistryPickerDialog(IN IDsObjectPicker *pDsObjectPicker, IN HWND hwndParent OPTIONAL, OUT LPWSTR lpBuffer, IN UINT uSize)
#define IDS_QUERY_DELETE_ONE
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
OPENFILENAMEA OPENFILENAME
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
SHORT WINAPI GetKeyState(_In_ int)
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
#define CDERR_LOCKRESFAILURE
#define IDS_ERR_DELVAL_CAPTION
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
void FindNextMessageBox(HWND hWnd)
#define ID_TREE_SUGGESTION_MAX
BOOL WINAPI EmptyClipboard(void)
LONG WINAPI RegSaveKeyW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes)
static INT_PTR CALLBACK LoadHive_KeyNameInHookProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define TreeView_GetSelection(hwnd)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
static BOOL ImportRegistryFile(HWND hWnd)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static void OnEnterMenuLoop(HWND hWnd)
#define ID_REGISTRY_UNLOADHIVE
LONG WINAPI RegUnLoadKeyW(HKEY hKey, LPCWSTR lpSubKey)
#define CDERR_INITIALIZATION
BOOL export_registry_key(WCHAR *file_name, WCHAR *path, DWORD format)
#define ID_TREE_PERMISSIONS
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
BOOL import_registry_file(FILE *reg_file)
unsigned __int3264 UINT_PTR
#define IDS_FLT_REGEDIT4_FLT
static BOOL _CmdWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
TCHAR szTitle[MAX_LOADSTRING]
BOOL WINAPI CloseClipboard(void)
#define ID_REGISTRY_DISCONNECTNETWORKREGISTRY
static BOOL CheckCommDlgError(HWND hWnd)
PDSOP_SCOPE_INIT_INFO aDsScopeInfos
static void OnInitMenu(HWND hWnd)
#define MB_ICONINFORMATION
static __inline VOID DeleteNode(NODE *node)
#define DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)
BOOL RefreshListView(HWND hwndLV, HKEY hKey, LPCWSTR keyPath)
#define ID_REGISTRY_OPENLOCAL
#define FAVORITES_MENU_POSITION
WCHAR szChildClass[MAX_LOADSTRING]
#define ID_REGISTRY_EXPORTREGISTRYFILE
#define memcpy(s1, s2, n)
#define CDERR_MEMLOCKFAILURE
#define GetCurrentProcess()
DS_SELECTION aDsSelection[ANYSIZE_ARRAY]
void FindDialog(HWND hWnd)
_Check_return_opt_ _CRTIMP int __cdecl fclose(_Inout_ FILE *_File)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
void BuildFilterStrings(WCHAR *Filter, PFILTERPAIR Pairs, int PairCount)
#define DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE
#define IDS_FLT_ALLFILES_FLT
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define IDS_FLT_HIVFILES_FLT
#define ID_EDIT_NEW_DWORDVALUE
BOOL WINAPI AdjustTokenPrivileges(HANDLE TokenHandle, BOOL DisableAllPrivileges, PTOKEN_PRIVILEGES NewState, DWORD BufferLength, PTOKEN_PRIVILEGES PreviousState, PDWORD ReturnLength)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
#define REG_FORCE_RESTORE
#define MAX_COMPUTERNAME_LENGTH
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define ID_EDIT_NEW_STRINGVALUE
#define DSOP_SCOPE_TYPE_WORKGROUP
BOOL PrintRegistryHive(HWND hWnd, LPWSTR path)
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
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
BOOL WINAPI DeleteDC(_In_ HDC)
LRESULT CALLBACK FrameWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define ID_REGISTRY_PRINT
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
#define FNERR_BUFFERTOOSMALL
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ID_REGISTRY_PRINTERSETUP
static void toggle_child(HWND hWnd, UINT cmd, HWND hchild)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define OFN_OVERWRITEPROMPT
#define IDS_FLT_REGFILES_FLT
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
#define IDS_ERR_DELETEVALUE
#define ID_TREE_EXPANDBRANCH
#define LOADHIVE_KEYNAMELENGTH
#define DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN
BOOL WINAPI OpenProcessToken(HANDLE ProcessHandle, DWORD DesiredAccess, PHANDLE TokenHandle)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
#define DSOP_FILTER_COMPUTERS
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_NOT_ALL_ASSIGNED
BOOL CreateNewKey(HWND hwndTV, HTREEITEM hItem)
BOOL WINAPI WinHelpW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_ UINT, _In_ ULONG_PTR)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
HWND WINAPI GetFocus(void)
unsigned long long DWORDLONG
WCHAR FileNameBuffer[_MAX_PATH]
#define ListView_FindItem(hwnd, iStart, plvfi)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
#define DSOP_DOWNLEVEL_FILTER_COMPUTERS
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
BOOL WINAPI IsWindowVisible(_In_ HWND)
#define CDERR_MEMALLOCFAILURE
struct FILTERPAIR * PFILTERPAIR
BOOL RegKeyEditPermissions(HWND hWndOwner, HKEY hKey, LPCWSTR lpMachine, LPCWSTR lpKeyName)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI OpenClipboard(_In_opt_ HWND)
#define MAKEINTRESOURCEW(i)
#define ERROR_ALREADY_EXISTS
#define CDERR_DIALOGFAILURE
#define TreeView_Expand(hwnd, hitem, code)
BOOL RefreshTreeView(HWND hWndTV)
DWORD WINAPI CommDlgExtendedError(void)
static BOOL InitOpenFileName(HWND hWnd, OPENFILENAME *pofn)
#define ID_EDIT_MODIFY_BIN
HMENU WINAPI GetMenu(_In_ HWND)
#define TOKEN_ADJUST_PRIVILEGES
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
static BOOL CreateNewValue(HKEY hRootKey, LPCWSTR pszKeyPath, DWORD dwType)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define RegCloseKey(hKey)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define ID_EDIT_NEW_MULTISTRINGVALUE
#define ListView_EditLabel(hwndLV, i)
#define IDS_QUERY_DELETE_CONFIRM
LONG WINAPI RegLoadKeyW(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpFile)
#define FNERR_INVALIDFILENAME
#define DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE
PULONG MinorVersion OPTIONAL
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)