27#define NONAMELESSUNION
28#define NONAMELESSSTRUCT
31#define WIN32_LEAN_AND_MEAN
47 static WCHAR my_network_places_path[] = {
48 ':',
':',
'{',
'2',
'0',
'8',
'D',
'2',
'C',
'6',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
49 '1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'7',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}', 0 };
50 static WCHAR entire_network_path[] = {
51 ':',
':',
'{',
'2',
'0',
'8',
'D',
'2',
'C',
'6',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
52 '1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'7',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
53 '}',
'\\',
'E',
'n',
't',
'i',
'r',
'e',
'N',
'e',
't',
'w',
'o',
'r',
'k',0 };
56 DWORD eaten = 0xdeadbeef;
62 ok(
hr ==
S_OK,
"SHGetDesktopFolder failed with error 0x%x\n",
hr);
65 ok(
hr ==
S_OK,
"IShellFolder_ParseDisplayName failed with error 0x%x\n",
hr);
67 ok(eaten == 0xdeadbeef,
"eaten should not have been set to %u\n", eaten);
68 expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_DROPTARGET|SFGAO_HASPROPSHEET|SFGAO_CANRENAME|SFGAO_CANLINK;
70 ok((
attr == expected_attr) ||
71 (
attr == (expected_attr | SFGAO_STREAM)) ||
72 (
attr == (expected_attr | SFGAO_CANDELETE)) ||
73 (
attr == (expected_attr | SFGAO_CANDELETE | SFGAO_NONENUMERATED)),
74 "Unexpected attributes : %08x\n",
attr);
83 IShellFolder_Release(psfDesktop);
88 win_skip(
"'EntireNetwork' is not available on Win9x, NT4 and Vista\n");
91 ok(
hr ==
S_OK,
"IShellFolder_ParseDisplayName failed with error 0x%x\n",
hr);
93 ok(eaten == 0xdeadbeef,
"eaten should not have been set to %u\n", eaten);
94 expected_attr = SFGAO_HASSUBFOLDER|SFGAO_FOLDER|SFGAO_FILESYSANCESTOR|SFGAO_HASPROPSHEET|SFGAO_CANLINK;
96 ok(
attr == expected_attr ||
97 attr == (expected_attr | SFGAO_STREAM) ||
98 attr == (expected_attr | SFGAO_STORAGEANCESTOR),
99 "attr should be 0x%x, not 0x%x\n", expected_attr,
attr);
108 static WCHAR control_panel_path[] = {
109 ':',
':',
'{',
'2',
'0',
'D',
'0',
'4',
'F',
'E',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'8',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}',
'\\',
110 ':',
':',
'{',
'2',
'1',
'E',
'C',
'2',
'0',
'2',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'D',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}', 0 };
113 DWORD eaten = 0xdeadbeef;
118 ok(
hr ==
S_OK,
"SHGetDesktopFolder failed with error 0x%x\n",
hr);
121 ok(
hr ==
S_OK,
"IShellFolder_ParseDisplayName failed with error 0x%x\n",
hr);
122 todo_wine ok(eaten == 0xdeadbeef,
"eaten should not have been set to %u\n", eaten);
124 ok((
attr == (SFGAO_CANLINK | SFGAO_FOLDER)) ||
125 (
attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_STREAM)) ||
126 (
attr == (SFGAO_CANLINK | SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) ||
127 (
attr == (SFGAO_CANLINK | SFGAO_NONENUMERATED)) ||
128 (
attr == SFGAO_CANLINK),
129 "Unexpected attributes : %08x\n",
attr);
132 IShellFolder_Release(psfDesktop);
150 win_skip(
"Failed to created IShellFolder2 for Printers folder\n");
159 IShellFolder2_GetDefaultColumnState(
folder, 0,
NULL);
160 IPersistFolder2_GetCurFolder(pf,
NULL);
180 for(
i = 0;
i < 6;
i++)
202 hr = IShellFolder2_QueryInterface(
folder, &IID_IPersistFolder2, (
void**)&pf);
206 pidl1 = (
void*)0xdeadbeef;
207 hr = IPersistFolder2_GetCurFolder(pf, &pidl1);
209 ok(pidl1 ==
NULL,
"got %p\n", pidl1);
214 hr = IPersistFolder2_Initialize(pf, pidl2);
217 hr = IPersistFolder2_GetCurFolder(pf, &pidl1);
220 ok(
ILIsEqual(pidl1, pidl2),
"expected same PIDL\n");
221 IPersistFolder2_Release(pf);
225 IShellFolder2_Release(
folder);
238 hr = IShellFolder_QueryInterface(psf, &IID_IShellFolder,
NULL);
241 IShellFolder_Release(psf);
246 static WCHAR MyComputer[] = {
':',
':',
'{',
'2',
'0',
'D',
'0',
'4',
'F',
'E',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'8',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}', 0 };
247 static WCHAR MyDocuments[] = {
':',
':',
'{',
'4',
'5',
'0',
'D',
'8',
'F',
'B',
'A',
'-',
'A',
'D',
'2',
'5',
'-',
'1',
'1',
'D',
'0',
'-',
'9',
'8',
'A',
'8',
'-',
'0',
'8',
'0',
'0',
'3',
'6',
'1',
'B',
'1',
'1',
'0',
'3',
'}', 0 };
248 static WCHAR RecycleBin[] = {
':',
':',
'{',
'6',
'4',
'5',
'F',
'F',
'0',
'4',
'0',
'-',
'5',
'0',
'8',
'1',
'-',
'1',
'0',
'1',
'B',
'-',
'9',
'F',
'0',
'8',
'-',
'0',
'0',
'A',
'A',
'0',
'0',
'2',
'F',
'9',
'5',
'4',
'E',
'}', 0 };
249 static WCHAR ControlPanel[]= {
':',
':',
'{',
'2',
'0',
'D',
'0',
'4',
'F',
'E',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'8',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}',
'\\',
250 ':',
':',
'{',
'2',
'1',
'E',
'C',
'2',
'0',
'2',
'0',
'-',
'3',
'A',
'E',
'A',
'-',
'1',
'0',
'6',
'9',
'-',
'A',
'2',
'D',
'D',
'-',
'0',
'8',
'0',
'0',
'2',
'B',
'3',
'0',
'3',
'0',
'9',
'D',
'}', 0 };
251 static WCHAR *folders[] = { MyComputer, MyDocuments, RecycleBin, ControlPanel };
260 ok(
hr ==
S_OK,
"SHGetDesktopFolder failed with error 0x%08x\n",
hr);
268 ok(
hr ==
S_OK,
"IShellFolder::ParseDisplayName failed with error 0x%08x\n",
hr);
272 ok(
hr ==
S_OK,
"IShellFolder::GetDisplayNameOf failed with error 0x%08x\n",
hr);
274 ok(
hr ==
S_OK,
"StrRetToBuf failed with error 0x%08x\n",
hr);
277 ok(
hr ==
S_OK,
"IShellFolder::GetDisplayNameOf failed with error 0x%08x\n",
hr);
279 ok(
hr ==
S_OK,
"StrRetToBuf failed with error 0x%08x\n",
hr);
285 ok(
hr ==
S_OK,
"IShellFolder::GetDisplayNameOf failed with error 0x%08x\n",
hr);
287 ok(
hr ==
S_OK,
"StrRetToBuf failed with error 0x%08x\n",
hr);
294 IShellFolder_Release(desktop);
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define ERROR_INVALID_PARAMETER
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
void WINAPI SHFree(LPVOID pv)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
#define IShellFolder_ParseDisplayName
#define IShellFolder_GetDisplayNameOf
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 ILFree(LPITEMIDLIST pidl)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
DWORD WINAPI GetVersion()
static void test_parse_for_control_panel(void)
static void test_printers_folder(void)
static void test_desktop_folder(void)
static void test_desktop_displaynameof(void)
static void test_parse_for_entire_network(void)
static BOOL SHELL_OsIsUnicode(void)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
#define ERROR_NO_NET_OR_BAD_PATH
#define HRESULT_FROM_WIN32(x)
#define ERROR_BAD_NET_NAME