Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7a7ece78
Commit
7a7ece78
authored
Apr 18, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Apr 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Release the test desktop interface on all appropriate exit paths…
shell32/tests: Release the test desktop interface on all appropriate exit paths in ParseDisplayName tests.
parent
79d7ca60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
shlfolder.c
dlls/shell32/tests/shlfolder.c
+17
-4
No files found.
dlls/shell32/tests/shlfolder.c
View file @
7a7ece78
...
...
@@ -102,6 +102,7 @@ static void test_ParseDisplayName(void)
BOOL
bRes
;
hr
=
SHGetDesktopFolder
(
&
IDesktopFolder
);
ok
(
hr
==
S_OK
,
"Expected SHGetDesktopFolder to return S_OK, got 0x%08x
\n
"
,
hr
);
if
(
hr
!=
S_OK
)
return
;
/* Tests crash on W2K and below (SHCreateShellItem available as of XP) */
...
...
@@ -147,7 +148,11 @@ static void test_ParseDisplayName(void)
}
res
=
GetFileAttributesA
(
cNonExistDir1A
);
if
(
res
!=
INVALID_FILE_ATTRIBUTES
)
return
;
if
(
res
!=
INVALID_FILE_ATTRIBUTES
)
{
skip
(
"Test directory unexpectedly exists
\n
"
);
goto
finished
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
cNonExistDir1A
,
-
1
,
cTestDirW
,
MAX_PATH
);
hr
=
IShellFolder_ParseDisplayName
(
IDesktopFolder
,
...
...
@@ -156,7 +161,11 @@ static void test_ParseDisplayName(void)
"ParseDisplayName returned %08x, expected 80070002 or E_FAIL
\n
"
,
hr
);
res
=
GetFileAttributesA
(
cNonExistDir2A
);
if
(
res
!=
INVALID_FILE_ATTRIBUTES
)
return
;
if
(
res
!=
INVALID_FILE_ATTRIBUTES
)
{
skip
(
"Test directory unexpectedly exists
\n
"
);
goto
finished
;
}
MultiByteToWideChar
(
CP_ACP
,
0
,
cNonExistDir2A
,
-
1
,
cTestDirW
,
MAX_PATH
);
hr
=
IShellFolder_ParseDisplayName
(
IDesktopFolder
,
...
...
@@ -167,8 +176,12 @@ static void test_ParseDisplayName(void)
/* I thought that perhaps the DesktopFolder's ParseDisplayName would recognize the
* path corresponding to CSIDL_PERSONAL and return a CLSID_MyDocuments PIDL. Turns
* out it doesn't. The magic seems to happen in the file dialogs, then. */
if
(
!
pSHGetSpecialFolderPathW
||
!
pILFindLastID
)
goto
finished
;
if
(
!
pSHGetSpecialFolderPathW
||
!
pILFindLastID
)
{
win_skip
(
"SHGetSpecialFolderPathW and/or ILFindLastID are not available
\n
"
);
goto
finished
;
}
bRes
=
pSHGetSpecialFolderPathW
(
NULL
,
cTestDirW
,
CSIDL_PERSONAL
,
FALSE
);
ok
(
bRes
,
"SHGetSpecialFolderPath(CSIDL_PERSONAL) failed! %u
\n
"
,
GetLastError
());
if
(
!
bRes
)
goto
finished
;
...
...
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