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
d2daa384
Commit
d2daa384
authored
Jan 06, 2007
by
Francois Gouget
Committed by
Alexandre Julliard
Jan 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32/tests: Hack SHGetFileInfo() so it does not crash and add a test for it.
parent
3d01fc39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
shell32_main.c
dlls/shell32/shell32_main.c
+8
-0
shlfileop.c
dlls/shell32/tests/shlfileop.c
+22
-0
No files found.
dlls/shell32/shell32_main.c
View file @
d2daa384
...
@@ -356,6 +356,14 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
...
@@ -356,6 +356,14 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
(
flags
&
(
SHGFI_ATTRIBUTES
|
SHGFI_EXETYPE
|
SHGFI_PIDL
)))
(
flags
&
(
SHGFI_ATTRIBUTES
|
SHGFI_EXETYPE
|
SHGFI_PIDL
)))
return
FALSE
;
return
FALSE
;
if
(
(
flags
&
SHGFI_USEFILEATTRIBUTES
)
&&
(
flags
&
(
SHGFI_ICONLOCATION
|
SHGFI_ICON
|
SHGFI_SYSICONINDEX
))
)
{
FIXME
(
"This combination of flags is not supported yet
\n
"
);
/* And it would cause a crash, so return false instead */
return
FALSE
;
}
/* windows initializes these values regardless of the flags */
/* windows initializes these values regardless of the flags */
if
(
psfi
!=
NULL
)
if
(
psfi
!=
NULL
)
{
{
...
...
dlls/shell32/tests/shlfileop.c
View file @
d2daa384
...
@@ -111,6 +111,26 @@ static void clean_after_shfo_tests(void)
...
@@ -111,6 +111,26 @@ static void clean_after_shfo_tests(void)
RemoveDirectoryA
(
"nonexistent"
);
RemoveDirectoryA
(
"nonexistent"
);
}
}
static
void
test_get_file_info
(
void
)
{
DWORD
rc
;
SHFILEINFO
shfi
;
strcpy
(
shfi
.
szDisplayName
,
"dummy"
);
shfi
.
iIcon
=
0xdeadbeef
;
rc
=
SHGetFileInfoA
(
"c:
\\
nonexistent"
,
FILE_ATTRIBUTE_DIRECTORY
,
&
shfi
,
sizeof
(
shfi
),
SHGFI_ICONLOCATION
|
SHGFI_USEFILEATTRIBUTES
);
todo_wine
ok
(
rc
,
"SHGetFileInfoA(c:
\\
nonexistent) returned %d
\n
"
,
rc
);
if
(
rc
)
{
ok
(
strcpy
(
shfi
.
szDisplayName
,
"dummy"
)
!=
0
,
"SHGetFileInfoA(c:
\\
nonexistent) displayname is not set
\n
"
);
ok
(
shfi
.
iIcon
!=
0xdeadbeef
,
"SHGetFileInfoA(c:
\\
nonexistent) iIcon is not set
\n
"
);
}
}
/*
/*
puts into the specified buffer file names with current directory.
puts into the specified buffer file names with current directory.
files - string with file names, separated by null characters. Ends on a double
files - string with file names, separated by null characters. Ends on a double
...
@@ -855,6 +875,8 @@ START_TEST(shlfileop)
...
@@ -855,6 +875,8 @@ START_TEST(shlfileop)
clean_after_shfo_tests
();
clean_after_shfo_tests
();
test_get_file_info
();
init_shfo_tests
();
init_shfo_tests
();
test_delete
();
test_delete
();
clean_after_shfo_tests
();
clean_after_shfo_tests
();
...
...
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