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
5cb72744
Commit
5cb72744
authored
Jul 04, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Use nameless unions/structs.
parent
7c1d8b29
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
90 additions
and
122 deletions
+90
-122
brsfolder.c
dlls/shell32/brsfolder.c
+1
-3
cpanelfolder.c
dlls/shell32/cpanelfolder.c
+4
-6
dataobject.c
dlls/shell32/dataobject.c
+5
-7
ebrowser.c
dlls/shell32/ebrowser.c
+3
-5
pidl.c
dlls/shell32/pidl.c
+3
-5
recyclebin.c
dlls/shell32/recyclebin.c
+2
-3
shellitem.c
dlls/shell32/shellitem.c
+9
-11
shelllink.c
dlls/shell32/shelllink.c
+3
-5
shellole.c
dlls/shell32/shellole.c
+3
-5
shellstring.c
dlls/shell32/shellstring.c
+8
-10
shfldr_desktop.c
dlls/shell32/shfldr_desktop.c
+5
-7
shfldr_fs.c
dlls/shell32/shfldr_fs.c
+10
-12
shfldr_mycomp.c
dlls/shell32/shfldr_mycomp.c
+9
-11
shlfolder.c
dlls/shell32/shlfolder.c
+8
-10
shlview.c
dlls/shell32/shlview.c
+3
-4
shlview_cmenu.c
dlls/shell32/shlview_cmenu.c
+11
-13
systray.c
dlls/shell32/systray.c
+3
-5
No files found.
dlls/shell32/brsfolder.c
View file @
5cb72744
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "wine/debug.h"
#include "wine/debug.h"
#include "pidl.h"
#include "pidl.h"
#include "shell32_main.h"
#include "shell32_main.h"
...
@@ -384,7 +382,7 @@ static HTREEITEM InsertTreeViewItem( browse_info *info, IShellFolder * lpsf,
...
@@ -384,7 +382,7 @@ static HTREEITEM InsertTreeViewItem( browse_info *info, IShellFolder * lpsf,
lptvid
->
pEnumIL
=
pEnumIL
;
lptvid
->
pEnumIL
=
pEnumIL
;
GetNormalAndSelectedIcons
(
lptvid
->
lpifq
,
&
tvi
);
GetNormalAndSelectedIcons
(
lptvid
->
lpifq
,
&
tvi
);
tvins
.
u
.
item
=
tvi
;
tvins
.
item
=
tvi
;
tvins
.
hInsertAfter
=
NULL
;
tvins
.
hInsertAfter
=
NULL
;
tvins
.
hParent
=
hParent
;
tvins
.
hParent
=
hParent
;
...
...
dlls/shell32/cpanelfolder.c
View file @
5cb72744
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -715,7 +713,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 *iface,
...
@@ -715,7 +713,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDisplayNameOf(IShellFolder2 *iface,
}
}
strRet
->
uType
=
STRRET_CSTR
;
strRet
->
uType
=
STRRET_CSTR
;
lstrcpynA
(
strRet
->
u
.
cStr
,
szPath
,
MAX_PATH
);
lstrcpynA
(
strRet
->
cStr
,
szPath
,
MAX_PATH
);
TRACE
(
"--(%p)->(%s)
\n
"
,
This
,
szPath
);
TRACE
(
"--(%p)->(%s)
\n
"
,
This
,
szPath
);
return
S_OK
;
return
S_OK
;
...
@@ -799,7 +797,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 *iface, LPCI
...
@@ -799,7 +797,7 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 *iface, LPCI
if
(
!
pidl
)
if
(
!
pidl
)
return
SHELL32_GetColumnDetails
(
ControlPanelSFHeader
,
iColumn
,
psd
);
return
SHELL32_GetColumnDetails
(
ControlPanelSFHeader
,
iColumn
,
psd
);
psd
->
str
.
u
.
cStr
[
0
]
=
0x00
;
psd
->
str
.
cStr
[
0
]
=
0x00
;
psd
->
str
.
uType
=
STRRET_CSTR
;
psd
->
str
.
uType
=
STRRET_CSTR
;
switch
(
iColumn
)
switch
(
iColumn
)
{
{
...
@@ -807,9 +805,9 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 *iface, LPCI
...
@@ -807,9 +805,9 @@ static HRESULT WINAPI ISF_ControlPanel_fnGetDetailsOf(IShellFolder2 *iface, LPCI
pcpanel
=
_ILGetCPanelPointer
(
pidl
);
pcpanel
=
_ILGetCPanelPointer
(
pidl
);
if
(
pcpanel
)
if
(
pcpanel
)
lstrcpyA
(
psd
->
str
.
u
.
cStr
,
pcpanel
->
szName
+
pcpanel
->
offsComment
);
lstrcpyA
(
psd
->
str
.
cStr
,
pcpanel
->
szName
+
pcpanel
->
offsComment
);
else
else
_ILGetFileType
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileType
(
pidl
,
psd
->
str
.
cStr
,
MAX_PATH
);
break
;
break
;
default:
default:
...
...
dlls/shell32/dataobject.c
View file @
5cb72744
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "wingdi.h"
#include "wingdi.h"
#include "pidl.h"
#include "pidl.h"
...
@@ -295,29 +293,29 @@ static HRESULT WINAPI IDataObject_fnGetData(IDataObject *iface, LPFORMATETC pfor
...
@@ -295,29 +293,29 @@ static HRESULT WINAPI IDataObject_fnGetData(IDataObject *iface, LPFORMATETC pfor
if
(
pformatetcIn
->
cfFormat
==
This
->
cfShellIDList
)
if
(
pformatetcIn
->
cfFormat
==
This
->
cfShellIDList
)
{
{
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
pmedium
->
u
.
hGlobal
=
RenderSHELLIDLIST
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
pmedium
->
hGlobal
=
RenderSHELLIDLIST
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
}
}
else
if
(
pformatetcIn
->
cfFormat
==
CF_HDROP
)
else
if
(
pformatetcIn
->
cfFormat
==
CF_HDROP
)
{
{
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
pmedium
->
u
.
hGlobal
=
RenderHDROP
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
pmedium
->
hGlobal
=
RenderHDROP
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
}
}
else
if
(
pformatetcIn
->
cfFormat
==
This
->
cfFileNameA
)
else
if
(
pformatetcIn
->
cfFormat
==
This
->
cfFileNameA
)
{
{
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
pmedium
->
u
.
hGlobal
=
RenderFILENAMEA
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
pmedium
->
hGlobal
=
RenderFILENAMEA
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
}
}
else
if
(
pformatetcIn
->
cfFormat
==
This
->
cfFileNameW
)
else
if
(
pformatetcIn
->
cfFormat
==
This
->
cfFileNameW
)
{
{
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
if
(
This
->
cidl
<
1
)
return
(
E_UNEXPECTED
);
pmedium
->
u
.
hGlobal
=
RenderFILENAMEW
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
pmedium
->
hGlobal
=
RenderFILENAMEW
(
This
->
pidl
,
This
->
apidl
,
This
->
cidl
);
}
}
else
else
{
{
FIXME
(
"-- expected clipformat not implemented
\n
"
);
FIXME
(
"-- expected clipformat not implemented
\n
"
);
return
(
E_INVALIDARG
);
return
(
E_INVALIDARG
);
}
}
if
(
pmedium
->
u
.
hGlobal
)
if
(
pmedium
->
hGlobal
)
{
{
pmedium
->
tymed
=
TYMED_HGLOBAL
;
pmedium
->
tymed
=
TYMED_HGLOBAL
;
pmedium
->
pUnkForRelease
=
NULL
;
pmedium
->
pUnkForRelease
=
NULL
;
...
...
dlls/shell32/ebrowser.c
View file @
5cb72744
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include <stdarg.h>
#include <stdarg.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -1557,7 +1555,7 @@ static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3 *ifac
...
@@ -1557,7 +1555,7 @@ static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3 *ifac
IDataObject_Release
(
pdo
);
IDataObject_Release
(
pdo
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
LPIDA
pida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pida
=
GlobalLock
(
medium
.
hGlobal
);
LPCITEMIDLIST
pidl_child
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
1
]);
LPCITEMIDLIST
pidl_child
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
1
]);
/* Handle folders by browsing to them. */
/* Handle folders by browsing to them. */
...
@@ -1566,8 +1564,8 @@ static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3 *ifac
...
@@ -1566,8 +1564,8 @@ static HRESULT WINAPI ICommDlgBrowser3_fnOnDefaultCommand(ICommDlgBrowser3 *ifac
IExplorerBrowser_BrowseToIDList
(
&
This
->
IExplorerBrowser_iface
,
pidl_child
,
SBSP_RELATIVE
);
IExplorerBrowser_BrowseToIDList
(
&
This
->
IExplorerBrowser_iface
,
pidl_child
,
SBSP_RELATIVE
);
ret
=
S_OK
;
ret
=
S_OK
;
}
}
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
else
else
ERR
(
"Failed to get data from IDataObject.
\n
"
);
ERR
(
"Failed to get data from IDataObject.
\n
"
);
...
...
dlls/shell32/pidl.c
View file @
5cb72744
...
@@ -28,8 +28,6 @@
...
@@ -28,8 +28,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winreg.h"
#include "winreg.h"
...
@@ -728,7 +726,7 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
...
@@ -728,7 +726,7 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
{
{
/*assert(pida->cidl==1);*/
/*assert(pida->cidl==1);*/
LPIDA
pida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pida
=
GlobalLock
(
medium
.
hGlobal
);
LPCITEMIDLIST
pidl_folder
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
0
]);
LPCITEMIDLIST
pidl_folder
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
0
]);
LPCITEMIDLIST
pidl_child
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
1
]);
LPCITEMIDLIST
pidl_child
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pida
+
pida
->
aoffset
[
1
]);
...
@@ -738,8 +736,8 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
...
@@ -738,8 +736,8 @@ HRESULT WINAPI SHGetRealIDL(LPSHELLFOLDER lpsf, LPCITEMIDLIST pidlSimple, LPITEM
if
(
!*
pidlReal
)
if
(
!*
pidlReal
)
hr
=
E_OUTOFMEMORY
;
hr
=
E_OUTOFMEMORY
;
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
}
}
...
...
dlls/shell32/recyclebin.c
View file @
5cb72744
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
*/
*/
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include <stdarg.h>
#include <stdarg.h>
...
@@ -915,7 +914,7 @@ static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMID
...
@@ -915,7 +914,7 @@ static HRESULT WINAPI RecycleBin_GetDisplayNameOf(IShellFolder2 *This, LPCITEMID
TRACE
(
"(%p, %p, %lx, %p)
\n
"
,
This
,
pidl
,
uFlags
,
pName
);
TRACE
(
"(%p, %p, %lx, %p)
\n
"
,
This
,
pidl
,
uFlags
,
pName
);
pName
->
uType
=
STRRET_WSTR
;
pName
->
uType
=
STRRET_WSTR
;
return
SHStrDupW
(
PathFindFileNameW
(
data
->
cFileName
),
&
pName
->
u
.
pOleStr
);
return
SHStrDupW
(
PathFindFileNameW
(
data
->
cFileName
),
&
pName
->
pOleStr
);
}
}
static
HRESULT
WINAPI
RecycleBin_SetNameOf
(
IShellFolder2
*
This
,
HWND
hwnd
,
LPCITEMIDLIST
pidl
,
LPCOLESTR
pszName
,
static
HRESULT
WINAPI
RecycleBin_SetNameOf
(
IShellFolder2
*
This
,
HWND
hwnd
,
LPCITEMIDLIST
pidl
,
LPCOLESTR
pszName
,
...
@@ -1032,7 +1031,7 @@ static HRESULT WINAPI RecycleBin_GetDetailsOf(IShellFolder2 *iface, LPCITEMIDLIS
...
@@ -1032,7 +1031,7 @@ static HRESULT WINAPI RecycleBin_GetDetailsOf(IShellFolder2 *iface, LPCITEMIDLIS
}
}
pDetails
->
str
.
uType
=
STRRET_WSTR
;
pDetails
->
str
.
uType
=
STRRET_WSTR
;
return
SHStrDupW
(
buffer
,
&
pDetails
->
str
.
u
.
pOleStr
);
return
SHStrDupW
(
buffer
,
&
pDetails
->
str
.
pOleStr
);
}
}
static
HRESULT
WINAPI
RecycleBin_MapColumnToSCID
(
IShellFolder2
*
iface
,
UINT
iColumn
,
SHCOLUMNID
*
pscid
)
static
HRESULT
WINAPI
RecycleBin_MapColumnToSCID
(
IShellFolder2
*
iface
,
UINT
iColumn
,
SHCOLUMNID
*
pscid
)
...
...
dlls/shell32/shellitem.c
View file @
5cb72744
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <stdarg.h>
#include <stdarg.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -827,7 +825,7 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
...
@@ -827,7 +825,7 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
ret
=
IDataObject_GetData
(
pdtobj
,
&
fmt
,
&
medium
);
ret
=
IDataObject_GetData
(
pdtobj
,
&
fmt
,
&
medium
);
if
(
SUCCEEDED
(
ret
))
if
(
SUCCEEDED
(
ret
))
{
{
LPIDA
pida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pida
=
GlobalLock
(
medium
.
hGlobal
);
if
((
pida
->
cidl
>
1
&&
!
(
dwFlags
&
DOGIF_ONLY_IF_ONE
))
||
if
((
pida
->
cidl
>
1
&&
!
(
dwFlags
&
DOGIF_ONLY_IF_ONE
))
||
pida
->
cidl
==
1
)
pida
->
cidl
==
1
)
...
@@ -846,8 +844,8 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
...
@@ -846,8 +844,8 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
ret
=
E_FAIL
;
ret
=
E_FAIL
;
}
}
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
if
(
FAILED
(
ret
)
&&
!
(
dwFlags
&
DOGIF_NO_HDROP
))
if
(
FAILED
(
ret
)
&&
!
(
dwFlags
&
DOGIF_NO_HDROP
))
...
@@ -863,7 +861,7 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
...
@@ -863,7 +861,7 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
ret
=
IDataObject_GetData
(
pdtobj
,
&
fmt
,
&
medium
);
ret
=
IDataObject_GetData
(
pdtobj
,
&
fmt
,
&
medium
);
if
(
SUCCEEDED
(
ret
))
if
(
SUCCEEDED
(
ret
))
{
{
DROPFILES
*
df
=
GlobalLock
(
medium
.
u
.
hGlobal
);
DROPFILES
*
df
=
GlobalLock
(
medium
.
hGlobal
);
LPBYTE
files
=
(
LPBYTE
)
df
+
df
->
pFiles
;
LPBYTE
files
=
(
LPBYTE
)
df
+
df
->
pFiles
;
BOOL
multiple_files
=
FALSE
;
BOOL
multiple_files
=
FALSE
;
...
@@ -891,8 +889,8 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
...
@@ -891,8 +889,8 @@ HRESULT WINAPI SHGetItemFromDataObject(IDataObject *pdtobj,
ret
=
SHCreateItemFromParsingName
(
first_file
,
NULL
,
riid
,
ppv
);
ret
=
SHCreateItemFromParsingName
(
first_file
,
NULL
,
riid
,
ppv
);
}
}
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
}
}
...
@@ -1405,7 +1403,7 @@ HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID rii
...
@@ -1405,7 +1403,7 @@ HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID rii
ret
=
IDataObject_GetData
(
pdo
,
&
fmt
,
&
medium
);
ret
=
IDataObject_GetData
(
pdo
,
&
fmt
,
&
medium
);
if
(
SUCCEEDED
(
ret
))
if
(
SUCCEEDED
(
ret
))
{
{
LPIDA
pida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pida
=
GlobalLock
(
medium
.
hGlobal
);
LPCITEMIDLIST
parent_pidl
;
LPCITEMIDLIST
parent_pidl
;
LPCITEMIDLIST
*
children
;
LPCITEMIDLIST
*
children
;
UINT
i
;
UINT
i
;
...
@@ -1421,8 +1419,8 @@ HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID rii
...
@@ -1421,8 +1419,8 @@ HRESULT WINAPI SHCreateShellItemArrayFromDataObject(IDataObject *pdo, REFIID rii
heap_free
(
children
);
heap_free
(
children
);
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
GlobalFree
(
medium
.
u
.
hGlobal
);
GlobalFree
(
medium
.
hGlobal
);
}
}
if
(
SUCCEEDED
(
ret
))
if
(
SUCCEEDED
(
ret
))
...
...
dlls/shell32/shelllink.c
View file @
5cb72744
...
@@ -33,8 +33,6 @@
...
@@ -33,8 +33,6 @@
*/
*/
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "wine/debug.h"
#include "wine/debug.h"
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
...
@@ -2369,19 +2367,19 @@ ShellLink_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder,
...
@@ -2369,19 +2367,19 @@ ShellLink_ExtInit_Initialize( IShellExtInit* iface, LPCITEMIDLIST pidlFolder,
if
(
FAILED
(
IDataObject_GetData
(
pdtobj
,
&
format
,
&
stgm
)
)
)
if
(
FAILED
(
IDataObject_GetData
(
pdtobj
,
&
format
,
&
stgm
)
)
)
return
r
;
return
r
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
-
1
,
NULL
,
0
);
count
=
DragQueryFileW
(
stgm
.
hGlobal
,
-
1
,
NULL
,
0
);
if
(
count
==
1
)
if
(
count
==
1
)
{
{
LPWSTR
path
;
LPWSTR
path
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
0
,
NULL
,
0
);
count
=
DragQueryFileW
(
stgm
.
hGlobal
,
0
,
NULL
,
0
);
count
++
;
count
++
;
path
=
malloc
(
count
*
sizeof
(
WCHAR
)
);
path
=
malloc
(
count
*
sizeof
(
WCHAR
)
);
if
(
path
)
if
(
path
)
{
{
IPersistFile
*
pf
=
&
This
->
IPersistFile_iface
;
IPersistFile
*
pf
=
&
This
->
IPersistFile_iface
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
0
,
path
,
count
);
count
=
DragQueryFileW
(
stgm
.
hGlobal
,
0
,
path
,
count
);
r
=
IPersistFile_Load
(
pf
,
path
,
0
);
r
=
IPersistFile_Load
(
pf
,
path
,
0
);
free
(
path
);
free
(
path
);
}
}
...
...
dlls/shell32/shellole.c
View file @
5cb72744
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "shellapi.h"
#include "shellapi.h"
...
@@ -699,7 +697,7 @@ HRESULT WINAPI SHPropStgCreate(IPropertySetStorage *psstg, REFFMTID fmtid,
...
@@ -699,7 +697,7 @@ HRESULT WINAPI SHPropStgCreate(IPropertySetStorage *psstg, REFFMTID fmtid,
if
(
puCodePage
)
{
if
(
puCodePage
)
{
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
u
.
propid
=
PID_CODEPAGE
;
prop
.
propid
=
PID_CODEPAGE
;
hres
=
IPropertyStorage_ReadMultiple
(
*
ppstg
,
1
,
&
prop
,
&
ret
);
hres
=
IPropertyStorage_ReadMultiple
(
*
ppstg
,
1
,
&
prop
,
&
ret
);
if
(
FAILED
(
hres
)
||
ret
.
vt
!=
VT_I2
)
if
(
FAILED
(
hres
)
||
ret
.
vt
!=
VT_I2
)
*
puCodePage
=
0
;
*
puCodePage
=
0
;
...
@@ -732,7 +730,7 @@ HRESULT WINAPI SHPropStgReadMultiple(IPropertyStorage *pps, UINT uCodePage,
...
@@ -732,7 +730,7 @@ HRESULT WINAPI SHPropStgReadMultiple(IPropertyStorage *pps, UINT uCodePage,
PROPVARIANT
ret
;
PROPVARIANT
ret
;
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
u
.
propid
=
PID_CODEPAGE
;
prop
.
propid
=
PID_CODEPAGE
;
hres
=
IPropertyStorage_ReadMultiple
(
pps
,
1
,
&
prop
,
&
ret
);
hres
=
IPropertyStorage_ReadMultiple
(
pps
,
1
,
&
prop
,
&
ret
);
if
(
FAILED
(
hres
)
||
ret
.
vt
!=
VT_I2
)
if
(
FAILED
(
hres
)
||
ret
.
vt
!=
VT_I2
)
return
S_OK
;
return
S_OK
;
...
@@ -771,7 +769,7 @@ HRESULT WINAPI SHPropStgWriteMultiple(IPropertyStorage *pps, UINT *uCodePage,
...
@@ -771,7 +769,7 @@ HRESULT WINAPI SHPropStgWriteMultiple(IPropertyStorage *pps, UINT *uCodePage,
PROPVARIANT
ret
;
PROPVARIANT
ret
;
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
ulKind
=
PRSPEC_PROPID
;
prop
.
u
.
propid
=
PID_CODEPAGE
;
prop
.
propid
=
PID_CODEPAGE
;
hres
=
IPropertyStorage_ReadMultiple
(
pps
,
1
,
&
prop
,
&
ret
);
hres
=
IPropertyStorage_ReadMultiple
(
pps
,
1
,
&
prop
,
&
ret
);
if
(
FAILED
(
hres
))
if
(
FAILED
(
hres
))
return
hres
;
return
hres
;
...
...
dlls/shell32/shellstring.c
View file @
5cb72744
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <ctype.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdlib.h>
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winnls.h"
#include "winnls.h"
...
@@ -67,14 +65,14 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
...
@@ -67,14 +65,14 @@ BOOL WINAPI StrRetToStrNA(LPSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
switch
(
src
->
uType
)
switch
(
src
->
uType
)
{
{
case
STRRET_WSTR
:
case
STRRET_WSTR
:
WideCharToMultiByte
(
CP_ACP
,
0
,
src
->
u
.
pOleStr
,
-
1
,
dest
,
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
src
->
pOleStr
,
-
1
,
dest
,
len
,
NULL
,
NULL
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
break
;
case
STRRET_CSTR
:
case
STRRET_CSTR
:
lstrcpynA
(
dest
,
src
->
u
.
cStr
,
len
);
lstrcpynA
(
dest
,
src
->
cStr
,
len
);
break
;
break
;
case
STRRET_OFFSET
:
case
STRRET_OFFSET
:
lstrcpynA
(
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
u
Offset
,
len
);
lstrcpynA
(
dest
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
uOffset
,
len
);
break
;
break
;
default:
default:
FIXME
(
"unknown type %u!
\n
"
,
src
->
uType
);
FIXME
(
"unknown type %u!
\n
"
,
src
->
uType
);
...
@@ -98,15 +96,15 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
...
@@ -98,15 +96,15 @@ BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST
switch
(
src
->
uType
)
switch
(
src
->
uType
)
{
{
case
STRRET_WSTR
:
case
STRRET_WSTR
:
lstrcpynW
(
dest
,
src
->
u
.
pOleStr
,
len
);
lstrcpynW
(
dest
,
src
->
pOleStr
,
len
);
CoTaskMemFree
(
src
->
u
.
pOleStr
);
CoTaskMemFree
(
src
->
pOleStr
);
break
;
break
;
case
STRRET_CSTR
:
case
STRRET_CSTR
:
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
u
.
cStr
,
-
1
,
dest
,
len
)
&&
len
)
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
src
->
cStr
,
-
1
,
dest
,
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
dest
[
len
-
1
]
=
0
;
break
;
break
;
case
STRRET_OFFSET
:
case
STRRET_OFFSET
:
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
u
.
u
Offset
,
-
1
,
dest
,
len
)
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
((
LPCSTR
)
&
pidl
->
mkid
)
+
src
->
uOffset
,
-
1
,
dest
,
len
)
&&
len
)
&&
len
)
dest
[
len
-
1
]
=
0
;
dest
[
len
-
1
]
=
0
;
break
;
break
;
...
...
dlls/shell32/shfldr_desktop.c
View file @
5cb72744
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -690,23 +688,23 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
...
@@ -690,23 +688,23 @@ static HRESULT WINAPI ISF_Desktop_fnGetDisplayNameOf (IShellFolder2 * iface,
if
(
GetVersion
()
&
0x80000000
)
if
(
GetVersion
()
&
0x80000000
)
{
{
strRet
->
uType
=
STRRET_CSTR
;
strRet
->
uType
=
STRRET_CSTR
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
cStr
,
MAX_PATH
,
NULL
,
NULL
))
NULL
,
NULL
))
strRet
->
u
.
cStr
[
0
]
=
'\0'
;
strRet
->
cStr
[
0
]
=
'\0'
;
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
}
}
else
else
{
{
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
u
.
pOleStr
=
pszPath
;
strRet
->
pOleStr
=
pszPath
;
}
}
}
}
else
else
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
TRACE
(
"-- (%p)->(%s,0x%08lx)
\n
"
,
This
,
TRACE
(
"-- (%p)->(%s,0x%08lx)
\n
"
,
This
,
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
u
.
cStr
:
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
cStr
:
debugstr_w
(
strRet
->
u
.
pOleStr
),
hr
);
debugstr_w
(
strRet
->
pOleStr
),
hr
);
return
hr
;
return
hr
;
}
}
...
...
dlls/shell32/shfldr_fs.c
View file @
5cb72744
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -891,18 +889,18 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
...
@@ -891,18 +889,18 @@ IShellFolder_fnGetDisplayNameOf (IShellFolder2 * iface, LPCITEMIDLIST pidl,
/* Win9x always returns ANSI strings, NT always returns Unicode strings */
/* Win9x always returns ANSI strings, NT always returns Unicode strings */
if
(
GetVersion
()
&
0x80000000
)
{
if
(
GetVersion
()
&
0x80000000
)
{
strRet
->
uType
=
STRRET_CSTR
;
strRet
->
uType
=
STRRET_CSTR
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
cStr
,
MAX_PATH
,
NULL
,
NULL
))
NULL
,
NULL
))
strRet
->
u
.
cStr
[
0
]
=
'\0'
;
strRet
->
cStr
[
0
]
=
'\0'
;
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
}
else
{
}
else
{
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
u
.
pOleStr
=
pszPath
;
strRet
->
pOleStr
=
pszPath
;
}
}
}
else
}
else
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
u
.
cStr
:
debugstr_w
(
strRet
->
u
.
pOleStr
));
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
cStr
:
debugstr_w
(
strRet
->
pOleStr
));
return
hr
;
return
hr
;
}
}
...
@@ -1730,13 +1728,13 @@ ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject,
...
@@ -1730,13 +1728,13 @@ ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject,
if
(
_ILIsFolder
(
ILFindLastID
(
This
->
pidlRoot
))
&&
/* Only drop to folders, not to files */
if
(
_ILIsFolder
(
ILFindLastID
(
This
->
pidlRoot
))
&&
/* Only drop to folders, not to files */
SUCCEEDED
(
IDataObject_GetData
(
pDataObject
,
&
format
,
&
medium
)))
/* Only ShellIDList format */
SUCCEEDED
(
IDataObject_GetData
(
pDataObject
,
&
format
,
&
medium
)))
/* Only ShellIDList format */
{
{
LPIDA
pidaShellIDList
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pidaShellIDList
=
GlobalLock
(
medium
.
hGlobal
);
This
->
drop_effects_mask
|=
DROPEFFECT_COPY
|
DROPEFFECT_LINK
;
This
->
drop_effects_mask
|=
DROPEFFECT_COPY
|
DROPEFFECT_LINK
;
if
(
pidaShellIDList
)
{
/* Files can only be moved between two different folders */
if
(
pidaShellIDList
)
{
/* Files can only be moved between two different folders */
if
(
!
ILIsEqual
(
HIDA_GetPIDLFolder
(
pidaShellIDList
),
This
->
pidlRoot
))
if
(
!
ILIsEqual
(
HIDA_GetPIDLFolder
(
pidaShellIDList
),
This
->
pidlRoot
))
This
->
drop_effects_mask
|=
DROPEFFECT_MOVE
;
This
->
drop_effects_mask
|=
DROPEFFECT_MOVE
;
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
}
}
}
}
...
@@ -1790,7 +1788,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
...
@@ -1790,7 +1788,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
if
(
medium
.
tymed
==
TYMED_HGLOBAL
)
{
if
(
medium
.
tymed
==
TYMED_HGLOBAL
)
{
IShellFolder
*
psfSourceFolder
,
*
psfDesktopFolder
;
IShellFolder
*
psfSourceFolder
,
*
psfDesktopFolder
;
LPIDA
pidaShellIDList
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
pidaShellIDList
=
GlobalLock
(
medium
.
hGlobal
);
STRRET
strret
;
STRRET
strret
;
UINT
i
;
UINT
i
;
...
@@ -1799,7 +1797,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
...
@@ -1799,7 +1797,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
hr
=
SHGetDesktopFolder
(
&
psfDesktopFolder
);
hr
=
SHGetDesktopFolder
(
&
psfDesktopFolder
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
return
hr
;
return
hr
;
}
}
...
@@ -1807,7 +1805,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
...
@@ -1807,7 +1805,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfSourceFolder
);
&
IID_IShellFolder
,
(
LPVOID
*
)
&
psfSourceFolder
);
IShellFolder_Release
(
psfDesktopFolder
);
IShellFolder_Release
(
psfDesktopFolder
);
if
(
FAILED
(
hr
))
{
if
(
FAILED
(
hr
))
{
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
return
hr
;
return
hr
;
}
}
...
@@ -1837,7 +1835,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
...
@@ -1837,7 +1835,7 @@ ISFDropTarget_Drop (IDropTarget * iface, IDataObject * pDataObject,
}
}
IShellFolder_Release
(
psfSourceFolder
);
IShellFolder_Release
(
psfSourceFolder
);
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
return
hr
;
return
hr
;
}
}
...
...
dlls/shell32/shfldr_mycomp.c
View file @
5cb72744
...
@@ -25,8 +25,6 @@
...
@@ -25,8 +25,6 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -703,21 +701,21 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
...
@@ -703,21 +701,21 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDisplayNameOf (IShellFolder2 *iface,
if
(
GetVersion
()
&
0x80000000
)
if
(
GetVersion
()
&
0x80000000
)
{
{
strRet
->
uType
=
STRRET_CSTR
;
strRet
->
uType
=
STRRET_CSTR
;
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
u
.
cStr
,
MAX_PATH
,
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
pszPath
,
-
1
,
strRet
->
cStr
,
MAX_PATH
,
NULL
,
NULL
))
NULL
,
NULL
))
strRet
->
u
.
cStr
[
0
]
=
'\0'
;
strRet
->
cStr
[
0
]
=
'\0'
;
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
}
}
else
else
{
{
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
uType
=
STRRET_WSTR
;
strRet
->
u
.
pOleStr
=
pszPath
;
strRet
->
pOleStr
=
pszPath
;
}
}
}
}
else
else
CoTaskMemFree
(
pszPath
);
CoTaskMemFree
(
pszPath
);
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
u
.
cStr
:
debugstr_w
(
strRet
->
u
.
pOleStr
));
TRACE
(
"-- (%p)->(%s)
\n
"
,
This
,
strRet
->
uType
==
STRRET_CSTR
?
strRet
->
cStr
:
debugstr_w
(
strRet
->
pOleStr
));
return
hr
;
return
hr
;
}
}
...
@@ -806,7 +804,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
...
@@ -806,7 +804,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
if
(
!
pidl
)
if
(
!
pidl
)
return
SHELL32_GetColumnDetails
(
mycomputer_header
,
iColumn
,
psd
);
return
SHELL32_GetColumnDetails
(
mycomputer_header
,
iColumn
,
psd
);
psd
->
str
.
u
.
cStr
[
0
]
=
0
;
psd
->
str
.
cStr
[
0
]
=
0
;
psd
->
str
.
uType
=
STRRET_CSTR
;
psd
->
str
.
uType
=
STRRET_CSTR
;
switch
(
iColumn
)
switch
(
iColumn
)
...
@@ -820,8 +818,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
...
@@ -820,8 +818,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
break
;
break
;
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
psd
->
str
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
u
.
pOleStr
,
MAX_PATH
);
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
pOleStr
,
MAX_PATH
);
break
;
break
;
case
3
:
/* free size */
case
3
:
/* free size */
if
(
!
_ILIsDrive
(
pidl
))
if
(
!
_ILIsDrive
(
pidl
))
...
@@ -832,8 +830,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
...
@@ -832,8 +830,8 @@ static HRESULT WINAPI ISF_MyComputer_fnGetDetailsOf (IShellFolder2 *iface,
break
;
break
;
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
uType
=
STRRET_WSTR
;
psd
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
psd
->
str
.
pOleStr
=
CoTaskMemAlloc
((
MAX_PATH
+
1
)
*
sizeof
(
WCHAR
));
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
u
.
pOleStr
,
MAX_PATH
);
StrFormatByteSizeW
(
bytes
.
QuadPart
,
psd
->
str
.
pOleStr
,
MAX_PATH
);
break
;
break
;
default:
default:
return
shellfolder_get_file_details
(
iface
,
pidl
,
mycomputer_header
,
iColumn
,
psd
);
return
shellfolder_get_file_details
(
iface
,
pidl
,
mycomputer_header
,
iColumn
,
psd
);
...
...
dlls/shell32/shlfolder.c
View file @
5cb72744
...
@@ -27,8 +27,6 @@
...
@@ -27,8 +27,6 @@
#include <stdio.h>
#include <stdio.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -544,16 +542,16 @@ HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS
...
@@ -544,16 +542,16 @@ HRESULT SHELL32_GetColumnDetails(const shvheader *data, int column, SHELLDETAILS
if
(
SHELL_OsIsUnicode
())
if
(
SHELL_OsIsUnicode
())
{
{
details
->
str
.
u
.
pOleStr
=
CoTaskMemAlloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
details
->
str
.
pOleStr
=
CoTaskMemAlloc
(
MAX_PATH
*
sizeof
(
WCHAR
));
if
(
!
details
->
str
.
u
.
pOleStr
)
return
E_OUTOFMEMORY
;
if
(
!
details
->
str
.
pOleStr
)
return
E_OUTOFMEMORY
;
details
->
str
.
uType
=
STRRET_WSTR
;
details
->
str
.
uType
=
STRRET_WSTR
;
LoadStringW
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
u
.
pOleStr
,
MAX_PATH
);
LoadStringW
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
pOleStr
,
MAX_PATH
);
}
}
else
else
{
{
details
->
str
.
uType
=
STRRET_CSTR
;
details
->
str
.
uType
=
STRRET_CSTR
;
LoadStringA
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
u
.
cStr
,
MAX_PATH
);
LoadStringA
(
shell32_hInstance
,
data
[
column
].
colnameid
,
details
->
str
.
cStr
,
MAX_PATH
);
}
}
return
S_OK
;
return
S_OK
;
...
@@ -583,16 +581,16 @@ HRESULT shellfolder_get_file_details(IShellFolder2 *iface, LPCITEMIDLIST pidl, c
...
@@ -583,16 +581,16 @@ HRESULT shellfolder_get_file_details(IShellFolder2 *iface, LPCITEMIDLIST pidl, c
case
PID_STG_NAME
:
case
PID_STG_NAME
:
return
IShellFolder2_GetDisplayNameOf
(
iface
,
pidl
,
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
return
IShellFolder2_GetDisplayNameOf
(
iface
,
pidl
,
SHGDN_NORMAL
|
SHGDN_INFOLDER
,
&
psd
->
str
);
case
PID_STG_SIZE
:
case
PID_STG_SIZE
:
_ILGetFileSize
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileSize
(
pidl
,
psd
->
str
.
cStr
,
MAX_PATH
);
break
;
break
;
case
PID_STG_STORAGETYPE
:
case
PID_STG_STORAGETYPE
:
_ILGetFileType
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileType
(
pidl
,
psd
->
str
.
cStr
,
MAX_PATH
);
break
;
break
;
case
PID_STG_WRITETIME
:
case
PID_STG_WRITETIME
:
_ILGetFileDate
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileDate
(
pidl
,
psd
->
str
.
cStr
,
MAX_PATH
);
break
;
break
;
case
PID_STG_ATTRIBUTES
:
case
PID_STG_ATTRIBUTES
:
_ILGetFileAttributes
(
pidl
,
psd
->
str
.
u
.
cStr
,
MAX_PATH
);
_ILGetFileAttributes
(
pidl
,
psd
->
str
.
cStr
,
MAX_PATH
);
break
;
break
;
}
}
return
S_OK
;
return
S_OK
;
...
...
dlls/shell32/shlview.c
View file @
5cb72744
...
@@ -42,7 +42,6 @@
...
@@ -42,7 +42,6 @@
#define CINTERFACE
#define CINTERFACE
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "windef.h"
#include "windef.h"
#include "winerror.h"
#include "winerror.h"
...
@@ -953,7 +952,7 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
...
@@ -953,7 +952,7 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
return
hr
;
return
hr
;
pIDList
=
GlobalLock
(
stgm
.
u
.
hGlobal
);
pIDList
=
GlobalLock
(
stgm
.
hGlobal
);
parent_pidl
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pIDList
+
pIDList
->
aoffset
[
0
]);
parent_pidl
=
(
LPCITEMIDLIST
)
((
LPBYTE
)
pIDList
+
pIDList
->
aoffset
[
0
]);
hr
=
IShellFolder_GetAttributesOf
(
This
->
pSFParent
,
1
,
&
parent_pidl
,
&
attribs
);
hr
=
IShellFolder_GetAttributesOf
(
This
->
pSFParent
,
1
,
&
parent_pidl
,
&
attribs
);
...
@@ -992,7 +991,7 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
...
@@ -992,7 +991,7 @@ static HRESULT ShellView_OpenSelectedItems(IShellViewImpl * This)
}
}
}
}
GlobalUnlock
(
stgm
.
u
.
hGlobal
);
GlobalUnlock
(
stgm
.
hGlobal
);
ReleaseStgMedium
(
&
stgm
);
ReleaseStgMedium
(
&
stgm
);
IDataObject_Release
(
selection
);
IDataObject_Release
(
selection
);
...
@@ -1436,7 +1435,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
...
@@ -1436,7 +1435,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
{
{
/* set to empty on failure */
/* set to empty on failure */
sd
.
str
.
uType
=
STRRET_WSTR
;
sd
.
str
.
uType
=
STRRET_WSTR
;
sd
.
str
.
u
.
pOleStr
=
emptyW
;
sd
.
str
.
pOleStr
=
emptyW
;
}
}
if
(
lpnmh
->
code
==
LVN_GETDISPINFOW
)
if
(
lpnmh
->
code
==
LVN_GETDISPINFOW
)
...
...
dlls/shell32/shlview_cmenu.c
View file @
5cb72744
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#include <string.h>
#include <string.h>
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "winerror.h"
#include "winerror.h"
#include "windef.h"
#include "windef.h"
...
@@ -331,7 +329,7 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut)
...
@@ -331,7 +329,7 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut)
static
BOOL
CALLBACK
Properties_AddPropSheetCallback
(
HPROPSHEETPAGE
hpage
,
LPARAM
lparam
)
static
BOOL
CALLBACK
Properties_AddPropSheetCallback
(
HPROPSHEETPAGE
hpage
,
LPARAM
lparam
)
{
{
LPPROPSHEETHEADERW
psh
=
(
LPPROPSHEETHEADERW
)
lparam
;
LPPROPSHEETHEADERW
psh
=
(
LPPROPSHEETHEADERW
)
lparam
;
psh
->
u3
.
phpage
[
psh
->
nPages
++
]
=
hpage
;
psh
->
phpage
[
psh
->
nPages
++
]
=
hpage
;
return
TRUE
;
return
TRUE
;
}
}
...
@@ -595,7 +593,7 @@ static void init_file_properties_pages(IDataObject *dataobject, LPFNADDPROPSHEET
...
@@ -595,7 +593,7 @@ static void init_file_properties_pages(IDataObject *dataobject, LPFNADDPROPSHEET
hr
=
IDataObject_GetData
(
dataobject
,
&
format
,
&
stgm
);
hr
=
IDataObject_GetData
(
dataobject
,
&
format
,
&
stgm
);
if
(
FAILED
(
hr
))
goto
error
;
if
(
FAILED
(
hr
))
goto
error
;
if
(
!
DragQueryFileW
((
HDROP
)
stgm
.
u
.
hGlobal
,
0
,
props
->
path
,
ARRAY_SIZE
(
props
->
path
)))
if
(
!
DragQueryFileW
((
HDROP
)
stgm
.
hGlobal
,
0
,
props
->
path
,
ARRAY_SIZE
(
props
->
path
)))
{
{
ReleaseStgMedium
(
&
stgm
);
ReleaseStgMedium
(
&
stgm
);
goto
error
;
goto
error
;
...
@@ -621,9 +619,9 @@ static void init_file_properties_pages(IDataObject *dataobject, LPFNADDPROPSHEET
...
@@ -621,9 +619,9 @@ static void init_file_properties_pages(IDataObject *dataobject, LPFNADDPROPSHEET
propsheet
.
dwFlags
=
PSP_DEFAULT
|
PSP_USECALLBACK
;
propsheet
.
dwFlags
=
PSP_DEFAULT
|
PSP_USECALLBACK
;
propsheet
.
hInstance
=
shell32_hInstance
;
propsheet
.
hInstance
=
shell32_hInstance
;
if
(
props
->
attrib
&
FILE_ATTRIBUTE_DIRECTORY
)
if
(
props
->
attrib
&
FILE_ATTRIBUTE_DIRECTORY
)
propsheet
.
u
.
pszTemplate
=
(
LPWSTR
)
MAKEINTRESOURCE
(
IDD_FOLDER_PROPERTIES
);
propsheet
.
pszTemplate
=
(
LPWSTR
)
MAKEINTRESOURCE
(
IDD_FOLDER_PROPERTIES
);
else
else
propsheet
.
u
.
pszTemplate
=
(
LPWSTR
)
MAKEINTRESOURCE
(
IDD_FILE_PROPERTIES
);
propsheet
.
pszTemplate
=
(
LPWSTR
)
MAKEINTRESOURCE
(
IDD_FILE_PROPERTIES
);
propsheet
.
pfnDlgProc
=
file_properties_proc
;
propsheet
.
pfnDlgProc
=
file_properties_proc
;
propsheet
.
pfnCallback
=
file_properties_callback
;
propsheet
.
pfnCallback
=
file_properties_callback
;
propsheet
.
lParam
=
(
LPARAM
)
props
;
propsheet
.
lParam
=
(
LPARAM
)
props
;
...
@@ -658,8 +656,8 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd)
...
@@ -658,8 +656,8 @@ static void DoOpenProperties(ContextMenu *This, HWND hwnd)
psh
.
hwndParent
=
hwnd
;
psh
.
hwndParent
=
hwnd
;
psh
.
dwFlags
=
PSH_PROPTITLE
;
psh
.
dwFlags
=
PSH_PROPTITLE
;
psh
.
nPages
=
0
;
psh
.
nPages
=
0
;
psh
.
u3
.
phpage
=
hpages
;
psh
.
phpage
=
hpages
;
psh
.
u2
.
nStartPage
=
0
;
psh
.
nStartPage
=
0
;
_ILSimpleGetTextW
(
This
->
apidl
[
0
],
(
LPVOID
)
wszFilename
,
MAX_PATH
);
_ILSimpleGetTextW
(
This
->
apidl
[
0
],
(
LPVOID
)
wszFilename
,
MAX_PATH
);
psh
.
pszCaption
=
(
LPCWSTR
)
wszFilename
;
psh
.
pszCaption
=
(
LPCWSTR
)
wszFilename
;
...
@@ -1185,7 +1183,7 @@ static HRESULT DoPaste(ContextMenu *This)
...
@@ -1185,7 +1183,7 @@ static HRESULT DoPaste(ContextMenu *This)
LPITEMIDLIST
*
apidl
;
LPITEMIDLIST
*
apidl
;
LPITEMIDLIST
pidl
;
LPITEMIDLIST
pidl
;
LPIDA
lpcida
=
GlobalLock
(
medium
.
u
.
hGlobal
);
LPIDA
lpcida
=
GlobalLock
(
medium
.
hGlobal
);
TRACE
(
"cida=%p
\n
"
,
lpcida
);
TRACE
(
"cida=%p
\n
"
,
lpcida
);
if
(
lpcida
)
if
(
lpcida
)
{
{
...
@@ -1198,7 +1196,7 @@ static HRESULT DoPaste(ContextMenu *This)
...
@@ -1198,7 +1196,7 @@ static HRESULT DoPaste(ContextMenu *This)
}
}
else
else
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
GlobalUnlock
(
medium
.
u
.
hGlobal
);
GlobalUnlock
(
medium
.
hGlobal
);
}
}
else
else
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
...
@@ -1215,14 +1213,14 @@ static HRESULT DoPaste(ContextMenu *This)
...
@@ -1215,14 +1213,14 @@ static HRESULT DoPaste(ContextMenu *This)
UINT
i
,
count
;
UINT
i
,
count
;
ITEMIDLIST
**
pidls
;
ITEMIDLIST
**
pidls
;
TRACE
(
"CF_HDROP=%p
\n
"
,
medium
.
u
.
hGlobal
);
TRACE
(
"CF_HDROP=%p
\n
"
,
medium
.
hGlobal
);
count
=
DragQueryFileW
(
medium
.
u
.
hGlobal
,
-
1
,
NULL
,
0
);
count
=
DragQueryFileW
(
medium
.
hGlobal
,
-
1
,
NULL
,
0
);
pidls
=
SHAlloc
(
count
*
sizeof
(
ITEMIDLIST
*
));
pidls
=
SHAlloc
(
count
*
sizeof
(
ITEMIDLIST
*
));
if
(
pidls
)
if
(
pidls
)
{
{
for
(
i
=
0
;
i
<
count
;
i
++
)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
{
DragQueryFileW
(
medium
.
u
.
hGlobal
,
i
,
path
,
ARRAY_SIZE
(
path
));
DragQueryFileW
(
medium
.
hGlobal
,
i
,
path
,
ARRAY_SIZE
(
path
));
if
((
pidls
[
i
]
=
ILCreateFromPathW
(
path
))
==
NULL
)
if
((
pidls
[
i
]
=
ILCreateFromPathW
(
path
))
==
NULL
)
{
{
hr
=
E_FAIL
;
hr
=
E_FAIL
;
...
...
dlls/shell32/systray.c
View file @
5cb72744
...
@@ -20,8 +20,6 @@
...
@@ -20,8 +20,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
*/
#define NONAMELESSUNION
#include <stdarg.h>
#include <stdarg.h>
#include "windef.h"
#include "windef.h"
...
@@ -107,7 +105,7 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid)
...
@@ -107,7 +105,7 @@ BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA pnid)
MultiByteToWideChar
(
CP_ACP
,
0
,
pnid
->
szInfoTitle
,
-
1
,
nidW
.
szInfoTitle
,
ARRAY_SIZE
(
nidW
.
szInfoTitle
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pnid
->
szInfoTitle
,
-
1
,
nidW
.
szInfoTitle
,
ARRAY_SIZE
(
nidW
.
szInfoTitle
));
}
}
nidW
.
u
.
uTimeout
=
pnid
->
u
.
uTimeout
;
nidW
.
u
Timeout
=
pnid
->
uTimeout
;
nidW
.
dwInfoFlags
=
pnid
->
dwInfoFlags
;
nidW
.
dwInfoFlags
=
pnid
->
dwInfoFlags
;
}
}
...
@@ -234,13 +232,13 @@ noicon:
...
@@ -234,13 +232,13 @@ noicon:
{
{
lstrcpynW
(
data
->
szInfo
,
nid
->
szInfo
,
ARRAY_SIZE
(
data
->
szInfo
)
);
lstrcpynW
(
data
->
szInfo
,
nid
->
szInfo
,
ARRAY_SIZE
(
data
->
szInfo
)
);
lstrcpynW
(
data
->
szInfoTitle
,
nid
->
szInfoTitle
,
ARRAY_SIZE
(
data
->
szInfoTitle
));
lstrcpynW
(
data
->
szInfoTitle
,
nid
->
szInfoTitle
,
ARRAY_SIZE
(
data
->
szInfoTitle
));
data
->
u
.
uTimeout
=
nid
->
u
.
u
Timeout
;
data
->
u
.
uTimeout
=
nid
->
uTimeout
;
data
->
dwInfoFlags
=
nid
->
dwInfoFlags
;
data
->
dwInfoFlags
=
nid
->
dwInfoFlags
;
}
}
if
(
data
->
uFlags
&
NIF_GUID
)
if
(
data
->
uFlags
&
NIF_GUID
)
data
->
guidItem
=
nid
->
guidItem
;
data
->
guidItem
=
nid
->
guidItem
;
if
(
dwMessage
==
NIM_SETVERSION
)
if
(
dwMessage
==
NIM_SETVERSION
)
data
->
u
.
uVersion
=
nid
->
u
.
u
Version
;
data
->
u
.
uVersion
=
nid
->
uVersion
;
/* FIXME: balloon icon */
/* FIXME: balloon icon */
cds
.
lpData
=
data
;
cds
.
lpData
=
data
;
...
...
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