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
a850cafe
Commit
a850cafe
authored
Jun 20, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jun 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Stop crash when an error occurs.
parent
e53e82bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
shlfolder.c
dlls/shell32/tests/shlfolder.c
+18
-14
No files found.
dlls/shell32/tests/shlfolder.c
View file @
a850cafe
...
...
@@ -450,21 +450,25 @@ static void test_GetDisplayName(void)
/* The pidl returned through the last parameter of SetNameOf is a simple one. */
hr
=
IShellFolder_SetNameOf
(
psfPersonal
,
NULL
,
pidlLast
,
wszDirName
,
SHGDN_NORMAL
,
&
pidlNew
);
ok
(
SUCCEEDED
(
hr
),
"SetNameOf failed! hr = %08x
\n
"
,
hr
);
ok
(((
LPITEMIDLIST
)((
LPBYTE
)
pidlNew
+
pidlNew
->
mkid
.
cb
))
->
mkid
.
cb
==
0
,
"pidl returned from SetNameOf should be simple!
\n
"
);
/* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf
* is implemented on top of SHFileOperation in WinXP. */
hr
=
IShellFolder_SetNameOf
(
psfPersonal
,
NULL
,
pidlNew
,
wszAbsoluteFilename
,
SHGDN_FORPARSING
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_CANCELLED
),
"SetNameOf succeeded! hr = %08x
\n
"
,
hr
);
/* Rename the file back to its original name. SetNameOf ignores the fact, that the
* SHGDN flags specify an absolute path. */
hr
=
IShellFolder_SetNameOf
(
psfPersonal
,
NULL
,
pidlNew
,
wszFileName
,
SHGDN_FORPARSING
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"SetNameOf failed! hr = %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(((
LPITEMIDLIST
)((
LPBYTE
)
pidlNew
+
pidlNew
->
mkid
.
cb
))
->
mkid
.
cb
==
0
,
"pidl returned from SetNameOf should be simple!
\n
"
);
/* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf
* is implemented on top of SHFileOperation in WinXP. */
hr
=
IShellFolder_SetNameOf
(
psfPersonal
,
NULL
,
pidlNew
,
wszAbsoluteFilename
,
SHGDN_FORPARSING
,
NULL
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_CANCELLED
),
"SetNameOf succeeded! hr = %08x
\n
"
,
hr
);
/* Rename the file back to its original name. SetNameOf ignores the fact, that the
* SHGDN flags specify an absolute path. */
hr
=
IShellFolder_SetNameOf
(
psfPersonal
,
NULL
,
pidlNew
,
wszFileName
,
SHGDN_FORPARSING
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"SetNameOf failed! hr = %08x
\n
"
,
hr
);
pILFree
(
pidlNew
);
}
pILFree
(
pidlNew
);
IShellFolder_Release
(
psfPersonal
);
}
...
...
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