26#define expect(expected, got) ok( (expected) == (got), "Expected %d, got %d\n", (expected), (got))
27#define expect_hr(expected, got) ok( (expected) == (got), "Expected %08x, got %08x\n", (expected), (got))
43 static const WCHAR openwith[] = {
'O',
'p',
'e',
'n',
'W',
'i',
't',
'h',
'.',
'e',
'x',
'e',0};
48 if (!pAssocQueryStringW)
50 win_skip(
"AssocQueryStringW() is missing\n");
57 ok(
len == 0xdeadbeef,
"got %u\n",
len);
63 "Unexpected result : %08x\n",
hr);
64 ok(
len == 0xdeadbeef,
"got %u\n",
len);
71 "Unexpected result : %08x\n",
hr);
82 "Unexpected result : %08x\n",
hr);
83 ok(
len == 0xdeadbeef,
"got %u\n",
len);
88 "Unexpected result : %08x\n",
hr);
93 ok(
len == 0xdeadbeef,
"got %u\n",
len);
99 "Unexpected result : %08x\n",
hr);
100 ok(
len == 0xdeadbeef,
"got %u\n",
len);
108 "Unexpected result : %08x\n",
hr);
110 "got hr=%08x and len=%u\n",
hr,
len);
117 "Unexpected result : %08x\n",
hr);
118 ok(
len == 0xdeadbeef,
"got %u\n",
len);
123 "Unexpected result : %08x\n",
hr);
129 WCHAR * friendlyName;
130 WCHAR * executableName;
133 if (!pAssocQueryStringW)
135 win_skip(
"AssocQueryStringW() is missing\n");
143 skip(
"failed to get initial len\n");
151 skip(
"failed to allocate memory\n");
157 executableName, &len2);
159 slen =
lstrlenW(executableName) + 1;
168 "Unexpected result : %08x\n",
hr);
172 skip(
"failed to get initial len\n");
181 skip(
"failed to allocate memory\n");
187 friendlyName, &len2);
202 static const CHAR dotWinetest[] = {
203 '.',
'w',
'i',
'n',
'e',
't',
'e',
's',
't',0
205 static const CHAR winetestfile[] = {
206 'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'f',
'i',
'l',
'e',0
208 static const CHAR winetestfileAction[] = {
209 'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'f',
'i',
'l',
'e',
210 '\\',
's',
'h',
'e',
'l',
'l',
212 '\\',
'c',
'o',
'm',
'm',
'a',
'n',
'd',0
215 'n',
'o',
't',
'e',
'p',
'a',
'd',
'.',
'e',
'x',
'e',0
220 if (!pAssocQueryStringA)
222 win_skip(
"AssocQueryStringA() is missing\n");
229 skip(
"failed to create dotWinetest key\n");
237 skip(
"failed to set dotWinetest key\n");
244 skip(
"failed to create winetestfileAction key\n");
252 skip(
"failed to set winetestfileAction key\n");
259 "Unexpected result : %08x\n",
hr);
263 "got '%s' (Expected result to include 'notepad.exe')\n",
buf);
274 IQueryAssociations *pqa;
278 win_skip(
"AssocCreate() is missing\n");
287 ,
"Unexpected result : %08x\n",
hr);
291 ,
"Unexpected result : %08x\n",
hr);
293 hr = pAssocCreate(CLSID_QueryAssociations, &IID_IQueryAssociations, (
LPVOID*)&pqa);
295 ,
"Unexpected result : %08x\n",
hr);
303 ,
"Unexpected result : %08x\n",
hr);
321#define HARDCODED_NATIVE_WMSDK (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_WMSDK)
322#define HARDCODED_NATIVE_GDIPLUS (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_GDIPLUS)
323#define HARDCODED_NATIVE_ZIPFLDR (PERCEIVEDFLAG_HARDCODED | PERCEIVEDFLAG_NATIVESUPPORT | PERCEIVEDFLAG_ZIPFOLDER)
324#define SOFTCODED_NATIVESUPPORT (PERCEIVEDFLAG_SOFTCODED | PERCEIVEDFLAG_NATIVESUPPORT)
494 ok(
perceived ==
test->perceived,
"%s: got perceived 0x%x, expected 0x%x\n",
496 ok(
flags ==
test->flags,
"%s: got flags 0x%x, expected 0x%x\n",
499 type_returned = (
void *)0xdeadbeef;
505 ok(
perceived ==
test->perceived,
"%s: got perceived 0x%x, expected 0x%x\n",
507 ok(
flags ==
test->flags,
"%s: got flags 0x%x, expected 0x%x\n",
512 ok(type_returned == (
void *)0xdeadbeef ||
broken(type_returned ==
NULL) ,
513 "%s: got type %p, expected 0xdeadbeef\n",
test->extension, type_returned);
515 else if (type_returned == (
void *)0xdeadbeef)
517 ok(type_returned != (
void *)0xdeadbeef,
"%s: got type %p, expected '%s'\n",
518 test->extension, type_returned,
test->type);
522 ok(
StrCmpIW(type_expected, type_returned) == 0,
"%s: got type %s, expected '%s'\n",
547 if (!pAssocGetPerceivedType)
549 win_skip(
"AssocGetPerceivedType() is missing\n");
char * strstr(char *String1, char *String2)
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
static const WCHAR version[]
static void cleanup(void)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI GetVersionExW(IN LPOSVERSIONINFOW lpVersionInformation)
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
#define HARDCODED_NATIVE_ZIPFLDR
#define SOFTCODED_NATIVESUPPORT
#define HARDCODED_NATIVE_WMSDK
#define HARDCODED_NATIVE_GDIPLUS
DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
HRESULT WINAPI SHStrDupA(LPCSTR lpszStr, LPWSTR *lppszDest)
int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
#define expect_hr(expected, got)
static const WCHAR badBad[]
static void test_getstring_basic(void)
static const WCHAR open[]
static const WCHAR dotBad[]
static void test_getstring_bad(void)
static const struct assoc_test_struct assoc_perceived_types[]
static void test_assoc_create(void)
static void test_getstring_no_extra(void)
#define expect(expected, got)
static const WCHAR invalid[]
static void **static PERCEIVED INT LPWSTR *static const WCHAR dotHtml[]
static void test_assoc_perceived(void)
static void test_assoc_one(const struct assoc_test_struct *test)
@ ASSOCSTR_FRIENDLYAPPNAME
#define IQueryAssociations_Release(p)
enum tagPERCEIVED PERCEIVED
@ PERCEIVED_TYPE_COMPRESSED
@ PERCEIVED_TYPE_DOCUMENT
@ PERCEIVED_TYPE_UNSPECIFIED
@ PERCEIVED_TYPE_APPLICATION
ULONG dwOSVersionInfoSize
#define ERROR_NO_ASSOCIATION
#define HRESULT_FROM_WIN32(x)
#define CLASS_E_CLASSNOTAVAILABLE
#define HKEY_CLASSES_ROOT