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
d7e28478
Commit
d7e28478
authored
Nov 01, 2002
by
Alberto Massari
Committed by
Alexandre Julliard
Nov 01, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixed typo in SHGetFileInfoA.
- Properly convert return values back to Unicode in SHGetFileInfoW.
parent
eaa53a05
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
shell32_main.c
dlls/shell32/shell32_main.c
+16
-7
No files found.
dlls/shell32/shell32_main.c
View file @
d7e28478
...
...
@@ -209,7 +209,7 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
SHFILEINFOA
*
psfi
,
UINT
sizeofpsfi
,
UINT
flags
)
{
char
szLo
ac
tion
[
MAX_PATH
];
char
szLo
ca
tion
[
MAX_PATH
];
int
iIndex
;
DWORD
ret
=
TRUE
,
dwAttributes
=
0
;
IShellFolder
*
psfParent
=
NULL
;
...
...
@@ -375,11 +375,11 @@ DWORD WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes,
if
(
SUCCEEDED
(
hr
))
{
hr
=
IExtractIconA_GetIconLocation
(
pei
,
(
flags
&
SHGFI_OPENICON
)
?
GIL_OPENICON
:
0
,
szLoac
tion
,
MAX_PATH
,
&
iIndex
,
&
uFlags
);
hr
=
IExtractIconA_GetIconLocation
(
pei
,
(
flags
&
SHGFI_OPENICON
)
?
GIL_OPENICON
:
0
,
szLoca
tion
,
MAX_PATH
,
&
iIndex
,
&
uFlags
);
/* FIXME what to do with the index? */
if
(
uFlags
!=
GIL_NOTFILENAME
)
strcpy
(
psfi
->
szDisplayName
,
szLoac
tion
);
strcpy
(
psfi
->
szDisplayName
,
szLoca
tion
);
else
ret
=
FALSE
;
...
...
@@ -480,13 +480,22 @@ DWORD WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes,
temppath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
WideCharToMultiByte
(
CP_ACP
,
0
,
path
,
-
1
,
temppath
,
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
psfi
->
szDisplayName
,
-
1
,
temppsfi
.
szDisplayName
,
sizeof
(
temppsfi
.
szDisplayName
),
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
psfi
->
szTypeName
,
-
1
,
temppsfi
.
szTypeName
,
sizeof
(
temppsfi
.
szTypeName
),
NULL
,
NULL
);
if
(
flags
&
SHGFI_ATTR_SPECIFIED
)
temppsfi
.
dwAttributes
=
psfi
->
dwAttributes
;
ret
=
SHGetFileInfoA
(
temppath
,
dwFileAttributes
,
&
temppsfi
,
sizeof
(
temppsfi
),
flags
);
if
(
flags
&
SHGFI_ICON
)
psfi
->
hIcon
=
temppsfi
.
hIcon
;
if
(
flags
&
(
SHGFI_SYSICONINDEX
|
SHGFI_ICON
|
SHGFI_ICONLOCATION
))
psfi
->
iIcon
=
temppsfi
.
iIcon
;
if
(
flags
&
SHGFI_ATTRIBUTES
)
psfi
->
dwAttributes
=
temppsfi
.
dwAttributes
;
if
(
flags
&
(
SHGFI_DISPLAYNAME
|
SHGFI_ICONLOCATION
))
MultiByteToWideChar
(
CP_ACP
,
0
,
temppsfi
.
szDisplayName
,
-
1
,
psfi
->
szDisplayName
,
sizeof
(
psfi
->
szDisplayName
));
if
(
flags
&
SHGFI_TYPENAME
)
MultiByteToWideChar
(
CP_ACP
,
0
,
temppsfi
.
szTypeName
,
-
1
,
psfi
->
szTypeName
,
sizeof
(
psfi
->
szTypeName
));
HeapFree
(
GetProcessHeap
(),
0
,
temppath
);
return
ret
;
...
...
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