38 return L"UNKNOWN HKEY, PLEASE REPORT";
45 const int nButtonWidth = 44;
46 const int nButtonHeight = 22;
61 rt.
right - rt.
left - nButtonWidth, nButtonHeight,
66 nButtonWidth, nButtonHeight,
71 rt.
top + nButtonHeight + cyEdge,
78 rt.
top + nButtonHeight + cyEdge,
98 const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
137 #define MIN(a,b) ((a < b) ? (a) : (b)) 140 size_t iSuggestionsLength)
143 WCHAR szLastFound[256];
145 HKEY hOtherKey, hSubKey;
148 memset(pszSuggestions, 0, iSuggestionsLength *
sizeof(*pszSuggestions));
149 iSuggestionsLength--;
164 if ((szBuffer[0] !=
L'\0') &&
_wcsicmp(szBuffer, pszKeyPath))
168 lstrcpynW(pszSuggestions,
L"HKCR\\", (
int) iSuggestionsLength);
171 iSuggestionsLength -=
i;
173 lstrcpynW(pszSuggestions, szBuffer, (
int) iSuggestionsLength);
174 i =
MIN(
wcslen(pszSuggestions) + 1, iSuggestionsLength);
176 iSuggestionsLength -=
i;
180 wcscpy(szLastFound, szBuffer);
181 pszKeyPath = szLastFound;
186 while(bFound && (iSuggestionsLength > 0));
194 lstrcpynW(pszSuggestions,
L"HKCR\\CLSID\\", (
int)iSuggestionsLength);
197 iSuggestionsLength -=
i;
199 lstrcpynW(pszSuggestions, szBuffer, (
int)iSuggestionsLength);
200 i =
MIN(
wcslen(pszSuggestions) + 1, iSuggestionsLength);
202 iSuggestionsLength -=
i;
213 static WCHAR s_szNode[256];
261 if (keyPath[0] !=
L'\0')
262 swprintf(fullPath,
L"%s%s%s", rootName, keyPath[0]==
L'\\'?
L"":
L"\\", keyPath);
264 fullPath =
wcscpy(fullPath, rootName);
274 if (
_wcsicmp(rootName,
L"HKEY_LOCAL_MACHINE") != 0 ||
284 else if (!
wcschr(keyPath,
L'\\'))
441 const DWORD Pattern[4] = {0x5555AAAA, 0x5555AAAA, 0x5555AAAA, 0x5555AAAA};
519 if (
pt.x == -1 &&
pt.y == -1)
570 if (
pt.x == -1 &&
pt.y == -1)
607 memset(&mii, 0,
sizeof(mii));
618 memset(&mii, 0,
sizeof(mii));
648 memset(&mii, 0,
sizeof(mii));
HGDIOBJ WINAPI GetStockObject(_In_ int)
#define IDS_GOTO_SUGGESTED_KEY
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
#define ListView_GetNextItem(hwnd, i, flags)
HDWP WINAPI BeginDeferWindowPos(_In_ int)
void DestroyListView(HWND hwndLV)
#define ID_TREE_COLLAPSEBRANCH
#define TreeView_GetItemRect(hwnd, hitem, prc, code)
static void SuggestKeys(HKEY hRootKey, LPCWSTR pszKeyPath, LPWSTR pszSuggestions, size_t iSuggestionsLength)
#define ID_REGISTRY_LOADHIVE
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
LRESULT CALLBACK AddressBarProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void finish_splitbar(HWND hWnd, int x)
BOOL TreeWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)
#define HKEY_CURRENT_USER
#define WM_CAPTURECHANGED
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
GLint GLint GLint GLint GLint x
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
#define HKEY_CURRENT_CONFIG
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PatBlt(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ DWORD)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ListView_GetSelectedCount(hwndLV)
#define ID_TREE_SUGGESTION_MIN
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
BOOL IsDefaultValue(HWND hwndLV, int i)
BOOL WINAPI EndDeferWindowPos(_In_ HDWP)
HWND WINAPI GetCapture(void)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
int WINAPI GetMenuItemCount(_In_opt_ HMENU)
_Out_opt_ int _Out_opt_ int * cy
static void draw_splitbar(HWND hWnd, int x)
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
_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
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
HBRUSH WINAPI CreatePatternBrush(_In_ HBITMAP)
BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result)
#define ID_TREE_SUGGESTION_MAX
static VOID DestroyTreeView(HWND hTreeView)
#define TreeView_GetSelection(hwnd)
HDWP WINAPI DeferWindowPos(_In_ HDWP, _In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_CONST_RETURN wchar_t *__cdecl wcschr(_In_z_ const wchar_t *_Str, wchar_t _Ch)
#define TreeView_HitTest(hwnd, lpht)
#define ID_REGISTRY_UNLOADHIVE
int WINAPI GetSystemMetrics(_In_ int)
HCURSOR WINAPI LoadCursorW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, HMENU id)
void ResizeWnd(int cx, int cy)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
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 TreeView_GetParent(hwnd, hitem)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
LPCWSTR get_root_key_name(HKEY hRootKey)
int _cdecl swprintf(const WCHAR *,...)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LONG QueryStringValue(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpValueName, LPTSTR pszBuffer, DWORD dwBufferLen)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
HWND WINAPI SetCapture(_In_ HWND hWnd)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
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
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
#define TreeView_SelectItem(hwnd, hitem)
BOOL WINAPI RemoveMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define ID_TREE_EXPANDBRANCH
BOOL CreateListView(PMAIN_WND_INFO Info)
BOOL WINAPI SetMenuDefaultItem(_In_ HMENU, _In_ UINT, _In_ UINT)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
BOOL WINAPI ReleaseCapture(void)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define HKEY_CLASSES_ROOT
#define MAKEINTRESOURCEW(i)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
#define ID_EDIT_MODIFY_BIN
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define HeapFree(x, y, z)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define RegCloseKey(hKey)
#define TreeView_GetItem(hwnd, pitem)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define ListView_DeleteAllItems(hwnd)
#define HKEY_LOCAL_MACHINE
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
VOID UpdateAddress(HTREEITEM hItem, HKEY hRootKey, LPCWSTR pszPath)