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
f8a4f6b5
Commit
f8a4f6b5
authored
Feb 23, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Feb 23, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- handle IFileSystemBindData in ISF_Desktop_fnParseDisplayName
- more Unicode conversion
parent
14de5708
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
19 deletions
+34
-19
enumidlist.c
dlls/shell32/enumidlist.c
+16
-12
enumidlist.h
dlls/shell32/enumidlist.h
+1
-1
pidl.h
dlls/shell32/pidl.h
+1
-0
shfldr.h
dlls/shell32/shfldr.h
+1
-0
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+10
-5
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+5
-1
No files found.
dlls/shell32/enumidlist.c
View file @
f8a4f6b5
...
...
@@ -25,6 +25,7 @@
#define COBJMACROS
#include "wine/debug.h"
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
...
...
@@ -103,24 +104,27 @@ BOOL AddToEnumList(
*/
BOOL
CreateFolderEnumList
(
IEnumIDList
*
list
,
LPCSTR
lpszPath
,
LPC
W
STR
lpszPath
,
DWORD
dwFlags
)
{
LPITEMIDLIST
pidl
=
NULL
;
WIN32_FIND_DATA
A
stffile
;
WIN32_FIND_DATA
W
stffile
;
HANDLE
hFile
;
CHAR
szPath
[
MAX_PATH
];
W
CHAR
szPath
[
MAX_PATH
];
BOOL
succeeded
=
TRUE
;
const
static
WCHAR
stars
[]
=
{
'*'
,
'.'
,
'*'
,
0
};
const
static
WCHAR
dot
[]
=
{
'.'
,
0
};
const
static
WCHAR
dotdot
[]
=
{
'.'
,
'.'
,
0
};
TRACE
(
"(%p)->(path=%s flags=0x%08lx)
\n
"
,
list
,
debugstr_
a
(
lpszPath
),
dwFlags
);
TRACE
(
"(%p)->(path=%s flags=0x%08lx)
\n
"
,
list
,
debugstr_
w
(
lpszPath
),
dwFlags
);
if
(
!
lpszPath
||
!
lpszPath
[
0
])
return
FALSE
;
strcpy
(
szPath
,
lpszPath
);
PathAddBackslash
A
(
szPath
);
strcat
(
szPath
,
"*.*"
);
strcpy
W
(
szPath
,
lpszPath
);
PathAddBackslash
W
(
szPath
);
strcat
W
(
szPath
,
stars
);
hFile
=
FindFirstFile
A
(
szPath
,
&
stffile
);
hFile
=
FindFirstFile
W
(
szPath
,
&
stffile
);
if
(
hFile
!=
INVALID_HANDLE_VALUE
)
{
BOOL
findFinished
=
FALSE
;
...
...
@@ -132,21 +136,21 @@ BOOL CreateFolderEnumList(
{
if
(
(
stffile
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
dwFlags
&
SHCONTF_FOLDERS
&&
strcmp
(
stffile
.
cFileName
,
"."
)
&&
strcmp
(
stffile
.
cFileName
,
".."
))
strcmp
W
(
stffile
.
cFileName
,
dot
)
&&
strcmpW
(
stffile
.
cFileName
,
dotdot
))
{
pidl
=
_ILCreateFromFindData
A
(
&
stffile
);
pidl
=
_ILCreateFromFindData
W
(
&
stffile
);
succeeded
=
succeeded
&&
AddToEnumList
(
list
,
pidl
);
}
else
if
(
!
(
stffile
.
dwFileAttributes
&
FILE_ATTRIBUTE_DIRECTORY
)
&&
dwFlags
&
SHCONTF_NONFOLDERS
)
{
pidl
=
_ILCreateFromFindData
A
(
&
stffile
);
pidl
=
_ILCreateFromFindData
W
(
&
stffile
);
succeeded
=
succeeded
&&
AddToEnumList
(
list
,
pidl
);
}
}
if
(
succeeded
)
{
if
(
!
FindNextFile
A
(
hFile
,
&
stffile
))
if
(
!
FindNextFile
W
(
hFile
,
&
stffile
))
{
if
(
GetLastError
()
==
ERROR_NO_MORE_FILES
)
findFinished
=
TRUE
;
...
...
dlls/shell32/enumidlist.h
View file @
f8a4f6b5
...
...
@@ -25,6 +25,6 @@ BOOL AddToEnumList(IEnumIDList *list, LPITEMIDLIST pidl);
/* Enumerates the folders and/or files (depending on dwFlags) in lpszPath and
* adds them to the already-created list.
*/
BOOL
CreateFolderEnumList
(
IEnumIDList
*
list
,
LPCSTR
lpszPath
,
DWORD
dwFlags
);
BOOL
CreateFolderEnumList
(
IEnumIDList
*
list
,
LPC
W
STR
lpszPath
,
DWORD
dwFlags
);
#endif
/* ndef __ENUMIDLIST_H__ */
dlls/shell32/pidl.h
View file @
f8a4f6b5
...
...
@@ -208,6 +208,7 @@ LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid);
/* Like _ILCreateGuid, but using the string szGUID. */
LPITEMIDLIST
_ILCreateGuidFromStrA
(
LPCSTR
szGUID
);
LPITEMIDLIST
_ILCreateGuidFromStrW
(
LPCWSTR
szGUID
);
/* Commonly used PIDLs representing file system objects. */
LPITEMIDLIST
_ILCreateDesktop
(
void
);
...
...
dlls/shell32/shfldr.h
View file @
f8a4f6b5
...
...
@@ -46,6 +46,7 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
LPCSTR
pathRoot
,
LPCITEMIDLIST
pidlComplete
,
REFIID
riid
,
LPVOID
*
ppvOut
);
HRESULT
SHELL32_CompareIDs
(
IShellFolder
*
iface
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
);
LPITEMIDLIST
SHELL32_CreatePidlFromBindCtx
(
IBindCtx
*
pbc
,
LPCWSTR
path
);
static
inline
int
SHELL32_GUIDToStringA
(
REFGUID
guid
,
LPSTR
str
)
{
...
...
dlls/shell32/shfldr_desktop.c
View file @
f8a4f6b5
...
...
@@ -240,6 +240,11 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
pidlTemp
=
_ILCreateNetwork
();
szNext
=
lpszDisplayName
;
}
else
if
(
(
pidlTemp
=
SHELL32_CreatePidlFromBindCtx
(
pbc
,
lpszDisplayName
))
)
{
*
ppidl
=
pidlTemp
;
return
S_OK
;
}
else
{
/* it's a filesystem path on the desktop. Let a FSFolder parse it */
...
...
@@ -288,7 +293,7 @@ static HRESULT WINAPI ISF_Desktop_fnParseDisplayName (IShellFolder2 * iface,
static
BOOL
CreateDesktopEnumList
(
IEnumIDList
*
list
,
DWORD
dwFlags
)
{
BOOL
ret
=
TRUE
;
char
szPath
[
MAX_PATH
];
WCHAR
szPath
[
MAX_PATH
];
TRACE
(
"(%p)->(flags=0x%08lx)
\n
"
,
list
,
dwFlags
);
...
...
@@ -307,7 +312,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags)
0
,
KEY_READ
,
&
hkey
);
if
(
ret
&&
ERROR_SUCCESS
==
r
)
{
char
iid
[
50
];
WCHAR
iid
[
50
];
int
i
=
0
;
BOOL
moreKeys
=
TRUE
;
...
...
@@ -316,10 +321,10 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags)
DWORD
size
;
size
=
sizeof
(
iid
);
r
=
RegEnumKeyEx
A
(
hkey
,
i
,
iid
,
&
size
,
0
,
NULL
,
NULL
,
NULL
);
r
=
RegEnumKeyEx
W
(
hkey
,
i
,
iid
,
&
size
,
0
,
NULL
,
NULL
,
NULL
);
if
(
ERROR_SUCCESS
==
r
)
{
ret
=
AddToEnumList
(
list
,
_ILCreateGuidFromStr
A
(
iid
));
ret
=
AddToEnumList
(
list
,
_ILCreateGuidFromStr
W
(
iid
));
i
++
;
}
else
if
(
ERROR_NO_MORE_ITEMS
==
r
)
...
...
@@ -332,7 +337,7 @@ static BOOL CreateDesktopEnumList(IEnumIDList *list, DWORD dwFlags)
}
/* enumerate the elements in %windir%\desktop */
SHGetSpecialFolderPath
A
(
0
,
szPath
,
CSIDL_DESKTOPDIRECTORY
,
FALSE
);
SHGetSpecialFolderPath
W
(
0
,
szPath
,
CSIDL_DESKTOPDIRECTORY
,
FALSE
);
ret
=
ret
&&
CreateFolderEnumList
(
list
,
szPath
,
dwFlags
);
return
ret
;
...
...
dlls/shell32/shfldr_fs.c
View file @
f8a4f6b5
...
...
@@ -444,7 +444,11 @@ IShellFolder_fnEnumObjects (IShellFolder2 * iface, HWND hwndOwner, DWORD dwFlags
*
ppEnumIDList
=
IEnumIDList_Constructor
();
if
(
*
ppEnumIDList
)
CreateFolderEnumList
(
*
ppEnumIDList
,
This
->
sPathTarget
,
dwFlags
);
{
WCHAR
path
[
MAX_PATH
];
MultiByteToWideChar
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
path
,
MAX_PATH
);
CreateFolderEnumList
(
*
ppEnumIDList
,
path
,
dwFlags
);
}
TRACE
(
"-- (%p)->(new ID List: %p)
\n
"
,
This
,
*
ppEnumIDList
);
...
...
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