Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
94feee32
Commit
94feee32
authored
Aug 22, 2005
by
Saulius Krasuckas
Committed by
Alexandre Julliard
Aug 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make file operations succeed on Win9x too.
parent
88ac4b96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
shlfolder.c
dlls/shell32/tests/shlfolder.c
+13
-8
No files found.
dlls/shell32/tests/shlfolder.c
View file @
94feee32
...
...
@@ -220,6 +220,7 @@ static void test_BindToObject(void)
SHITEMID
emptyitem
=
{
0
,
{
0
}
};
LPITEMIDLIST
pidlMyComputer
,
pidlSystemDir
,
pidlEmpty
=
(
LPITEMIDLIST
)
&
emptyitem
;
WCHAR
wszSystemDir
[
MAX_PATH
];
char
szSystemDir
[
MAX_PATH
];
WCHAR
wszMyComputer
[]
=
{
':'
,
':'
,
'{'
,
'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
};
...
...
@@ -256,12 +257,13 @@ static void test_BindToObject(void)
hr
=
IShellFolder_BindToObject
(
psfMyComputer
,
NULL
,
NULL
,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfChild
);
ok
(
hr
==
E_INVALIDARG
,
"MyComputers's BindToObject should fail, when called with NULL pidl! hr = %08lx
\n
"
,
hr
);
cChars
=
GetSystemDirectory
W
(
w
szSystemDir
,
MAX_PATH
);
ok
(
cChars
>
0
&&
cChars
<
MAX_PATH
,
"GetSystemDirectory
W
failed! LastError: %08lx
\n
"
,
GetLastError
());
cChars
=
GetSystemDirectory
A
(
szSystemDir
,
MAX_PATH
);
ok
(
cChars
>
0
&&
cChars
<
MAX_PATH
,
"GetSystemDirectory
A
failed! LastError: %08lx
\n
"
,
GetLastError
());
if
(
cChars
==
0
||
cChars
>=
MAX_PATH
)
{
IShellFolder_Release
(
psfMyComputer
);
return
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
szSystemDir
,
-
1
,
wszSystemDir
,
MAX_PATH
);
hr
=
IShellFolder_ParseDisplayName
(
psfMyComputer
,
NULL
,
NULL
,
wszSystemDir
,
NULL
,
&
pidlSystemDir
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"MyComputers's ParseDisplayName failed to parse the SystemDirectory! hr = %08lx
\n
"
,
hr
);
...
...
@@ -293,6 +295,7 @@ static void test_GetDisplayName(void)
HRESULT
hr
;
HANDLE
hTestFile
;
WCHAR
wszTestFile
[
MAX_PATH
],
wszTestFile2
[
MAX_PATH
],
wszTestDir
[
MAX_PATH
];
char
szTestFile
[
MAX_PATH
],
szTestDir
[
MAX_PATH
];
STRRET
strret
;
LPSHELLFOLDER
psfDesktop
,
psfPersonal
;
IUnknown
*
psfFile
;
...
...
@@ -318,16 +321,18 @@ static void test_GetDisplayName(void)
PathAddBackslashW
(
wszTestDir
);
lstrcatW
(
wszTestDir
,
wszDirName
);
result
=
CreateDirectoryW
(
wszTestDir
,
NULL
);
ok
(
result
,
"CreateDirectoryW failed! Last error: %08lx
\n
"
,
GetLastError
());
WideCharToMultiByte
(
CP_ACP
,
0
,
wszTestDir
,
-
1
,
szTestDir
,
MAX_PATH
,
0
,
0
);
result
=
CreateDirectoryA
(
szTestDir
,
NULL
);
ok
(
result
,
"CreateDirectoryA failed! Last error: %08lx
\n
"
,
GetLastError
());
if
(
!
result
)
return
;
lstrcpyW
(
wszTestFile
,
wszTestDir
);
PathAddBackslashW
(
wszTestFile
);
lstrcatW
(
wszTestFile
,
wszFileName
);
WideCharToMultiByte
(
CP_ACP
,
0
,
wszTestFile
,
-
1
,
szTestFile
,
MAX_PATH
,
0
,
0
);
hTestFile
=
CreateFile
W
(
wszTestFile
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_NEW
,
0
,
NULL
);
ok
(
hTestFile
!=
INVALID_HANDLE_VALUE
,
"CreateFileW
failed! Last error: %08lx
\n
"
,
GetLastError
());
hTestFile
=
CreateFile
A
(
szTestFile
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
0
,
NULL
);
ok
(
(
hTestFile
!=
INVALID_HANDLE_VALUE
),
"CreateFileA
failed! Last error: %08lx
\n
"
,
GetLastError
());
if
(
hTestFile
==
INVALID_HANDLE_VALUE
)
return
;
CloseHandle
(
hTestFile
);
...
...
@@ -352,8 +357,8 @@ static void test_GetDisplayName(void)
}
/* Deleting the file and the directory */
DeleteFile
W
(
w
szTestFile
);
RemoveDirectory
W
(
w
szTestDir
);
DeleteFile
A
(
szTestFile
);
RemoveDirectory
A
(
szTestDir
);
/* SHGetPathFromIDListW still works, although the file is not present anymore. */
result
=
SHGetPathFromIDListW
(
pidlTestFile
,
wszTestFile2
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment