#include <apitest.h>
#include <windef.h>
#include <shlwapi.h>
#include <pseh/pseh2.h>
Go to the source code of this file.
◆ FN_NtQueryKey
◆ MY_KEY_INFORMATION_CLASS
◆ MY_KEY_NAME_INFORMATION
◆ PMY_KEY_NAME_INFORMATION
◆ _MY_KEY_INFORMATION_CLASS
| Enumerator |
|---|
| MyKeyBasicInformation | |
| MyKeyNodeInformation | |
| MyKeyFullInformation | |
| MyKeyNameInformation | |
Definition at line 13 of file AssocQueryKey.c.
14{
enum _MY_KEY_INFORMATION_CLASS MY_KEY_INFORMATION_CLASS
◆ GetKeyPath()
◆ InitNtQueryKey()
Definition at line 31 of file AssocQueryKey.c.
32{
34 if (!hNTDLL)
return FALSE;
37}
NTSTATUS(__stdcall * FN_NtQueryKey)(HANDLE, MY_KEY_INFORMATION_CLASS, PVOID, ULONG, PULONG)
#define GetProcAddress(x, y)
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Referenced by START_TEST().
◆ START_TEST()
Definition at line 385 of file AssocQueryKey.c.
386{
388 {
389 skip(
"NtQueryKey not found\n");
390 return;
391 }
392
394
401
404}
static BOOL InitNtQueryKey(VOID)
static void TEST_ByExeName(void)
static void TEST_ShellExecClass(void)
static void TEST_PszAssoc(void)
static void TEST_AssocKeys(void)
static void TEST_AssocF_Flags(void)
static void TEST_InvalidArgs(void)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
◆ TEST_AssocF_Flags()
Definition at line 131 of file AssocQueryKey.c.
132{
134 {
148 };
149
151 {
155
159
164 }
165}
#define ok_hr(status, expected)
static LPWSTR GetKeyPath(HKEY hKey)
#define RegCloseKey(hKey)
LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
HRESULT WINAPI AssocQueryKeyW(ASSOCF cfFlags, ASSOCKEY assockey, LPCWSTR pszAssoc, LPCWSTR pszExtra, HKEY *phkeyOut)
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)
@ ASSOCF_INIT_DEFAULTTOSTAR
@ ASSOCF_INIT_DEFAULTTOFOLDER
@ ASSOCF_INIT_NOREMAPCLSID
@ ASSOCF_INIT_IGNOREUNKNOWN
Referenced by START_TEST().
◆ TEST_AssocKeys()
Definition at line 66 of file AssocQueryKey.c.
67{
68 {
72
76
82 }
83
84 {
88
92
94 L"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\Applications\\regedit.exe"),
97 }
98
99 {
103
107
113 }
114
115 {
119
123
127 }
128}
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
@ ASSOCKEY_SHELLEXECCLASS
Referenced by START_TEST().
◆ TEST_ByExeName()
Definition at line 314 of file AssocQueryKey.c.
315{
319
320
321 {
324
328
330
332 !
_wcsicmp(
path,
L"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\Applications\\notepad.exe"),
335 }
336
337
338 {
346
348 !
_wcsicmp(
path,
L"\\REGISTRY\\MACHINE\\SOFTWARE\\Classes\\Applications\\regedit.exe"),
351 }
352
353
354 {
362 }
363}
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Referenced by START_TEST().
◆ TEST_InvalidArgs()
Definition at line 232 of file AssocQueryKey.c.
233{
234
235 {
238
240 {
242 }
244 {
247 }
249
252 }
253
254
255 {
259
261 {
263 }
265 {
268 }
270
274
277 }
278
279
280 {
286 }
287
288
289 {
293
295 {
297 }
299 {
302 }
304
308
311 }
312}
#define ok_int(expression, result)
#define ERROR_INVALID_PARAMETER
#define EXCEPTION_EXECUTE_HANDLER
#define _SEH2_EXCEPT(...)
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Referenced by START_TEST().
◆ TEST_PszAssoc()
Definition at line 168 of file AssocQueryKey.c.
169{
170 const wchar_t*
exts[] =
171 {
172 L".txt",
L".htm",
L".reg",
L".xml",
L".png",
L".jpg",
L".zip"
173 };
174
176 {
180
184
189 }
190
191
192 {
196
200
206 }
207 {
211
215
219 }
220
221
222 {
228 }
229}
static const struct encodedExtensions exts[]
Referenced by START_TEST().
◆ TEST_ShellExecClass()
| static void TEST_ShellExecClass |
( |
void |
| ) |
|
|
static |
◆ g_NtQueryKey