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 pb[
cb] = pb[
cb + 1] = pb[
cb + 2] = 0;
242 *ppszFoundSubKey =
_wcsdup(szSubKey);
243 if (ppszNames[
i][0] == 0)
244 *ppszFoundValueName =
NULL;
246 *ppszFoundValueName =
_wcsdup(ppszNames[
i]);
253 if (ppszNames !=
NULL)
255 for(
i = 0;
i <
c;
i++)
266 if (ppszNames ==
NULL)
270 for(
i = 0;
i <
c;
i++)
293 for(
i = 0;
i <
c;
i++)
301 *ppszFoundSubKey =
malloc(
304 if (*ppszFoundSubKey ==
NULL)
308 wcscpy(*ppszFoundSubKey, szSubKey);
312 **ppszFoundSubKey = 0;
313 wcscat(*ppszFoundSubKey, ppszNames[
i]);
314 *ppszFoundValueName =
NULL;
321 LPWSTR psz = *ppszFoundSubKey;
322 *ppszFoundSubKey =
malloc(
324 if (*ppszFoundSubKey ==
NULL)
328 wcscpy(*ppszFoundSubKey, szSubKey);
332 **ppszFoundSubKey = 0;
333 wcscat(*ppszFoundSubKey, psz);
340 if (ppszNames !=
NULL)
342 for(
i = 0;
i <
c;
i++)
351 if (ppszNames !=
NULL)
353 for(
i = 0;
i <
c;
i++)
366 LPWSTR *ppszFoundValueName)
370 HKEY hBaseKey, hSubKey;
382 if (
RegFindRecurse(hBaseKey, pszSubKey, pszValueName, ppszFoundSubKey,
386 wcscpy(szSubKey, pszSubKey);
387 while(szSubKey[0] != 0)
395 wcscpy(szKeyName, szSubKey);
415 if (ppszNames ==
NULL)
419 for(
i = 0;
i <
c;
i++)
440 for(
i = 0;
i <
c;
i++)
445 if (!fPast &&
_wcsicmp(ppszNames[
i], szKeyName) == 0)
456 *ppszFoundSubKey =
malloc(
459 if (*ppszFoundSubKey ==
NULL)
463 wcscpy(*ppszFoundSubKey, szSubKey);
467 **ppszFoundSubKey = 0;
468 wcscat(*ppszFoundSubKey, ppszNames[
i]);
469 *ppszFoundValueName =
NULL;
474 ppszFoundSubKey, ppszFoundValueName))
476 LPWSTR psz = *ppszFoundSubKey;
477 *ppszFoundSubKey =
malloc(
480 if (*ppszFoundSubKey ==
NULL)
484 wcscpy(*ppszFoundSubKey, szSubKey);
488 **ppszFoundSubKey = 0;
489 wcscat(*ppszFoundSubKey, psz);
494 if (ppszNames !=
NULL)
496 for(
i = 0;
i <
c;
i++)
502 if (hBaseKey != hSubKey)
539 if (ppszNames !=
NULL)
541 for(
i = 0;
i <
c;
i++)
545 if (hBaseKey != hSubKey)
550 if (ppszNames !=
NULL)
552 for(
i = 0;
i <
c;
i++)
556 if (hBaseKey != hSubKey)
565 DWORD dwType, dwValue, cbData;
571 cbData =
sizeof(dwValue);
575 dwFlags = (
dwFlags & ~0x0000FFFF) | ((dwValue & 0x0000FFFF) << 0);
579 cbData =
sizeof(dwValue);
583 dwFlags = (
dwFlags & ~0xFFFF0000) | ((dwValue & 0x0000FFFF) << 16);
642 WCHAR szFullKey[512];
644 LPWSTR pszFoundSubKey, pszFoundValueName;
655 if (pszKeyPath ==
NULL)
678 fSuccess =
RegFindWalk(&hKeyRoot, pszKeyPath, pszValueName,
679 &pszFoundSubKey, &pszFoundValueName);
696 free(pszFoundSubKey);
698 if (pszFoundValueName !=
NULL)
701 free(pszFoundValueName);
718 static WCHAR s_szSavedFindValue[256];
812 if (s_szSavedFindValue[0])
813 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 BOOL CompareData(DWORD dwType, LPCWSTR psz1, LPCWSTR psz2)
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)
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
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)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
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 *))
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)