47 L"%anyvar%%comspec%",
S_OK,
48 L"c:\\%anyvar%%comspec%", SLGP_SHORTPATH,
S_OK,
TRUE,
49 L"%anyvar%%comspec%", SLGP_RAWPATH,
S_OK,
FALSE
58 L"%systemroot%\\system32\\%shell%", SLGP_SHORTPATH,
S_OK,
TRUE,
62 L"u:\\anypath\\%anyvar%",
S_OK,
63 L"u:\\anypath\\%anyvar%", SLGP_SHORTPATH,
S_OK,
TRUE,
64 L"u:\\anypath\\%anyvar%", SLGP_RAWPATH,
S_OK,
FALSE
77 L"%systemroot%\\non-existent-file",
S_OK,
78 L"%systemroot%\\non-existent-file", SLGP_SHORTPATH,
S_OK,
TRUE,
79 L"%systemroot%\\non-existent-file", SLGP_RAWPATH,
S_OK,
FALSE
82 L"c:\\non-existent-path\\non-existent-file",
S_OK,
83 L"c:\\non-existent-path\\non-existent-file", SLGP_SHORTPATH,
S_OK,
FALSE,
84 L"c:\\non-existent-path\\non-existent-file", SLGP_RAWPATH,
S_OK,
FALSE
103 CComPtr<IShellLinkW> psl;
109 CLSCTX_INPROC_SERVER,
111 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
114 skip(
"Could not instantiate CShellLink\n");
121 expectedPathOut =
NULL;
122 for (i1 = 0; i1 <= 1; i1++)
128 expectedPathOut = testDef->
pathOut1;
135 expectedPathOut = testDef->
pathOut2;
143 DPRINT(
"** %S **\n",evVar);
144 expectedPathOut = evVar;
149 "IShellLink::GetPath(%d), flags 0x%lx, got hr = 0x%lx, expected 0x%lx\n",
152 "IShellLink::GetPath(%d), flags 0x%lx, in %S, got %S, expected %S\n",
180 CComPtr<IShellLinkW> psl;
182 PCWSTR testDescription =
L"This is a test description";
187 CLSCTX_INPROC_SERVER,
189 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
192 skip(
"Could not instantiate CShellLink\n");
198 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
202 hr = psl->SetDescription(testDescription);
203 ok(
hr ==
S_OK,
"IShellLink::SetDescription returned hr = 0x%lx\n",
hr);
207 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
212 hr = psl->SetDescription(
NULL);
213 ok(
hr ==
S_OK,
"IShellLink::SetDescription returned hr = 0x%lx\n",
hr);
217 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
241 S_OK,
L"%SystemRoot%\\system32\\cmd.exe", GIL_NOTFILENAME | GIL_PERINSTANCE},
245 S_OK,
L"%SystemRoot%\\system32\\autochk.exe", GIL_NOTFILENAME | GIL_PERINSTANCE},
249 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
253 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
255 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
263 CComPtr<IShellLinkW> psl;
264 CComPtr<IExtractIconW> pei;
267 PCWSTR pszExplorer =
L"%SystemRoot%\\explorer.exe";
273 CLSCTX_INPROC_SERVER,
275 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
278 skip(
"Could not instantiate CShellLink\n");
285 ok(
hr ==
S_OK,
"IShellLink::SetPath failed, hr = 0x%lx\n",
hr);
294 ok(
hr ==
S_OK,
"IShellLink::GetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
295 ok(*
szPath ==
L'\0',
"IShellLink::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
296 ok(iIcon == 0,
"IShellLink::GetIconLocation(%d) returned %d, expected %d\n",
i, iIcon, 0);
300 ok(
hr ==
S_OK,
"IShellLink::QueryInterface(IExtractIconW)(%d) failed, hr = 0x%lx\n",
i,
hr);
303 win_skip(
"No IExtractIconW interface\n");
307 iIcon =
wFlags = 0xdeadbeef;
310 ok(
hr == testDef->
hrDefIcon,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrDefIcon);
311 ok(*
szPath ==
L'\0',
"IExtractIcon::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
314 iIcon =
wFlags = 0xdeadbeef;
317 ok(
hr == testDef->
hrForShrt,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShrt);
320 iIcon =
wFlags = 0xdeadbeef;
323 ok(
hr == testDef->
hrForShell,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShell);
324 ok(
wFlags == testDef->
Flags,
"IExtractIcon::GetIconLocation(%d) returned wFlags = 0x%x, expected 0x%x\n",
i,
wFlags, testDef->
Flags);
330 ok(
_wcsicmp(szPath2,
szPath) == 0,
"IExtractIcon::GetIconLocation(%d) returned '%S', expected '%S'\n",
i,
szPath, szPath2);
342 hr = psl->SetIconLocation(pszExplorer, 1);
343 ok(
hr ==
S_OK,
"IShellLink::SetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
352 ok(
hr ==
S_OK,
"IShellLink::GetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
353 ok(
wcscmp(
szPath, pszExplorer) == 0,
"IShellLink::GetIconLocation(%d) returned '%S', expected '%S'\n",
i,
szPath, pszExplorer);
354 ok(iIcon == 1,
"IShellLink::GetIconLocation(%d) returned %d, expected %d\n",
i, iIcon, 1);
360 iIcon =
wFlags = 0xdeadbeef;
363 ok(
hr == testDef->
hrDefIcon,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrDefIcon);
364 ok(*
szPath ==
L'\0',
"IExtractIcon::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
367 iIcon =
wFlags = 0xdeadbeef;
370 ok(
hr == testDef->
hrForShrt,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShrt);
373 iIcon =
wFlags = 0xdeadbeef;
376 ok(
hr == testDef->
hrForShell,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShell);
377 ok(
wFlags == testDef->
Flags,
"IExtractIcon::GetIconLocation(%d) returned wFlags = 0x%x, expected 0x%x\n",
i,
wFlags, testDef->
Flags);
383 ok(
_wcsicmp(szPath2,
szPath) == 0,
"IExtractIcon::GetIconLocation(%d) returned '%S', expected '%S'\n",
i,
szPath, szPath2);
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW(IN LPCWSTR lpName, IN LPCWSTR lpValue)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
static TEST_SHELL_LINK_DEF linkTestList[]
static TEST_SHELL_ICON ShIconTests[]
static VOID TestShellLink(void)
static VOID TestIconLocation(void)
static VOID test_checklinkpath(UINT i, TEST_SHELL_LINK_DEF *testDef)
static VOID test_iconlocation(UINT i, TEST_SHELL_ICON *testDef)
static VOID TestDescription(void)
@ COINIT_APARTMENTTHREADED
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_In_ DWORD _Out_ _In_ WORD wFlags
#define IID_PPV_ARG(Itype, ppType)