15#if NTDDI_VERSION < NTDDI_WIN10_RS1
16#define ASSOCF_PER_MACHINE_ONLY 0x00008000
61 if (!hNTDLL)
return FALSE;
126#define ok_AqkPath(InitF, AssocKey, pszInit, pszExtra, hrExpected, pszExpectedWin32) do \
128 LPCWSTR pszExpected = L"\\REGISTRY\\MACHINE\\" pszExpectedWin32; \
130 HRESULT hr = GetAqkPath((InitF), (AssocKey), (pszInit), (pszExtra), &pszPath); \
131 ok_hr(hr, (hrExpected)); \
134 ok(pszPath && !_wcsicmp(pszPath, pszExpected), "Got \"%s\", expected \"%s\"\n", \
135 wine_dbgstr_w(pszPath), wine_dbgstr_w(pszExpected)); \
137 LocalFree(pszPath); \
166 HKEY hSource, hClass, hClass2;
189 skip(
"Could not create test key\n");
206 skip(
"Could not create test key\n");
228 skip(
"Could not create test key\n");
235 skip(
"Could not create test key\n");
236 goto skip_progidtests;
255 skip(
"Could not create test key\n");
256 goto skip_progidtests;
263 {
L"calcverb2",
NULL,
NULL, pszExe2,
L"CurVerParam" },
322 L"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\Applications\\regedit.exe"),
389 LPCWSTR pszExpectedLM =
L"\\REGISTRY\\MACHINE\\";
390 LPCWSTR pszExpectedCU =
L"\\REGISTRY\\USER\\";
392 pszExpectedCU = pszExpectedLM;
403 const wchar_t*
exts[] =
405 L".txt",
L".htm",
L".reg",
L".xml",
L".png",
L".jpg",
L".zip"
557 S_OK,
L"SOFTWARE\\Classes\\Applications\\notepad.exe");
561 S_OK,
L"SOFTWARE\\Classes\\Applications\\regedit.exe");
565 S_OK,
L"SOFTWARE\\Classes\\Applications\\regedit.exe");
569 S_OK,
L"SOFTWARE\\Classes\\Applications\\regedit.exe");
598 static const LPCWSTR cases[] = {
L".txt",
L".htm",
L".html",
L"txtfile" };
621 skip(
"NtQueryKey not found\n");
#define ok_hr(status, expected)
static void Cleanup(void)
static BOOL InitNtQueryKey(VOID)
static void TEST_Class(void)
static HRESULT AQS(ASSOCF flags, ASSOCSTR str, LPCWSTR pszAsso, LPCWSTR pszExtra, LPWSTR pszOut)
static void TEST_ByExeName(void)
static FN_NtQueryKey g_NtQueryKey
static const WCHAR pszUniquePid2[]
static void TEST_ShellExecClass(void)
struct _MY_KEY_NAME_INFORMATION * PMY_KEY_NAME_INFORMATION
struct _MY_KEY_NAME_INFORMATION MY_KEY_NAME_INFORMATION
_MY_KEY_INFORMATION_CLASS
static void TEST_PszAssoc(void)
static const WCHAR pszUniqueExt[]
static void TestClassKey(ASSOCKEY AssocKey)
static BOOL IsValidClassesRootPath(LPCWSTR path)
static HKEY CreateClassesSubKey(HKEY hRoot, LPCWSTR pszSubKey)
#define ok_AqkPath(InitF, AssocKey, pszInit, pszExtra, hrExpected, pszExpectedWin32)
static void TEST_AssocKeys(void)
static HRESULT GetAqkPath(UINT InitF, ASSOCKEY AssocKey, LPCWSTR pszInit, LPCWSTR pszExtra, LPWSTR *ppszKey)
static void TEST_AssocF_Flags(void)
static HRESULT SHELL_SetRegString(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszName, UINT Type, LPCWSTR pszData)
static HKEY CreateClassesKey(HKEY hRoot)
static void TEST_BaseClass(void)
enum _MY_KEY_INFORMATION_CLASS MY_KEY_INFORMATION_CLASS
static const WCHAR pszUniquePid[]
static LPWSTR GetKeyPath(HKEY hKey)
NTSTATUS(__stdcall * FN_NtQueryKey)(HANDLE, MY_KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG)
static void TEST_InvalidArgs(void)
#define ok_int(expression, result)
#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)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define ERROR_ACCESS_DENIED
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
WCHAR *WINAPI StrDupW(const WCHAR *str)
DWORD WINAPI GetVersion(void)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
DWORD WINAPI SHSetValueW(HKEY hkey, const WCHAR *subkey, const WCHAR *value, DWORD type, const void *data, DWORD data_len)
DWORD WINAPI SHDeleteKeyW(HKEY hkey, const WCHAR *subkey)
HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAssoc, LPCWSTR pszExtra, HKEY *phkeyOut)
HRESULT WINAPI AssocQueryStringW(ASSOCF cfFlags, ASSOCSTR str, LPCWSTR pszAssoc, LPCWSTR pszExtra, LPWSTR pszOut, DWORD *pcchOut)
GLenum GLuint GLenum GLsizei const GLchar * buf
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define EXCEPTION_EXECUTE_HANDLER
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define ERROR_FILE_NOT_FOUND
static const struct encodedExtensions exts[]
@ ASSOCKEY_SHELLEXECCLASS
@ ASSOCF_INIT_DEFAULTTOSTAR
@ ASSOCF_PER_MACHINE_ONLY
@ ASSOCF_INIT_DEFAULTTOFOLDER
@ ASSOCF_INIT_NOREMAPCLSID
@ ASSOCF_INIT_IGNOREUNKNOWN
_In_opt_ LPCSTR pszSubKey
#define _SEH2_EXCEPT(...)
HRESULT WINAPI AssocMakeShell(SIZE_T Unknown, _In_ HKEY hClass, _In_ LPCWSTR pszExe, _In_ const ASSOCMAKESHELL *pAMS)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_NO_ASSOCIATION
#define HKEY_CURRENT_USER
#define HKEY_CLASSES_ROOT