141{
142 static WCHAR test_extensionW[] = {
'.',
't',
'e',
's',
't',0};
143 static WCHAR test_progidW[] = {
't',
'e',
's',
't',
'f',
'i',
'l',
'e',0};
144 static WCHAR DefaultIconW[] = {
'D',
'e',
'f',
'a',
'u',
'l',
't',
'I',
'c',
'o',
'n',0};
145
146 static WCHAR test_iconW[] = {
's',
'h',
'e',
'l',
'l',
'3',
'2',
'.',
'd',
'l',
'l',
',',
'1',0};
147 HKEY test_extension_key;
148 HKEY test_progid_key;
149 HKEY test_defaulticon_key;
151
153 IQueryAssociations *assoc;
157
160 {
161 win_skip(
"Not enough permissions to create a test key.\n");
162 return;
163 }
164
167 ok(
r ==
ERROR_SUCCESS,
"RegSetValueExW(HKCR\\.test, NULL, \"testfile\") failed: 0x%lx\n",
r);
168
169
171 ok(
r ==
ERROR_SUCCESS,
"RegCreateKeyExW(HKCR, \"testfile\") failed: 0x%lx\n",
r);
175
176
178 ok(
r ==
ERROR_SUCCESS,
"RegCreateKeyExW(HKCR\\testfile\\DefaultIcon) failed: 0x%lx\n",
r);
180 ok(
r ==
ERROR_SUCCESS,
"RegSetValueExW(HKCR\\testfile\\DefaultIcon, NULL, \"folder.ico\") failed: 0x%lx\n",
r);
184
188
189 hr =
CoCreateInstance(&CLSID_QueryAssociations,
NULL, CLSCTX_INPROC_SERVER, &IID_IQueryAssociations, (
void*)&assoc);
190 ok(
hr ==
S_OK,
"failed to create object, 0x%x\n",
hr);
191
194
198 ok(
len > 0,
"got wrong needed length, %d\n",
len);
199
201 {
204
207
213 else
214 {
215 ok(
hr ==
ptr->hr,
"%d: GetString failed, 0x%08x\n",
i,
hr);
216 ok(
len >
ptr->len,
"%d: got needed length %d\n",
i,
len);
217 }
218
219
221 ok(buffW[0] == 0 ||
broken(buffW[0] == 0x1) ,
"%d: got %x\n",
i, buffW[0]);
222
224 ok(buffW[0] != 0,
"%d: got %x\n",
i, buffW[0]);
225
228 }
229
231}
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 RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
#define ERROR_ACCESS_DENIED
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 const GLfloat const GLdouble const GLfloat GLint i
static void getstring_test(LPCWSTR assocName, HKEY progIdKey, ASSOCSTR str, LPCWSTR expected_string, int line)
static struct assoc_getstring_test getstring_tests[]
#define HKEY_CLASSES_ROOT