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
055d96b7
Commit
055d96b7
authored
Nov 01, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 01, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert SHELL32_BindToChild to Unicode and fix up the callers.
parent
2a02dd1f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
23 deletions
+19
-23
shfldr.h
dlls/shell32/shfldr.h
+1
-1
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+1
-4
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+3
-1
shlfolder.c
dlls/shell32/shlfolder.c
+14
-17
No files found.
dlls/shell32/shfldr.h
View file @
055d96b7
...
@@ -43,7 +43,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl,
...
@@ -43,7 +43,7 @@ HRESULT SHELL32_GetDisplayNameOfChild (IShellFolder2 * psf, LPCITEMIDLIST pidl,
DWORD
dwOutLen
);
DWORD
dwOutLen
);
HRESULT
SHELL32_BindToChild
(
LPCITEMIDLIST
pidlRoot
,
HRESULT
SHELL32_BindToChild
(
LPCITEMIDLIST
pidlRoot
,
LPCSTR
pathRoot
,
LPCITEMIDLIST
pidlComplete
,
REFIID
riid
,
LPVOID
*
ppvOut
);
LPC
W
STR
pathRoot
,
LPCITEMIDLIST
pidlComplete
,
REFIID
riid
,
LPVOID
*
ppvOut
);
HRESULT
SHELL32_CompareIDs
(
IShellFolder
*
iface
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
);
HRESULT
SHELL32_CompareIDs
(
IShellFolder
*
iface
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
);
LPITEMIDLIST
SHELL32_CreatePidlFromBindCtx
(
IBindCtx
*
pbc
,
LPCWSTR
path
);
LPITEMIDLIST
SHELL32_CreatePidlFromBindCtx
(
IBindCtx
*
pbc
,
LPCWSTR
path
);
...
...
dlls/shell32/shfldr_desktop.c
View file @
055d96b7
...
@@ -341,14 +341,11 @@ static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface,
...
@@ -341,14 +341,11 @@ static HRESULT WINAPI ISF_Desktop_fnBindToObject (IShellFolder2 * iface,
LPCITEMIDLIST
pidl
,
LPBC
pbcReserved
,
REFIID
riid
,
LPVOID
*
ppvOut
)
LPCITEMIDLIST
pidl
,
LPBC
pbcReserved
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
{
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
IGenericSFImpl
*
This
=
(
IGenericSFImpl
*
)
iface
;
char
szPath
[
MAX_PATH
];
TRACE
(
"(%p)->(pidl=%p,%p,%s,%p)
\n
"
,
TRACE
(
"(%p)->(pidl=%p,%p,%s,%p)
\n
"
,
This
,
pidl
,
pbcReserved
,
shdebugstr_guid
(
riid
),
ppvOut
);
This
,
pidl
,
pbcReserved
,
shdebugstr_guid
(
riid
),
ppvOut
);
WideCharToMultiByte
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
return
SHELL32_BindToChild
(
This
->
pidlRoot
,
This
->
sPathTarget
,
pidl
,
riid
,
ppvOut
);
szPath
,
MAX_PATH
,
NULL
,
NULL
);
return
SHELL32_BindToChild
(
This
->
pidlRoot
,
szPath
,
pidl
,
riid
,
ppvOut
);
}
}
/**************************************************************************
/**************************************************************************
...
...
dlls/shell32/shfldr_fs.c
View file @
055d96b7
...
@@ -481,11 +481,13 @@ IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl,
...
@@ -481,11 +481,13 @@ IShellFolder_fnBindToObject (IShellFolder2 * iface, LPCITEMIDLIST pidl,
LPBC
pbc
,
REFIID
riid
,
LPVOID
*
ppvOut
)
LPBC
pbc
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
{
IGenericSFImpl
*
This
=
impl_from_IShellFolder2
(
iface
);
IGenericSFImpl
*
This
=
impl_from_IShellFolder2
(
iface
);
WCHAR
szPath
[
MAX_PATH
];
TRACE
(
"(%p)->(pidl=%p,%p,%s,%p)
\n
"
,
This
,
pidl
,
pbc
,
TRACE
(
"(%p)->(pidl=%p,%p,%s,%p)
\n
"
,
This
,
pidl
,
pbc
,
shdebugstr_guid
(
riid
),
ppvOut
);
shdebugstr_guid
(
riid
),
ppvOut
);
return
SHELL32_BindToChild
(
This
->
pidlRoot
,
This
->
sPathTarget
,
pidl
,
riid
,
MultiByteToWideChar
(
CP_ACP
,
0
,
This
->
sPathTarget
,
-
1
,
szPath
,
MAX_PATH
);
return
SHELL32_BindToChild
(
This
->
pidlRoot
,
szPath
,
pidl
,
riid
,
ppvOut
);
ppvOut
);
}
}
...
...
dlls/shell32/shlfolder.c
View file @
055d96b7
...
@@ -192,12 +192,12 @@ HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc,
...
@@ -192,12 +192,12 @@ HRESULT SHELL32_ParseNextElement (IShellFolder2 * psf, HWND hwndOwner, LPBC pbc,
* pathRoot can be NULL for Folders beeing a drive.
* pathRoot can be NULL for Folders beeing a drive.
* In this case the absolute path is build from pidlChild (eg. C:)
* In this case the absolute path is build from pidlChild (eg. C:)
*/
*/
HRESULT
SHELL32_CoCreateInitSF
(
LPCITEMIDLIST
pidlRoot
,
LPC
STR
pathRoot
,
static
HRESULT
SHELL32_CoCreateInitSF
(
LPCITEMIDLIST
pidlRoot
,
LPCW
STR
pathRoot
,
LPCITEMIDLIST
pidlChild
,
REFCLSID
clsid
,
REFIID
riid
,
LPVOID
*
ppvOut
)
LPCITEMIDLIST
pidlChild
,
REFCLSID
clsid
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
{
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"%p %s %p
\n
"
,
pidlRoot
,
pathRoot
,
pidlChild
);
TRACE
(
"%p %s %p
\n
"
,
pidlRoot
,
debugstr_w
(
pathRoot
)
,
pidlChild
);
if
(
SUCCEEDED
((
hr
=
SHCoCreateInstance
(
NULL
,
clsid
,
NULL
,
riid
,
ppvOut
))))
{
if
(
SUCCEEDED
((
hr
=
SHCoCreateInstance
(
NULL
,
clsid
,
NULL
,
riid
,
ppvOut
))))
{
LPITEMIDLIST
pidlAbsolute
=
ILCombine
(
pidlRoot
,
pidlChild
);
LPITEMIDLIST
pidlAbsolute
=
ILCombine
(
pidlRoot
,
pidlChild
);
...
@@ -208,32 +208,29 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot,
...
@@ -208,32 +208,29 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot,
SUCCEEDED
(
IUnknown_QueryInterface
((
IUnknown
*
)
*
ppvOut
,
&
IID_IPersistFolder3
,
(
LPVOID
*
)
&
ppf
)))
SUCCEEDED
(
IUnknown_QueryInterface
((
IUnknown
*
)
*
ppvOut
,
&
IID_IPersistFolder3
,
(
LPVOID
*
)
&
ppf
)))
{
{
PERSIST_FOLDER_TARGET_INFO
ppfti
;
PERSIST_FOLDER_TARGET_INFO
ppfti
;
char
szDestPath
[
MAX_PATH
];
ZeroMemory
(
&
ppfti
,
sizeof
(
ppfti
));
ZeroMemory
(
&
ppfti
,
sizeof
(
ppfti
));
/* fill the PERSIST_FOLDER_TARGET_INFO */
ppfti
.
dwAttributes
=
-
1
;
ppfti
.
csidl
=
-
1
;
/* build path */
/* build path */
if
(
pathRoot
)
{
if
(
pathRoot
)
{
lstrcpyA
(
szDestPath
,
pathRoot
);
lstrcpynW
(
ppfti
.
szTargetParsingName
,
pathRoot
,
MAX_PATH
-
1
);
PathAddBackslashA
(
szDestPath
);
/* FIXME: why have drives a backslash here ? */
PathAddBackslashW
(
ppfti
.
szTargetParsingName
);
/* FIXME: why have drives a backslash here ? */
}
else
{
szDestPath
[
0
]
=
'\0'
;
}
}
if
(
pidlChild
)
{
if
(
pidlChild
)
{
LPSTR
pszChild
=
_ILGetTextPointer
(
pidlChild
);
LPCSTR
pszChild
=
_ILGetTextPointer
(
pidlChild
);
int
len
=
lstrlenW
(
ppfti
.
szTargetParsingName
);
if
(
pszChild
)
if
(
pszChild
)
lstrcatA
(
szDestPath
,
pszChild
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pszChild
,
-
1
,
ppfti
.
szTargetParsingName
+
len
,
MAX_PATH
-
len
);
else
else
hr
=
E_INVALIDARG
;
hr
=
E_INVALIDARG
;
}
}
/* fill the PERSIST_FOLDER_TARGET_INFO */
ppfti
.
dwAttributes
=
-
1
;
ppfti
.
csidl
=
-
1
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szDestPath
,
-
1
,
ppfti
.
szTargetParsingName
,
MAX_PATH
);
IPersistFolder3_InitializeEx
(
ppf
,
NULL
,
pidlAbsolute
,
&
ppfti
);
IPersistFolder3_InitializeEx
(
ppf
,
NULL
,
pidlAbsolute
,
&
ppfti
);
IPersistFolder3_Release
(
ppf
);
IPersistFolder3_Release
(
ppf
);
}
}
...
@@ -265,7 +262,7 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot,
...
@@ -265,7 +262,7 @@ HRESULT SHELL32_CoCreateInitSF (LPCITEMIDLIST pidlRoot, LPCSTR pathRoot,
* means you probably can't use it for your IShellFolder implementation.
* means you probably can't use it for your IShellFolder implementation.
*/
*/
HRESULT
SHELL32_BindToChild
(
LPCITEMIDLIST
pidlRoot
,
HRESULT
SHELL32_BindToChild
(
LPCITEMIDLIST
pidlRoot
,
LPCSTR
pathRoot
,
LPCITEMIDLIST
pidlComplete
,
REFIID
riid
,
LPVOID
*
ppvOut
)
LPC
W
STR
pathRoot
,
LPCITEMIDLIST
pidlComplete
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
{
GUID
const
*
clsid
;
GUID
const
*
clsid
;
IShellFolder
*
pSF
;
IShellFolder
*
pSF
;
...
@@ -290,10 +287,10 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
...
@@ -290,10 +287,10 @@ HRESULT SHELL32_BindToChild (LPCITEMIDLIST pidlRoot,
/* see if folder CLSID should be overridden by desktop.ini file */
/* see if folder CLSID should be overridden by desktop.ini file */
if
(
pathRoot
)
{
if
(
pathRoot
)
{
MultiByteToWideChar
(
CP_ACP
,
0
,
pathRoot
,
-
1
,
wszFolderPath
,
MAX_PATH
);
lstrcpynW
(
wszFolderPath
,
pathRoot
,
MAX_PATH
);
pwszPathTail
=
PathAddBackslashW
(
wszFolderPath
);
pwszPathTail
=
PathAddBackslashW
(
wszFolderPath
);
}
}
MultiByteToWideChar
(
CP_ACP
,
0
,
_ILGetTextPointer
(
pidlChild
),
-
1
,
pwszPathTail
,
MAX_PATH
);
MultiByteToWideChar
(
CP_ACP
,
0
,
_ILGetTextPointer
(
pidlChild
),
-
1
,
pwszPathTail
,
MAX_PATH
-
(
int
)(
pwszPathTail
-
wszFolderPath
)
);
if
(
SHELL32_GetCustomFolderAttributeFromPath
(
wszFolderPath
,
if
(
SHELL32_GetCustomFolderAttributeFromPath
(
wszFolderPath
,
wszDotShellClassInfo
,
wszCLSID
,
wszCLSIDValue
,
CHARS_IN_GUID
))
wszDotShellClassInfo
,
wszCLSID
,
wszCLSIDValue
,
CHARS_IN_GUID
))
CLSIDFromString
(
wszCLSIDValue
,
&
clsidFolder
);
CLSIDFromString
(
wszCLSIDValue
,
&
clsidFolder
);
...
...
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