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
423cb99a
Commit
423cb99a
authored
Jan 20, 2004
by
Martin Fuchs
Committed by
Alexandre Julliard
Jan 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- SHGetDataFromIDListA/W(): handle drives when retrieving file
attributes - fixed error handling to avoid GPFs
parent
c9b4f601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
8 deletions
+35
-8
pidl.c
dlls/shell32/pidl.c
+35
-8
No files found.
dlls/shell32/pidl.c
View file @
423cb99a
...
...
@@ -1144,16 +1144,31 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
{
case
SHGDFIL_FINDDATA
:
{
LPSTR
filename
,
shortname
;
WIN32_FIND_DATAA
*
pfd
=
dest
;
if
(
_ILIsDrive
(
pidl
))
return
E_INVALIDARG
;
if
(
len
<
(
int
)
sizeof
(
WIN32_FIND_DATAA
))
return
E_INVALIDARG
;
ZeroMemory
(
pfd
,
sizeof
(
WIN32_FIND_DATAA
));
_ILGetFileDateTime
(
pidl
,
&
(
pfd
->
ftLastWriteTime
));
pfd
->
dwFileAttributes
=
_ILGetFileAttributes
(
pidl
,
NULL
,
0
);
pfd
->
nFileSizeLow
=
_ILGetFileSize
(
pidl
,
NULL
,
0
);
lstrcpynA
(
pfd
->
cFileName
,
_ILGetTextPointer
(
pidl
),
MAX_PATH
);
lstrcpynA
(
pfd
->
cAlternateFileName
,
_ILGetSTextPointer
(
pidl
),
14
);
filename
=
_ILGetTextPointer
(
pidl
);
shortname
=
_ILGetSTextPointer
(
pidl
);
if
(
filename
)
lstrcpynA
(
pfd
->
cFileName
,
filename
,
MAX_PATH
);
else
pfd
->
cFileName
[
0
]
=
'\0'
;
if
(
shortname
)
lstrcpynA
(
pfd
->
cAlternateFileName
,
shortname
,
MAX_PATH
);
else
pfd
->
cAlternateFileName
[
0
]
=
'\0'
;
}
return
NOERROR
;
...
...
@@ -1168,6 +1183,7 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
return
E_INVALIDARG
;
}
/*************************************************************************
* SHGetDataFromIDListW [SHELL32.248]
*
...
...
@@ -1184,20 +1200,31 @@ HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
{
case
SHGDFIL_FINDDATA
:
{
LPSTR
filename
,
shortname
;
WIN32_FIND_DATAW
*
pfd
=
dest
;
if
(
_ILIsDrive
(
pidl
))
return
E_INVALIDARG
;
if
(
len
<
(
int
)
sizeof
(
WIN32_FIND_DATAW
))
return
E_INVALIDARG
;
ZeroMemory
(
pfd
,
sizeof
(
WIN32_FIND_DATAA
));
_ILGetFileDateTime
(
pidl
,
&
(
pfd
->
ftLastWriteTime
));
pfd
->
dwFileAttributes
=
_ILGetFileAttributes
(
pidl
,
NULL
,
0
);
pfd
->
nFileSizeLow
=
_ILGetFileSize
(
pidl
,
NULL
,
0
);
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
_ILGetTextPointer
(
pidl
),
-
1
,
pfd
->
cFileName
,
MAX_PATH
))
pfd
->
cFileName
[
MAX_PATH
-
1
]
=
0
;
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
_ILGetSTextPointer
(
pidl
),
-
1
,
pfd
->
cAlternateFileName
,
14
))
pfd
->
cFileName
[
13
]
=
0
;
filename
=
_ILGetTextPointer
(
pidl
);
shortname
=
_ILGetSTextPointer
(
pidl
);
if
(
!
filename
)
pfd
->
cFileName
[
0
]
=
'\0'
;
else
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
pfd
->
cFileName
,
MAX_PATH
))
pfd
->
cFileName
[
MAX_PATH
-
1
]
=
0
;
if
(
!
shortname
)
pfd
->
cAlternateFileName
[
0
]
=
'\0'
;
else
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
shortname
,
-
1
,
pfd
->
cAlternateFileName
,
14
))
pfd
->
cAlternateFileName
[
13
]
=
0
;
}
return
NOERROR
;
case
SHGDFIL_NETRESOURCE
:
...
...
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