9#define RSF_WHOLESTRING 0x00000001
10#define RSF_LOOKATKEYS 0x00000002
11#define RSF_LOOKATVALUES 0x00000004
12#define RSF_LOOKATDATA 0x00000008
13#define RSF_MATCHCASE 0x00010000
51 for(
i = 0;
i <= cch1 - cch2;
i++)
54 psz1 +
i, cch2, psz2, cch2) == 2)
65 return wcscmp(pszName1, pszName2) == 0;
67 return _wcsicmp(pszName1, pszName2) == 0;
90 for (
i = 0;
i <= cch1 - cch2;
i++)
119 LPWSTR *ppszFoundValueName)
147 if (ppszNames ==
NULL)
152 for(
i = 0;
i <
c;
i++)
176 fPast = (pszValueName ==
NULL);
179 for (
i = 0;
i <
c;
i++)
184 if (!fPast &&
_wcsicmp(ppszNames[
i], pszValueName) == 0)
195 *ppszFoundSubKey =
_wcsdup(szSubKey);
196 *ppszFoundValueName =
_wcsdup(ppszNames[
i]);
214 *ppszFoundSubKey =
_wcsdup(szSubKey);
215 *ppszFoundValueName =
_wcsdup(ppszNames[
i]);
222 if (ppszNames !=
NULL)
224 for(
i = 0;
i <
c;
i++)
236 if (ppszNames ==
NULL)
241 for(
i = 0;
i <
c;
i++)
265 for(
i = 0;
i <
c;
i++)
273 *ppszFoundSubKey =
malloc(
276 if (*ppszFoundSubKey ==
NULL)
280 wcscpy(*ppszFoundSubKey, szSubKey);
284 **ppszFoundSubKey = 0;
285 wcscat(*ppszFoundSubKey, ppszNames[
i]);
286 *ppszFoundValueName =
NULL;
294 LPWSTR psz = *ppszFoundSubKey;
296 *ppszFoundSubKey =
malloc(cbFoundSubKey);
297 if (*ppszFoundSubKey ==
NULL)
305 **ppszFoundSubKey = 0;
306 wcscat(*ppszFoundSubKey, psz);
313 if (ppszNames !=
NULL)
315 for(
i = 0;
i <
c;
i++)
324 if (ppszNames !=
NULL)
326 for(
i = 0;
i <
c;
i++)
339 LPWSTR *ppszFoundValueName)
343 HKEY hBaseKey, hSubKey;
347 BOOL fPast, fKeyMatched;
355 if (
RegFindRecurse(hBaseKey, pszSubKey, pszValueName, ppszFoundSubKey,
360 while(szSubKey[0] != 0)
368 wcscpy(szKeyName, szSubKey);
388 if (ppszNames ==
NULL)
392 for(
i = 0;
i <
c;
i++)
413 for(
i = 0;
i <
c;
i++)
418 if (!fPast &&
_wcsicmp(ppszNames[
i], szKeyName) == 0)
429 *ppszFoundSubKey =
malloc(
432 if (*ppszFoundSubKey ==
NULL)
436 wcscpy(*ppszFoundSubKey, szSubKey);
440 **ppszFoundSubKey = 0;
441 wcscat(*ppszFoundSubKey, ppszNames[
i]);
442 *ppszFoundValueName =
NULL;
446 fKeyMatched = (
_wcsicmp(ppszNames[
i], szKeyName) == 0);
448 ppszFoundSubKey, ppszFoundValueName))
450 LPWSTR psz = *ppszFoundSubKey;
452 *ppszFoundSubKey =
malloc(cbFoundSubKey);
453 if (*ppszFoundSubKey ==
NULL)
461 **ppszFoundSubKey = 0;
462 wcscat(*ppszFoundSubKey, psz);
467 if (ppszNames !=
NULL)
469 for(
i = 0;
i <
c;
i++)
475 if (hBaseKey != hSubKey)
512 if (ppszNames !=
NULL)
514 for(
i = 0;
i <
c;
i++)
518 if (hBaseKey != hSubKey)
523 if (ppszNames !=
NULL)
525 for(
i = 0;
i <
c;
i++)
529 if (hBaseKey != hSubKey)
537 DWORD dwType, dwValue, cbData;
543 cbData =
sizeof(dwValue);
547 dwFlags = (
dwFlags & ~0x0000FFFF) | ((dwValue & 0x0000FFFF) << 0);
551 cbData =
sizeof(dwValue);
555 dwFlags = (
dwFlags & ~0xFFFF0000) | ((dwValue & 0x0000FFFF) << 16);
614 WCHAR szFullKey[512];
616 LPWSTR pszFoundSubKey, pszFoundValueName;
627 if (pszKeyPath ==
NULL)
650 fSuccess =
RegFindWalk(&hKeyRoot, pszKeyPath, pszValueName,
651 &pszFoundSubKey, &pszFoundValueName);
668 free(pszFoundSubKey);
670 if (pszFoundValueName !=
NULL)
673 free(pszFoundValueName);
690 static WCHAR s_szSavedFindValue[256];
784 if (s_szSavedFindValue[0])
785 lStyle &= ~WS_DISABLED;
const TCHAR g_szGeneralRegKey[]
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)
BOOL RegFindRecurse(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValueName, LPWSTR *ppszFoundSubKey, LPWSTR *ppszFoundValueName)
static WCHAR s_szName[MAX_PATH]
static BOOL CompareName(LPCWSTR pszName1, LPCWSTR pszName2)
void FindNextMessageBox(HWND hWnd)
VOID SetValueName(HWND hwndLV, LPCWSTR pszValueName)
BOOL RegFindWalk(HKEY *phKey, LPCWSTR pszSubKey, LPCWSTR pszValueName, LPWSTR *ppszFoundSubKey, LPWSTR *ppszFoundValueName)
static INT_PTR CALLBACK FindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static void SetFindFlags(DWORD dwFlags)
static HWND s_hwndAbortDialog
static const WCHAR s_szFindFlagsR[]
static const WCHAR s_empty[]
static INT_PTR CALLBACK AbortFindDialogProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL MatchString(LPCWCH pch1, INT cch1, LPCWCH pch2, INT cch2)
void FindDialog(HWND hWnd)
static LPWSTR lstrstri(LPCWSTR psz1, LPCWSTR psz2)
static DWORD GetFindFlags(void)
static WCHAR s_szFindWhat[256]
static const WCHAR s_szFindFlags[]
static const WCHAR s_backslash[]
WCHAR * GetValueName(HWND hwndLV, int iStartAt)
BOOL SelectNode(HWND hwndTV, LPCWSTR keyPath)
LPCWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY *phRootKey)
#define IDC_LOOKAT_VALUES
#define RegCloseKey(hKey)
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)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
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)
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
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)
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)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define ERROR_NO_MORE_ITEMS
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
static HANDLE ULONG_PTR dwData
static HMODULE MODULEINFO DWORD cb
#define REG_OPTION_NON_VOLATILE
#define LOCALE_SYSTEM_DEFAULT
#define UNREFERENCED_PARAMETER(P)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP wchar_t *__cdecl _wcsdup(_In_z_ const wchar_t *_Str)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
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 *))
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
#define success(from, fromstr, to, tostr)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_CONFIG
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI IsDialogMessageW(_In_ HWND, _In_ LPMSG)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI UpdateWindow(_In_ HWND)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
#define CreateDialogW(h, n, w, f)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define MB_ICONINFORMATION
#define MAKEINTRESOURCEW(i)
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
INT_PTR WINAPI DialogBoxParamW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
_IRQL_requires_same_ _In_ PVOID _In_ PVOID MatchData