65 lok(
type == exp_type,
"got registry type %d, expected %d\n",
type, exp_type);
67 lok(
size == exp_size,
"got data size %d, expected %d\n",
size, exp_size);
161 char *subkey_name =
NULL;
162 DWORD max_subkey_len, subkey_len;
163 static const char empty[1];
184 subkey_len = max_subkey_len;
198 lok(!
ret,
"Failed to delete registry key, got error %d\n",
ret);
247 "got exit code %d, expected 1\n",
r);
311 "got exit code %u, expected 1\n",
r);
314 "got exit code %d, expected 2\n",
err);
332 run_reg_exe(
"reg add HKCU\\ /v Value1 /t REG_SZ /d foo /f", &
r);
336 run_reg_exe(
"reg add HKEY_CURRENT_USER\\ /v Value2 /t REG_SZ /d bar /f", &
r);
461 "got exit code %d, expected 0\n",
r);
465 win_skip(
"broken reg.exe detected\n");
543 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v expand0 /t REG_EXpand_sz /d \"dead%PATH%beef\" /f", &
r);
547 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v expand1 /t REG_EXpand_sz /d \"dead^%PATH^%beef\" /f", &
r);
641 "got exit code %d, expected 0\n",
r);
646 win_skip(
"broken reg.exe detected\n");
656 "got exit code %d, expected 1\n",
r);
674 size =
sizeof(dword);
679 ok(dword == 123 ||
broken(dword == 0123 ),
"got wrong data %d, expected 123\n", dword);
784 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v multi0 /t REG_MULTI_SZ /d \"three\\0little\\0strings\" /f", &
r);
788 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi1 /s \"#\" /d \"three#little#strings\" /f", &
r);
800 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi4 /s \"#\" /d \"threelittlestrings\" /f", &
r);
804 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi5 /s \"#randomgibberish\" /d \"three#little#strings\" /f", &
r);
807 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi6 /s \"\\0\" /d \"three\\0little\\0strings\" /f", &
r);
810 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi7 /s \"\" /d \"three#little#strings\" /f", &
r);
816 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi9 /s \"#\" /d \"two##strings\" /f", &
r);
839 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /t REG_MULTI_SZ /v multi16 /d \"two\\0\\0strings\" /f", &
r);
850 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v multi19 /t REG_MULTI_SZ /s \"#\" /d \"two\\0#strings\" /f", &
r);
854 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v multi20 /t REG_MULTI_SZ /s \"#\" /d \"two#\\0strings\" /f", &
r);
858 run_reg_exe(
"reg add HKCU\\" KEY_BASE " /v multi21 /t REG_MULTI_SZ /s \"#\" /d \"two\\0\\0strings\" /f", &
r);
867static void test_registry_view_win32(
void)
874 is_win32 = !
is_wow64 && (
sizeof(
void *) ==
sizeof(
int));
876 if (!is_win32)
return;
907static void test_registry_view_win64(
void)
941static void test_registry_view_wow64(
void)
980 win_skip(
"reg.exe not available, skipping 'add' tests\n");
998 win_skip(
"reg.exe is not running with elevated privileges; "
999 "skipping registry view tests\n");
1004 test_registry_view_win32();
1005 test_registry_view_win64();
1006 test_registry_view_wow64();
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
LONG WINAPI RegSetValueExA(HKEY hKey, LPCSTR lpValueName, DWORD Reserved, DWORD dwType, CONST BYTE *lpData, DWORD cbData)
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegDeleteKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ REGSAM samDesired, _In_ DWORD Reserved)
LONG WINAPI RegQueryInfoKeyA(HKEY hKey, LPSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegCreateKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD Reserved, _In_ LPSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_ LPDWORD lpdwDisposition)
LONG WINAPI RegEnumKeyExA(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
static const WCHAR empty[]
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
static void cleanup(void)
BOOL WINAPI GetExitCodeProcess(IN HANDLE hProcess, IN LPDWORD lpExitCode)
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
static HCRYPTKEY new_key(HCRYPTPROV hProv, ALG_ID aiAlgid, DWORD dwFlags, CRYPTKEY **ppCryptKey)
static const BOOL is_win64
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
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 * u
#define ERROR_FILE_NOT_FOUND
#define todo_wine_if(is_todo)
void delete_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam)
void delete_value_(const char *file, unsigned line, HKEY hkey, const char *name)
static void test_reg_expand_sz(void)
BOOL run_reg_exe_(const char *file, unsigned line, const char *cmd, DWORD *rc)
static void test_reg_binary(void)
static void test_reg_sz(void)
LONG delete_tree_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam)
static void test_reg_dword(void)
void add_value_(const char *file, unsigned line, HKEY hkey, const char *name, DWORD type, const void *data, size_t size)
void open_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam, HKEY *hkey)
static void test_reg_multi_sz(void)
static void test_reg_dword_big_endian(void)
static void test_key_formats(void)
void verify_reg_(const char *file, unsigned line, HKEY hkey, const char *value, DWORD exp_type, const void *exp_data, DWORD exp_size, DWORD todo)
void verify_key_nonexist_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam)
void verify_reg_nonexist_(const char *file, unsigned line, HKEY hkey, const char *value)
static void test_reg_none(void)
static void test_add(void)
void add_key_(const char *file, unsigned line, const HKEY root, const char *path, REGSAM sam, HKEY *hkey)
static void test_command_syntax(void)
void verify_key_(const char *file, unsigned line, HKEY root, const char *path, REGSAM sam)
void close_key_(const char *file, unsigned line, HKEY hkey)
BOOL is_elevated_process(void)
#define REG_DWORD_LITTLE_ENDIAN
#define REG_OPTION_NON_VOLATILE
#define REG_DWORD_BIG_ENDIAN
#define add_value(k, n, t, d, s)
#define add_key(r, p, s, k)
#define verify_reg(k, v, t, d, s, todo)
#define delete_tree(r, p, s)
#define open_key(r, p, s, k)
#define delete_value(k, n)
#define verify_key(r, p, s)
#define verify_key_nonexist(r, p, s)
#define run_reg_exe(c, r)
#define delete_key(r, p, s)
#define verify_reg_nonexist(k, v)
struct ChNotifyTest * exp_data
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
struct _STARTUPINFOA STARTUPINFOA
DWORD WINAPI GetLastError(void)
#define STARTF_USESTDHANDLES
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER