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
102 L"%USERPROFILE%\\Desktop\\%anyvar%", SLGP_SHORTPATH,
S_OK,
TRUE,
103 L"%USERPROFILE%\\Desktop\\%anyvar%", SLGP_RAWPATH,
S_OK,
TRUE
108 L"%anyvar%%comspec%", SLGP_RAWPATH,
S_OK,
FALSE
117 L"%systemroot%\\system32\\%shell%", SLGP_SHORTPATH,
S_OK,
TRUE,
121 L"u:\\anypath\\%anyvar%",
S_OK,
122 L"u:\\anypath\\%anyvar%", SLGP_SHORTPATH,
S_OK,
TRUE,
123 L"u:\\anypath\\%anyvar%", SLGP_RAWPATH,
S_OK,
FALSE
132 L"%comspec%", SLGP_SHORTPATH,
S_OK,
TRUE,
136 L"%systemroot%\\non-existent-file",
S_OK,
137 L"%systemroot%\\non-existent-file", SLGP_SHORTPATH,
S_OK,
TRUE,
138 L"%systemroot%\\non-existent-file", SLGP_RAWPATH,
S_OK,
FALSE
141 L"c:\\non-existent-path\\non-existent-file",
S_OK,
142 L"c:\\non-existent-path\\non-existent-file", SLGP_SHORTPATH,
S_OK,
FALSE,
143 L"c:\\non-existent-path\\non-existent-file", SLGP_RAWPATH,
S_OK,
FALSE
146 L"non-existent-file",
S_OK,
147 L"%USERPROFILE%\\Desktop\\non-existent-file", SLGP_SHORTPATH,
S_OK,
TRUE,
148 L"%USERPROFILE%\\Desktop\\non-existent-file", SLGP_RAWPATH,
S_OK,
TRUE
162 CComPtr<IShellLinkW> psl;
168 CLSCTX_INPROC_SERVER,
170 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
173 skip(
"Could not instantiate CShellLink\n");
180 expectedPathOut =
NULL;
181 for (i1 = 0; i1 <= 1; i1++)
187 expectedPathOut = testDef->
pathOut1;
194 expectedPathOut = testDef->
pathOut2;
202 DPRINT(
"** %S **\n",evVar);
203 expectedPathOut = evVar;
208 "IShellLink::GetPath(%d), flags 0x%lx, got hr = 0x%lx, expected 0x%lx\n",
211 "IShellLink::GetPath(%d), flags 0x%lx, in %S, got %S, expected %S\n",
237 for (
i = 0;
i < TestListCnt; ++
i)
251 CComPtr<IShellLinkW> psl;
253 PCWSTR testDescription =
L"This is a test description";
258 CLSCTX_INPROC_SERVER,
260 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
263 skip(
"Could not instantiate CShellLink\n");
269 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
273 hr = psl->SetDescription(testDescription);
274 ok(
hr ==
S_OK,
"IShellLink::SetDescription returned hr = 0x%lx\n",
hr);
278 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
283 hr = psl->SetDescription(
NULL);
284 ok(
hr ==
S_OK,
"IShellLink::SetDescription returned hr = 0x%lx\n",
hr);
288 ok(
hr ==
S_OK,
"IShellLink::GetDescription returned hr = 0x%lx\n",
hr);
312 S_OK,
L"%SystemRoot%\\system32\\cmd.exe", GIL_NOTFILENAME | GIL_PERINSTANCE},
316 S_OK,
L"%SystemRoot%\\system32\\autochk.exe", GIL_NOTFILENAME | GIL_PERINSTANCE},
320 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
324 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
326 S_OK,
L"*", GIL_NOTFILENAME | GIL_PERCLASS},
334 CComPtr<IShellLinkW> psl;
335 CComPtr<IExtractIconW> pei;
338 PCWSTR pszExplorer =
L"%SystemRoot%\\explorer.exe";
344 CLSCTX_INPROC_SERVER,
346 ok(
hr ==
S_OK,
"CoCreateInstance, hr = 0x%lx\n",
hr);
349 skip(
"Could not instantiate CShellLink\n");
356 ok(
hr ==
S_OK,
"IShellLink::SetPath failed, hr = 0x%lx\n",
hr);
365 ok(
hr ==
S_OK,
"IShellLink::GetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
366 ok(*
szPath ==
L'\0',
"IShellLink::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
367 ok(iIcon == 0,
"IShellLink::GetIconLocation(%d) returned %d, expected %d\n",
i, iIcon, 0);
371 ok(
hr ==
S_OK,
"IShellLink::QueryInterface(IExtractIconW)(%d) failed, hr = 0x%lx\n",
i,
hr);
374 win_skip(
"No IExtractIconW interface\n");
378 iIcon =
wFlags = 0xdeadbeef;
381 ok(
hr == testDef->
hrDefIcon,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrDefIcon);
382 ok(*
szPath ==
L'\0',
"IExtractIcon::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
385 iIcon =
wFlags = 0xdeadbeef;
388 ok(
hr == testDef->
hrForShrt,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShrt);
391 iIcon =
wFlags = 0xdeadbeef;
394 ok(
hr == testDef->
hrForShell,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShell);
395 ok(
wFlags == testDef->
Flags,
"IExtractIcon::GetIconLocation(%d) returned wFlags = 0x%x, expected 0x%x\n",
i,
wFlags, testDef->
Flags);
401 ok(
_wcsicmp(szPath2,
szPath) == 0,
"IExtractIcon::GetIconLocation(%d) returned '%S', expected '%S'\n",
i,
szPath, szPath2);
413 hr = psl->SetIconLocation(pszExplorer, 1);
414 ok(
hr ==
S_OK,
"IShellLink::SetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
423 ok(
hr ==
S_OK,
"IShellLink::GetIconLocation(%d) failed, hr = 0x%lx\n",
i,
hr);
424 ok(
wcscmp(
szPath, pszExplorer) == 0,
"IShellLink::GetIconLocation(%d) returned '%S', expected '%S'\n",
i,
szPath, pszExplorer);
425 ok(iIcon == 1,
"IShellLink::GetIconLocation(%d) returned %d, expected %d\n",
i, iIcon, 1);
431 iIcon =
wFlags = 0xdeadbeef;
434 ok(
hr == testDef->
hrDefIcon,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrDefIcon);
435 ok(*
szPath ==
L'\0',
"IExtractIcon::GetIconLocation(%d) returned '%S'\n",
i,
szPath);
438 iIcon =
wFlags = 0xdeadbeef;
441 ok(
hr == testDef->
hrForShrt,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShrt);
444 iIcon =
wFlags = 0xdeadbeef;
447 ok(
hr == testDef->
hrForShell,
"IExtractIcon::GetIconLocation(%d) returned hr = 0x%lx, expected 0x%lx\n",
i,
hr, testDef->
hrForShell);
448 ok(
wFlags == testDef->
Flags,
"IExtractIcon::GetIconLocation(%d) returned wFlags = 0x%x, expected 0x%x\n",
i,
wFlags, testDef->
Flags);
454 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_Vista[]
static TEST_SHELL_ICON ShIconTests[]
static TEST_SHELL_LINK_DEF linkTestList_WS03[]
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)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define _WIN32_WINNT_WS03
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
#define IID_PPV_ARG(Itype, ppType)