21 #define RSF_WHOLESTRING 0x00000001 22 #define RSF_LOOKATKEYS 0x00000002 23 #define RSF_LOOKATVALUES 0x00000004 24 #define RSF_LOOKATDATA 0x00000008 25 #define RSF_MATCHCASE 0x00010000 63 for(
i = 0;
i <= cch1 - cch2;
i++)
66 psz1 +
i, cch2, psz2, cch2) == 2)
77 return wcscmp(pszName1, pszName2) == 0;
79 return _wcsicmp(pszName1, pszName2) == 0;
103 psz1, cch1, psz2, cch2);
109 for(
i = 0;
i <= cch1 - cch2;
i++)
114 psz1 +
i, cch2, psz2, cch2))
140 LPWSTR *ppszFoundValueName)
156 wcscpy(szSubKey, pszSubKey);
168 if (ppszNames ==
NULL)
172 for(
i = 0;
i <
c;
i++)
195 if (pszValueName ==
NULL)
196 pszValueName = ppszNames[0];
198 for(
i = 0;
i <
c;
i++)
203 if (!fPast &&
_wcsicmp(ppszNames[
i], pszValueName) == 0)
214 *ppszFoundSubKey =
_wcsdup(szSubKey);
215 if (ppszNames[
i][0] == 0)
216 *ppszFoundValueName =
NULL;
218 *ppszFoundValueName =
_wcsdup(ppszNames[
i]);
237 *ppszFoundSubKey =
_wcsdup(szSubKey);
238 if (ppszNames[
i][0] == 0)
239 *ppszFoundValueName =
NULL;
241 *ppszFoundValueName =
_wcsdup(ppszNames[
i]);
248 if (ppszNames !=
NULL)
250 for(
i = 0;
i <
c;
i++)
261 if (ppszNames ==
NULL)
265 for(
i = 0;
i <
c;
i++)
288 for(
i = 0;
i <
c;
i++)
296 *ppszFoundSubKey =
malloc(
299 if (*ppszFoundSubKey ==
NULL)
303 wcscpy(*ppszFoundSubKey, szSubKey);
307 **ppszFoundSubKey = 0;
308 wcscat(*ppszFoundSubKey, ppszNames[
i]);
309 *ppszFoundValueName =
NULL;
316 LPWSTR psz = *ppszFoundSubKey;
317 *ppszFoundSubKey =
malloc(
319 if (*ppszFoundSubKey ==
NULL)
323 wcscpy(*ppszFoundSubKey, szSubKey);
327 **ppszFoundSubKey = 0;
328 wcscat(*ppszFoundSubKey, psz);
335 if (ppszNames !=
NULL)
337 for(
i = 0;
i <
c;
i++)
346 if (ppszNames !=
NULL)
348 for(
i = 0;
i <
c;
i++)
361 LPWSTR *ppszFoundValueName)
365 HKEY hBaseKey, hSubKey;
377 if (
RegFindRecurse(hBaseKey, pszSubKey, pszValueName, ppszFoundSubKey,
381 wcscpy(szSubKey, pszSubKey);
382 while(szSubKey[0] != 0)
390 wcscpy(szKeyName, szSubKey);
410 if (ppszNames ==
NULL)
414 for(
i = 0;
i <
c;
i++)
435 for(
i = 0;
i <
c;
i++)
440 if (!fPast &&
_wcsicmp(ppszNames[
i], szKeyName) == 0)
451 *ppszFoundSubKey =
malloc(
454 if (*ppszFoundSubKey ==
NULL)
458 wcscpy(*ppszFoundSubKey, szSubKey);
462 **ppszFoundSubKey = 0;
463 wcscat(*ppszFoundSubKey, ppszNames[
i]);
464 *ppszFoundValueName =
NULL;
469 ppszFoundSubKey, ppszFoundValueName))
471 LPWSTR psz = *ppszFoundSubKey;
472 *ppszFoundSubKey =
malloc(
475 if (*ppszFoundSubKey ==
NULL)
479 wcscpy(*ppszFoundSubKey, szSubKey);
483 **ppszFoundSubKey = 0;
484 wcscat(*ppszFoundSubKey, psz);
489 if (ppszNames !=
NULL)
491 for(
i = 0;
i <
c;
i++)
497 if (hBaseKey != hSubKey)
534 if (ppszNames !=
NULL)
536 for(
i = 0;
i <
c;
i++)
540 if (hBaseKey != hSubKey)
545 if (ppszNames !=
NULL)
547 for(
i = 0;
i <
c;
i++)
551 if (hBaseKey != hSubKey)
560 DWORD dwType, dwValue, cbData;
566 cbData =
sizeof(dwValue);
570 dwFlags = (
dwFlags & ~0x0000FFFF) | ((dwValue & 0x0000FFFF) << 0);
574 cbData =
sizeof(dwValue);
578 dwFlags = (
dwFlags & ~0xFFFF0000) | ((dwValue & 0x0000FFFF) << 16);
637 WCHAR szFullKey[512];
639 LPWSTR pszFoundSubKey, pszFoundValueName;
650 if (pszKeyPath ==
NULL)
673 fSuccess =
RegFindWalk(&hKeyRoot, pszKeyPath, pszValueName,
674 &pszFoundSubKey, &pszFoundValueName);
691 free(pszFoundSubKey);
693 if (pszFoundValueName !=
NULL)
696 free(pszFoundValueName);
713 static WCHAR s_szSavedFindValue[256];
807 if (s_szSavedFindValue[0])
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static WCHAR s_szFindWhat[256]
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
#define ERROR_NO_MORE_ITEMS
#define UNREFERENCED_PARAMETER(P)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define HKEY_CURRENT_USER
static HWND s_hwndAbortDialog
TW_UINT32 TW_UINT16 TW_UINT16 MSG
static const WCHAR s_szFindFlagsR[]
BOOL WINAPI UpdateWindow(_In_ HWND)
static HANDLE ULONG_PTR dwData
GLint GLint GLint GLint GLint x
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define HKEY_CURRENT_CONFIG
BOOL WINAPI DestroyWindow(_In_ HWND)
static BOOL CompareData(DWORD dwType, LPCWSTR psz1, LPCWSTR psz2)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
BOOL RegFindRecurse(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValueName, LPWSTR *ppszFoundSubKey, LPWSTR *ppszFoundValueName)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
static const WCHAR s_empty[]
VOID SetValueName(HWND hwndLV, LPCWSTR pszValueName)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
const TCHAR g_szGeneralRegKey[]
LPCWSTR GetValueName(HWND hwndLV, int iStartAt)
static DWORD GetFindFlags(void)
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)
static LPWSTR lstrstri(LPCWSTR psz1, LPCWSTR psz2)
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
#define IDC_LOOKAT_VALUES
#define REG_OPTION_NON_VOLATILE
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
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)
GLboolean GLboolean GLboolean b
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static const WCHAR s_szFindFlags[]
#define LOCALE_SYSTEM_DEFAULT
static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define success(from, fromstr, to, tostr)
static BOOL CompareName(LPCWSTR pszName1, LPCWSTR pszName2)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
#define MB_ICONINFORMATION
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
static void SetFindFlags(DWORD dwFlags)
#define CreateDialogW(h, n, w, f)
void FindDialog(HWND hWnd)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
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)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static WCHAR s_szName[MAX_PATH]
BOOL RegFindWalk(HKEY *phKey, LPCWSTR pszSubKey, LPCWSTR pszValueName, LPWSTR *ppszFoundSubKey, LPWSTR *ppszFoundValueName)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
static const WCHAR s_backslash[]
GLint GLint GLint GLint GLint GLint y
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
static HMODULE MODULEINFO DWORD cb
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
#define HKEY_CLASSES_ROOT
#define MAKEINTRESOURCEW(i)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
GLuint GLuint GLsizei GLenum type
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
GLboolean GLboolean GLboolean GLboolean a
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
int compare(const void *x, const void *y)
BOOL WINAPI IsDialogMessageW(_In_ HWND, _In_ LPMSG)
#define RegCloseKey(hKey)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
static INT_PTR CALLBACK AbortFindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define HKEY_LOCAL_MACHINE
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)