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
72b76d1a
Commit
72b76d1a
authored
Nov 15, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Nov 15, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup, small fixes, a few new stubs.
parent
cf5faa64
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
319 additions
and
250 deletions
+319
-250
Makefile.in
dlls/shell32/Makefile.in
+1
-0
contmenu.c
dlls/shell32/contmenu.c
+42
-18
dataobject.c
dlls/shell32/dataobject.c
+6
-6
folders.c
dlls/shell32/folders.c
+9
-10
shell32_main.c
dlls/shell32/shell32_main.c
+28
-77
shell32_main.h
dlls/shell32/shell32_main.h
+15
-9
shellole.c
dlls/shell32/shellole.c
+4
-4
shellord.c
dlls/shell32/shellord.c
+77
-32
shlfolder.c
dlls/shell32/shlfolder.c
+51
-52
shell.h
include/shell.h
+14
-4
shlobj.h
include/shlobj.h
+50
-16
shell.c
misc/shell.c
+0
-0
shell32.spec
relay32/shell32.spec
+22
-22
No files found.
dlls/shell32/Makefile.in
View file @
72b76d1a
...
...
@@ -11,6 +11,7 @@ C_SRCS = \
dataobject.c
\
enumidlist.c
\
folders.c
\
iconcache.c
\
pidl.c
\
shell32_main.c
\
shellole.c
\
...
...
dlls/shell32/contmenu.c
View file @
72b76d1a
...
...
@@ -9,6 +9,8 @@
#include "pidl.h"
#include "shlobj.h"
#include "shell32_main.h"
#include "shresdef.h"
#include "if_macros.h"
#define __T(x) x
#define _T(x) __T(x)
...
...
@@ -90,7 +92,6 @@ static ULONG WINAPI IContextMenu_Release(LPCONTEXTMENU this)
{
IContextMenu_FreePidlTable
(
this
);
}
HeapFree
(
GetProcessHeap
(),
0
,
this
);
return
0
;
}
...
...
@@ -130,7 +131,8 @@ LPCONTEXTMENU IContextMenu_Constructor(LPSHELLFOLDER pSFParent, LPCITEMIDLIST *a
/**************************************************************************
* ICM_InsertItem()
*/
static
void
ICM_InsertItem
(
HMENU32
hmenu
,
UINT32
indexMenu
,
UINT32
wID
,
UINT32
fType
,
LPSTR
dwTypeData
,
UINT32
fState
)
void
WINAPI
_InsertMenuItem
(
HMENU32
hmenu
,
UINT32
indexMenu
,
BOOL32
fByPosition
,
UINT32
wID
,
UINT32
fType
,
LPSTR
dwTypeData
,
UINT32
fState
)
{
MENUITEMINFO32A
mii
;
ZeroMemory
(
&
mii
,
sizeof
(
mii
));
...
...
@@ -145,15 +147,15 @@ static void ICM_InsertItem (HMENU32 hmenu, UINT32 indexMenu, UINT32 wID, UINT32
}
mii
.
wID
=
wID
;
mii
.
fType
=
fType
;
InsertMenuItem32A
(
hmenu
,
indexMenu
,
TRUE
,
&
mii
);
InsertMenuItem32A
(
hmenu
,
indexMenu
,
fByPosition
,
&
mii
);
}
/**************************************************************************
* IContextMenu_QueryContextMenu()
*/
static
HRESULT
WINAPI
IContextMenu_QueryContextMenu
(
LPCONTEXTMENU
this
,
HMENU32
hm
enu
,
UINT32
i
ndexMenu
,
UINT32
i
dCmdFirst
,
UINT32
idCmdLast
,
UINT32
uFlags
)
{
BOOL32
fExplore
;
static
HRESULT
WINAPI
IContextMenu_QueryContextMenu
(
LPCONTEXTMENU
this
,
HMENU32
hmenu
,
UINT32
indexM
enu
,
UINT32
idCmdFirst
,
UINT32
idCmdLast
,
UINT32
uFlags
)
{
BOOL32
fExplore
;
TRACE
(
shell
,
"(%p)->(hmenu=%x indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )
\n
"
,
this
,
hmenu
,
indexMenu
,
idCmdFirst
,
idCmdLast
,
uFlags
);
...
...
@@ -161,17 +163,17 @@ static HRESULT WINAPI IContextMenu_QueryContextMenu( LPCONTEXTMENU this, HMENU3
{
if
(
!
this
->
bAllValues
)
{
fExplore
=
uFlags
&
CMF_EXPLORE
;
if
(
fExplore
)
{
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
idCmdFirst
+
IDM_EXPLORE
,
MFT_STRING
,
TEXT
(
"&Explore"
),
MFS_ENABLED
|
MFS_DEFAULT
);
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
);
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_EXPLORE
,
MFT_STRING
,
TEXT
(
"&Explore"
),
MFS_ENABLED
|
MFS_DEFAULT
);
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
);
}
else
{
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
|
MFS_DEFAULT
);
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
idCmdFirst
+
IDM_EXPLORE
,
MFT_STRING
,
TEXT
(
"&Explore"
),
MFS_ENABLED
);
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_OPEN
,
MFT_STRING
,
TEXT
(
"&Open"
),
MFS_ENABLED
|
MFS_DEFAULT
);
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_EXPLORE
,
MFT_STRING
,
TEXT
(
"&Explore"
),
MFS_ENABLED
);
}
if
(
uFlags
&
CMF_CANRENAME
)
{
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
0
,
MFT_SEPARATOR
,
NULL
,
0
);
ICM_InsertItem
(
hmenu
,
indexMenu
++
,
idCmdFirst
+
IDM_RENAME
,
MFT_STRING
,
TEXT
(
"&Rename"
),
(
IContextMenu_CanRenameItems
(
this
)
?
MFS_ENABLED
:
MFS_DISABLED
));
{
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
0
,
MFT_SEPARATOR
,
NULL
,
0
);
_InsertMenuItem
(
hmenu
,
indexMenu
++
,
TRUE
,
idCmdFirst
+
IDM_RENAME
,
MFT_STRING
,
TEXT
(
"&Rename"
),
(
IContextMenu_CanRenameItems
(
this
)
?
MFS_ENABLED
:
MFS_DISABLED
));
}
}
return
MAKE_HRESULT
(
SEVERITY_SUCCESS
,
0
,
(
IDM_LAST
+
1
));
...
...
@@ -183,14 +185,36 @@ static HRESULT WINAPI IContextMenu_QueryContextMenu( LPCONTEXTMENU this, HMENU3
* IContextMenu_InvokeCommand()
*/
static
HRESULT
WINAPI
IContextMenu_InvokeCommand
(
LPCONTEXTMENU
this
,
LPCMINVOKECOMMANDINFO32
lpcmi
)
{
LPITEMIDLIST
pidlTemp
,
pidlFQ
;
SHELLEXECUTEINFO32A
sei
;
{
LPITEMIDLIST
pidlTemp
,
pidlFQ
;
LPSHELLBROWSER
lpSB
;
LPSHELLVIEW
lpSV
;
HWND32
hWndSV
;
SHELLEXECUTEINFO32A
sei
;
int
i
;
TRACE
(
shell
,
"(%p)->(invcom=%p verb=%p
)
\n
"
,
this
,
lpcmi
,
lpcmi
->
lpVerb
);
TRACE
(
shell
,
"(%p)->(invcom=%p verb=%p
wnd=%x)
\n
"
,
this
,
lpcmi
,
lpcmi
->
lpVerb
,
lpcmi
->
hwnd
);
if
(
HIWORD
(
lpcmi
->
lpVerb
))
{
//the command is being sent via a verb
{
/* get the active IShellView */
lpSB
=
(
LPSHELLBROWSER
)
SendMessage32A
(
lpcmi
->
hwnd
,
CWM_GETISHELLBROWSER
,
0
,
0
);
IShellBrowser_QueryActiveShellView
(
lpSB
,
&
lpSV
);
lpSV
->
lpvtbl
->
fnGetWindow
(
lpSV
,
&
hWndSV
);
/* these verbs are used by the filedialogs*/
if
(
!
strcmp
(
lpcmi
->
lpVerb
,
CMDSTR_NEWFOLDER
))
{
FIXME
(
shell
,
"%s
\n
"
,
lpcmi
->
lpVerb
);
}
else
if
(
!
strcmp
(
lpcmi
->
lpVerb
,
CMDSTR_VIEWLIST
))
{
FIXME
(
shell
,
"%s
\n
"
,
lpcmi
->
lpVerb
);
SendMessage32A
(
hWndSV
,
WM_COMMAND
,
MAKEWPARAM
(
FCIDM_SHVIEW_LISTVIEW
,
0
),
0
);
}
else
if
(
!
strcmp
(
lpcmi
->
lpVerb
,
CMDSTR_VIEWDETAILS
))
{
FIXME
(
shell
,
"%s
\n
"
,
lpcmi
->
lpVerb
);
SendMessage32A
(
hWndSV
,
WM_COMMAND
,
MAKEWPARAM
(
FCIDM_SHVIEW_REPORTVIEW
,
0
),
0
);
}
else
{
FIXME
(
shell
,
"please report: unknown verb %s
\n
"
,
lpcmi
->
lpVerb
);
}
return
NOERROR
;
}
...
...
@@ -209,7 +233,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
}
pidlTemp
=
ILCombine
(
this
->
pSFParent
->
mpidl
,
this
->
aPidls
[
i
]);
pidlFQ
=
ILCombine
(
this
->
pSFParent
->
mpidlNSRoot
,
pidlTemp
);
pidlFQ
=
ILCombine
(
this
->
pSFParent
->
pMyPidl
,
pidlTemp
);
SHFree
(
pidlTemp
);
ZeroMemory
(
&
sei
,
sizeof
(
sei
));
...
...
@@ -233,7 +257,7 @@ static HRESULT WINAPI IContextMenu_InvokeCommand(LPCONTEXTMENU this, LPCMINVOKEC
case
IDM_RENAME
:
MessageBeep32
(
MB_OK
);
/*handle rename for the view here*/
break
;
break
;
}
return
NOERROR
;
}
...
...
dlls/shell32/dataobject.c
View file @
72b76d1a
...
...
@@ -246,7 +246,7 @@ static ULONG WINAPI IDataObject_Release(LPDATAOBJECT this)
* NOTES
* get or register the "Shell IDList Array" clipformat
*/
static
BOOL32
DATAOBJECT_InitShellIDList
()
static
BOOL32
DATAOBJECT_InitShellIDList
(
void
)
{
if
(
cfShellIDList
)
{
return
(
TRUE
);
}
...
...
@@ -261,7 +261,7 @@ static BOOL32 DATAOBJECT_InitShellIDList()
* NOTES
* get or register the "FileGroupDescriptor" clipformat
*/
static
BOOL32
DATAOBJECT_InitFileGroupDesc
()
static
BOOL32
DATAOBJECT_InitFileGroupDesc
(
void
)
{
if
(
cfFileGroupDesc
)
{
return
(
TRUE
);
}
...
...
@@ -275,7 +275,7 @@ static BOOL32 DATAOBJECT_InitFileGroupDesc()
* NOTES
* get or register the "FileContents" clipformat
*/
static
BOOL32
DATAOBJECT_InitFileContents
()
static
BOOL32
DATAOBJECT_InitFileContents
(
void
)
{
if
(
cfFileContents
)
{
return
(
TRUE
);
}
...
...
@@ -334,10 +334,10 @@ static HRESULT WINAPI IDataObject_GetData (LPDATAOBJECT this, LPFORMATETC32 pfor
TRACE
(
shell
,
"-- %lu %lu %lu
\n
"
,
size
,
size1
,
size2
);
TRACE
(
shell
,
"-- %p %p
\n
"
,
this
->
pidl
,
pidl
);
TRACE
(
shell
,
"-- %p %p %p
\n
"
,
pcida
,
(
void
*
)
pcida
+
size
,(
void
*
)
pcida
+
size
+
size1
);
TRACE
(
shell
,
"-- %p %p %p
\n
"
,
pcida
,
(
LPBYTE
)
pcida
+
size
,(
LPBYTE
)
pcida
+
size
+
size1
);
memcpy
((
void
*
)
pcida
+
size
,
this
->
pidl
,
size1
);
memcpy
((
void
*
)
pcida
+
size
+
size1
,
pidl
,
size2
);
memcpy
((
LPBYTE
)
pcida
+
size
,
this
->
pidl
,
size1
);
memcpy
((
LPBYTE
)
pcida
+
size
+
size1
,
pidl
,
size2
);
TRACE
(
shell
,
"-- after copy
\n
"
);
GlobalUnlock32
(
hmem
);
...
...
dlls/shell32/folders.c
View file @
72b76d1a
...
...
@@ -78,11 +78,14 @@ static struct IExtractIcon_VTable eivt =
*/
LPEXTRACTICON
IExtractIcon_Constructor
(
LPCITEMIDLIST
pidl
)
{
LPEXTRACTICON
ei
;
ei
=
(
LPEXTRACTICON
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IExtractIcon
));
ei
->
ref
=
1
;
ei
->
lpvtbl
=&
eivt
;
ei
->
pidl
=
ILClone
(
pidl
);
pdump
(
pidl
);
TRACE
(
shell
,
"(%p)
\n
"
,
ei
);
return
ei
;
}
...
...
@@ -134,19 +137,15 @@ static ULONG WINAPI IExtractIcon_Release(LPEXTRACTICON this)
}
/**************************************************************************
* IExtractIcon_GetIconLocation
* NOTE
* FIXME returns allways the icon no. 3 (closed Folder)
*/
static
HRESULT
WINAPI
IExtractIcon_GetIconLocation
(
LPEXTRACTICON
this
,
UINT32
uFlags
,
LPSTR
szIconFile
,
UINT32
cchMax
,
int
*
piIndex
,
UINT32
*
pwFlags
)
{
FIXME
(
shell
,
"(%p) (flags=%u file=%s max=%u %p %p) semi-stub
\n
"
,
this
,
uFlags
,
szIconFile
,
cchMax
,
piIndex
,
pwFlags
);
if
(
!
szIconFile
)
{
*
piIndex
=
20
;
}
else
{
*
piIndex
=
3
;
}
{
FIXME
(
shell
,
"(%p) (flags=%u file=%s max=%u %p %p) semi-stub
\n
"
,
this
,
uFlags
,
szIconFile
,
cchMax
,
piIndex
,
pwFlags
);
*
piIndex
=
(
int
)
SHMapPIDLToSystemImageListIndex
(
0
,
this
->
pidl
,
0
);
*
pwFlags
=
GIL_NOTFILENAME
;
FIXME
(
shell
,
"-- %x
\n
"
,
*
piIndex
);
return
NOERROR
;
}
/**************************************************************************
...
...
dlls/shell32/shell32_main.c
View file @
72b76d1a
...
...
@@ -27,9 +27,9 @@
#include "debug.h"
#include "winreg.h"
#include "imagelist.h"
#include "sysmetrics.h"
#include "commctrl.h"
#include "authors.h"
#include "pidl.h"
#include "shell32_main.h"
...
...
@@ -96,32 +96,6 @@ void WINAPI Control_RunDLL( HWND32 hwnd, LPCVOID code, LPCSTR cmd, DWORD arg4 )
}
/*************************************************************************
* Shell_GetImageList [SHELL32.71]
*
* PARAMETERS
* imglist[1|2] [OUT] pointer which recive imagelist handles
*
* NOTES
* undocumented
* I don't know, which pointer is which. They may have to be
* exchanged. (jsch)
*/
BOOL32
WINAPI
Shell_GetImageList
(
HIMAGELIST
*
imglist1
,
HIMAGELIST
*
imglist2
)
{
WARN
(
shell
,
"(%p,%p):semi-stub.
\n
"
,
imglist1
,
imglist2
);
if
(
imglist1
)
{
*
imglist1
=
ShellSmallIconList
;
}
if
(
imglist2
)
{
*
imglist2
=
ShellBigIconList
;
}
return
TRUE
;
}
HIMAGELIST
ShellSmallIconList
=
0
;
HIMAGELIST
ShellBigIconList
=
0
;
/*************************************************************************
* SHGetFileInfoA [SHELL32.254]
*
* FIXME
...
...
@@ -552,7 +526,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
{
case
FT_DIR
:
/* Directory: get the value from the registry, if its not there
create it and the directory*/
if
(
RegQueryValueEx32A
(
key
,
buffer
,
NULL
,
&
type
,
tpath
,
&
tpathlen
))
if
(
RegQueryValueEx32A
(
key
,
buffer
,
NULL
,
&
type
,
(
LPBYTE
)
tpath
,
&
tpathlen
))
{
GetWindowsDirectory32A
(
npath
,
MAX_PATH
);
PathAddBackslash32A
(
npath
);
switch
(
nFolder
)
...
...
@@ -610,7 +584,7 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITE
RegCloseKey
(
key
);
return
E_OUTOFMEMORY
;
}
if
(
RegSetValueEx32A
(
key
,
buffer
,
0
,
REG_SZ
,
npath
,
sizeof
(
npath
)
+
1
))
if
(
RegSetValueEx32A
(
key
,
buffer
,
0
,
REG_SZ
,
(
LPBYTE
)
npath
,
sizeof
(
npath
)
+
1
))
{
ERR
(
shell
,
"could not create value %s
\n
"
,
buffer
);
RegCloseKey
(
key
);
return
E_OUTOFMEMORY
;
...
...
@@ -753,7 +727,9 @@ LRESULT WINAPI AboutDlgProc32( HWND32 hWnd, UINT32 msg, WPARAM32 wParam,
if
(
lpDragInfo
&&
lpDragInfo
->
wFlags
==
DRAGOBJ_DATA
)
{
RECT32
rect
;
if
(
__get_dropline
(
hWnd
,
&
rect
)
)
{
POINT32
pt
=
{
lpDragInfo
->
pt
.
x
,
lpDragInfo
->
pt
.
y
};
{
POINT32
pt
;
pt
.
x
=
lpDragInfo
->
pt
.
x
;
pt
.
x
=
lpDragInfo
->
pt
.
y
;
rect
.
bottom
+=
DROP_FIELD_HEIGHT
;
if
(
PtInRect32
(
&
rect
,
pt
)
)
{
SetWindowLong32A
(
hWnd
,
DWL_MSGRESULT
,
1
);
...
...
@@ -891,9 +867,9 @@ void WINAPI FreeIconList( DWORD dw )
DWORD
WINAPI
SHGetPathFromIDList32A
(
LPCITEMIDLIST
pidl
,
LPSTR
pszPath
)
{
STRRET
lpName
;
LPSHELLFOLDER
shellfolder
;
CHAR
buffer
[
MAX_PATH
],
tpath
[
MAX_PATH
];
DWORD
type
,
tpathlen
=
MAX_PATH
,
dwdisp
;
HKEY
key
;
CHAR
buffer
[
MAX_PATH
],
tpath
[
MAX_PATH
];
DWORD
type
,
tpathlen
=
MAX_PATH
,
dwdisp
;
HKEY
key
;
TRACE
(
shell
,
"(pidl=%p,%p)
\n
"
,
pidl
,
pszPath
);
...
...
@@ -905,11 +881,11 @@ DWORD WINAPI SHGetPathFromIDList32A (LPCITEMIDLIST pidl,LPSTR pszPath)
}
type
=
REG_SZ
;
strcpy
(
buffer
,
"Desktop"
);
/*registry name*/
if
(
RegQueryValueEx32A
(
key
,
buffer
,
NULL
,
&
type
,
tpath
,
&
tpathlen
))
if
(
RegQueryValueEx32A
(
key
,
buffer
,
NULL
,
&
type
,
(
LPBYTE
)
tpath
,
&
tpathlen
))
{
GetWindowsDirectory32A
(
tpath
,
MAX_PATH
);
PathAddBackslash32A
(
tpath
);
strcat
(
tpath
,
"Desktop"
);
/*folder name*/
RegSetValueEx32A
(
key
,
buffer
,
0
,
REG_SZ
,
tpath
,
tpathlen
);
RegSetValueEx32A
(
key
,
buffer
,
0
,
REG_SZ
,
(
LPBYTE
)
tpath
,
tpathlen
);
CreateDirectory32A
(
tpath
,
NULL
);
}
RegCloseKey
(
key
);
...
...
@@ -942,16 +918,19 @@ DWORD WINAPI SHGetPathFromIDList32W (LPCITEMIDLIST pidl,LPWSTR pszPath)
}
void
(
CALLBACK
*
pDLLInitComctl
)(
);
INT32
(
CALLBACK
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON32
hIcon
);
INT32
(
CALLBACK
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT32
,
HICON32
);
void
(
CALLBACK
*
pDLLInitComctl
)(
void
);
INT32
(
CALLBACK
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON32
hIcon
);
INT32
(
CALLBACK
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT32
,
HICON32
);
HIMAGELIST
(
CALLBACK
*
pImageList_Create
)
(
INT32
,
INT32
,
UINT32
,
INT32
,
INT32
);
HICON32
(
CALLBACK
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT32
,
UINT32
);
HDPA
(
CALLBACK
*
pDPA_Create
)
(
INT32
);
INT32
(
CALLBACK
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT32
,
LPVOID
);
BOOL32
(
CALLBACK
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
LPVOID
(
CALLBACK
*
pDPA_GetPtr
)
(
const
HDPA
,
INT32
);
BOOL32
(
CALLBACK
*
pDPA_Destroy
)
(
const
HDPA
);
HICON32
(
CALLBACK
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT32
,
UINT32
);
INT32
(
CALLBACK
*
pImageList_GetImageCount
)(
HIMAGELIST
);
HDPA
(
CALLBACK
*
pDPA_Create
)
(
INT32
);
INT32
(
CALLBACK
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT32
,
LPVOID
);
BOOL32
(
CALLBACK
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
LPVOID
(
CALLBACK
*
pDPA_GetPtr
)
(
const
HDPA
,
INT32
);
BOOL32
(
CALLBACK
*
pDPA_Destroy
)
(
const
HDPA
);
INT32
(
CALLBACK
*
pDPA_Search
)
(
const
HDPA
,
LPVOID
,
INT32
,
PFNDPACOMPARE
,
LPARAM
,
UINT32
);
/*************************************************************************
* SHELL32 LibMain
...
...
@@ -963,21 +942,12 @@ BOOL32 (CALLBACK* pDPA_Destroy) (const HDPA);
HINSTANCE32
shell32_hInstance
;
BOOL32
WINAPI
Shell32LibMain
(
HINSTANCE32
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
HICON32
htmpIcon
;
UINT32
iiconindex
;
UINT32
index
;
CHAR
szShellPath
[
MAX_PATH
];
HINSTANCE32
hComctl32
;
{
HINSTANCE32
hComctl32
;
TRACE
(
shell
,
"0x%x 0x%lx %p
\n
"
,
hinstDLL
,
fdwReason
,
lpvReserved
);
shell32_hInstance
=
hinstDLL
;
GetWindowsDirectory32A
(
szShellPath
,
MAX_PATH
);
PathAddBackslash32A
(
szShellPath
);
strcat
(
szShellPath
,
"system
\\
shell32.dll"
);
if
(
fdwReason
==
DLL_PROCESS_ATTACH
)
{
hComctl32
=
LoadLibrary32A
(
"COMCTL32.DLL"
);
if
(
hComctl32
)
...
...
@@ -989,12 +959,15 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvRe
pImageList_AddIcon
=
GetProcAddress32
(
hComctl32
,
"ImageList_AddIcon"
);
pImageList_ReplaceIcon
=
GetProcAddress32
(
hComctl32
,
"ImageList_ReplaceIcon"
);
pImageList_GetIcon
=
GetProcAddress32
(
hComctl32
,
"ImageList_GetIcon"
);
pImageList_GetImageCount
=
GetProcAddress32
(
hComctl32
,
"ImageList_GetImageCount"
);
/* imports by ordinal, pray that it works*/
pDPA_Create
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
328L
);
pDPA_Destroy
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
329L
);
pDPA_GetPtr
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
332L
);
pDPA_InsertPtr
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
334L
);
pDPA_Sort
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
338L
);
pDPA_Search
=
GetProcAddress32
(
hComctl32
,
(
LPCSTR
)
339L
);
FreeLibrary32
(
hComctl32
);
}
...
...
@@ -1003,29 +976,7 @@ BOOL32 WINAPI Shell32LibMain(HINSTANCE32 hinstDLL, DWORD fdwReason, LPVOID lpvRe
ERR
(
shell
,
"P A N I C error getting functionpointers
\n
"
);
exit
(
1
);
}
if
(
!
ShellSmallIconList
)
{
if
(
(
ShellSmallIconList
=
pImageList_Create
(
sysMetrics
[
SM_CXSMICON
],
sysMetrics
[
SM_CYSMICON
],
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
))
)
{
for
(
index
=
0
;
index
<
40
;
index
++
)
{
if
(
!
(
htmpIcon
=
ExtractIcon32A
(
hinstDLL
,
szShellPath
,
index
))
||
(
-
1
==
(
iiconindex
=
pImageList_AddIcon
(
ShellSmallIconList
,
htmpIcon
)))
)
{
ERR
(
shell
,
"could not initialize iconlist (is shell32.dll in the system directory?)
\n
"
);
break
;
}
}
}
}
if
(
!
ShellBigIconList
)
{
if
(
(
ShellBigIconList
=
pImageList_Create
(
SYSMETRICS_CXSMICON
,
SYSMETRICS_CYSMICON
,
ILC_COLORDDB
|
ILC_MASK
,
0
,
0x20
))
)
{
for
(
index
=
0
;
index
<
40
;
index
++
)
{
if
(
!
(
htmpIcon
=
ExtractIcon32A
(
hinstDLL
,
szShellPath
,
index
))
||
(
-
1
==
(
iiconindex
=
pImageList_AddIcon
(
ShellBigIconList
,
htmpIcon
)))
)
{
ERR
(
shell
,
"could not initialize iconlist (is shell32.dll in the system directory?)
\n
"
);
break
;
}
}
}
}
TRACE
(
shell
,
"hIconSmall=%p hIconBig=%p
\n
"
,
ShellSmallIconList
,
ShellBigIconList
);
SIC_Initialize
();
}
return
TRUE
;
}
dlls/shell32/shell32_main.h
View file @
72b76d1a
...
...
@@ -16,16 +16,22 @@ extern HIMAGELIST ShellBigIconList;
/*******************************************
* pointer to functions dynamically loaded
*/
extern
void
(
CALLBACK
*
pDLLInitComctl
)(
);
extern
INT32
(
CALLBACK
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON32
hIcon
);
extern
INT32
(
CALLBACK
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT32
,
HICON32
);
extern
void
(
CALLBACK
*
pDLLInitComctl
)(
void
);
extern
INT32
(
CALLBACK
*
pImageList_AddIcon
)
(
HIMAGELIST
himl
,
HICON32
hIcon
);
extern
INT32
(
CALLBACK
*
pImageList_ReplaceIcon
)
(
HIMAGELIST
,
INT32
,
HICON32
);
extern
HIMAGELIST
(
CALLBACK
*
pImageList_Create
)
(
INT32
,
INT32
,
UINT32
,
INT32
,
INT32
);
extern
HICON32
(
CALLBACK
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT32
,
UINT32
);
extern
HDPA
(
CALLBACK
*
pDPA_Create
)
(
INT32
);
extern
INT32
(
CALLBACK
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT32
,
LPVOID
);
extern
BOOL32
(
CALLBACK
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
extern
LPVOID
(
CALLBACK
*
pDPA_GetPtr
)
(
const
HDPA
,
INT32
);
extern
BOOL32
(
CALLBACK
*
pDPA_Destroy
)
(
const
HDPA
);
extern
HICON32
(
CALLBACK
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT32
,
UINT32
);
extern
INT32
(
CALLBACK
*
pImageList_GetImageCount
)(
HIMAGELIST
);
extern
HDPA
(
CALLBACK
*
pDPA_Create
)
(
INT32
);
extern
INT32
(
CALLBACK
*
pDPA_InsertPtr
)
(
const
HDPA
,
INT32
,
LPVOID
);
extern
BOOL32
(
CALLBACK
*
pDPA_Sort
)
(
const
HDPA
,
PFNDPACOMPARE
,
LPARAM
);
extern
LPVOID
(
CALLBACK
*
pDPA_GetPtr
)
(
const
HDPA
,
INT32
);
extern
BOOL32
(
CALLBACK
*
pDPA_Destroy
)
(
const
HDPA
);
extern
INT32
(
CALLBACK
*
pDPA_Search
)
(
const
HDPA
,
LPVOID
,
INT32
,
PFNDPACOMPARE
,
LPARAM
,
UINT32
);
extern
BOOL32
WINAPI
SIC_Initialize
(
void
);
extern
HICON32
WINAPI
SIC_GetIcon
(
LPSTR
sSourceFile
,
DWORD
dwSourceIndex
,
BOOL32
bSmallIcon
);
/* FIXME should be moved to a header file. IsEqualGUID
is declared but not exported in compobj.c !!!*/
#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID)))
...
...
dlls/shell32/shellole.c
View file @
72b76d1a
...
...
@@ -211,8 +211,8 @@ DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal)
static
HRESULT
WINAPI
IClassFactory_QueryInterface
(
LPCLASSFACTORY
,
REFIID
,
LPVOID
*
);
static
ULONG
WINAPI
IClassFactory_AddRef
(
LPCLASSFACTORY
);
static
ULONG
WINAPI
IClassFactory_Release
(
LPCLASSFACTORY
);
static
HRESULT
WINAPI
IClassFactory_CreateInstance
();
static
HRESULT
WINAPI
IClassFactory_LockServer
();
static
HRESULT
WINAPI
IClassFactory_CreateInstance
(
LPCLASSFACTORY
,
LPUNKNOWN
,
REFIID
,
LPVOID
*
);
static
HRESULT
WINAPI
IClassFactory_LockServer
(
LPCLASSFACTORY
,
BOOL32
);
/**************************************************************************
* IClassFactory_VTable
*/
...
...
@@ -228,7 +228,7 @@ static IClassFactory_VTable clfvt =
* IClassFactory_Constructor
*/
LPCLASSFACTORY
IClassFactory_Constructor
()
LPCLASSFACTORY
IClassFactory_Constructor
(
void
)
{
LPCLASSFACTORY
lpclf
;
lpclf
=
(
LPCLASSFACTORY
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IClassFactory
));
...
...
@@ -316,7 +316,7 @@ static HRESULT WINAPI IClassFactory_CreateInstance(
{
pObj
=
(
IUnknown
*
)
IContextMenu_Constructor
(
NULL
,
NULL
,
0
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
))
{
pObj
=
(
IUnknown
*
)
IDataObject_Constructor
();
{
pObj
=
(
IUnknown
*
)
IDataObject_Constructor
(
0
,
NULL
,
NULL
,
0
);
}
else
{
ERR
(
shell
,
"unknown IID requested
\n\t
IID:
\t
%s
\n
"
,
xriid
);
...
...
dlls/shell32/shellord.c
View file @
72b76d1a
...
...
@@ -159,7 +159,7 @@ LPCVOID WINAPI PathFindExtension32AW(LPCVOID path)
* NOTES
* append \ if there is none
*/
LPSTR
WINAPI
PathAddBackslash32A
(
LPSTR
path
)
LPSTR
WINAPI
PathAddBackslash32A
(
LP
C
STR
path
)
{
int
len
;
TRACE
(
shell
,
"%p->%s
\n
"
,
path
,
path
);
...
...
@@ -171,7 +171,7 @@ LPSTR WINAPI PathAddBackslash32A(LPSTR path)
}
return
path
+
len
;
}
LPWSTR
WINAPI
PathAddBackslash32W
(
LPWSTR
path
)
LPWSTR
WINAPI
PathAddBackslash32W
(
LP
C
WSTR
path
)
{
int
len
;
TRACE
(
shell
,
"%p->%s
\n
"
,
path
,
debugstr_w
(
path
));
...
...
@@ -183,7 +183,7 @@ LPWSTR WINAPI PathAddBackslash32W(LPWSTR path)
}
return
path
+
len
;
}
LPVOID
WINAPI
PathAddBackslash32AW
(
LPVOID
path
)
LPVOID
WINAPI
PathAddBackslash32AW
(
LP
C
VOID
path
)
{
if
(
VERSION_OsIsUnicode
())
return
PathAddBackslash32W
(
path
);
return
PathAddBackslash32A
(
path
);
...
...
@@ -195,20 +195,20 @@ LPVOID WINAPI PathAddBackslash32AW(LPVOID path)
* NOTES
* remove spaces from beginning and end of passed string
*/
LPSTR
WINAPI
PathRemoveBlanks
(
LPSTR
str
)
{
LPSTR
x
=
str
;
TRACE
(
shell
,
"%s
\n
"
,
str
);
while
(
*
x
==
' '
)
x
++
;
if
(
x
!=
str
)
LPSTR
WINAPI
PathRemoveBlanks
(
LP
C
STR
str
)
{
LPSTR
x
=
str
;
TRACE
(
shell
,
"%s
\n
"
,
str
);
while
(
*
x
==
' '
)
x
++
;
if
(
x
!=
str
)
strcpy
(
str
,
x
);
if
(
!*
str
)
if
(
!*
str
)
return
str
;
x
=
str
+
strlen
(
str
)
-
1
;
while
(
*
x
==
' '
)
x
=
str
+
strlen
(
str
)
-
1
;
while
(
*
x
==
' '
)
x
--
;
if
(
*
x
==
' '
)
if
(
*
x
==
' '
)
*
x
=
'\0'
;
return
x
;
return
x
;
}
...
...
@@ -450,6 +450,27 @@ LPVOID WINAPI PathGetArgs(LPVOID cmdline)
}
return
(
LPVOID
)
aptr
;
}
/*************************************************************************
* PathQuoteSpaces [SHELL32.55]
*
* NOTES
* basename(char *fn);
*/
LPSTR
WINAPI
PathQuoteSpaces32A
(
LPCSTR
aptr
)
{
FIXME
(
shell
,
"%s
\n
"
,
aptr
);
return
0
;
}
LPWSTR
WINAPI
PathQuoteSpaces32W
(
LPCWSTR
wptr
)
{
FIXME
(
shell
,
"L%s
\n
"
,
debugstr_w
(
wptr
));
return
0
;
}
LPVOID
WINAPI
PathQuoteSpaces32AW
(
LPCVOID
fn
)
{
if
(
VERSION_OsIsUnicode
())
return
PathQuoteSpaces32W
(
fn
);
return
PathQuoteSpaces32A
(
fn
);
}
/*************************************************************************
* PathUnquoteSpaces [SHELL32.56]
...
...
@@ -559,22 +580,6 @@ BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) {
}
/*************************************************************************
* SHMapPIDLToSystemImageListIndex [SHELL32.77]
*
* PARAMETERS
* x pointer to an instance of IShellFolder
*
* NOTES
* exported by ordinal
*
*/
DWORD
WINAPI
SHMapPIDLToSystemImageListIndex
(
LPSHELLFOLDER
sh
,
DWORD
y
,
DWORD
z
)
{
FIXME
(
shell
,
"(SF=%p,pidl=%08lx,%08lx):stub.
\n
"
,
sh
,
y
,
z
);
return
0
;
}
/*************************************************************************
* OleStrToStrN [SHELL32.78]
*
* NOTES
...
...
@@ -1051,6 +1056,15 @@ HRESULT WINAPI SHRunControlPanel (DWORD x, DWORD z)
* ShellExecuteEx [SHELL32.291]
*
*/
BOOL32
WINAPI
ShellExecuteEx32
(
LPVOID
sei
)
{
if
(
VERSION_OsIsUnicode
())
return
ShellExecuteEx32W
(
sei
);
return
ShellExecuteEx32A
(
sei
);
}
/*************************************************************************
* ShellExecuteEx32A [SHELL32.292]
*
*/
BOOL32
WINAPI
ShellExecuteEx32A
(
LPSHELLEXECUTEINFO32A
sei
)
{
CHAR
szTemp
[
MAX_PATH
];
...
...
@@ -1072,6 +1086,30 @@ BOOL32 WINAPI ShellExecuteEx32A (LPSHELLEXECUTEINFO32A sei)
return
0
;
}
/*************************************************************************
* ShellExecuteEx [SHELL32.293]
*
*/
BOOL32
WINAPI
ShellExecuteEx32W
(
LPSHELLEXECUTEINFO32W
sei
)
{
WCHAR
szTemp
[
MAX_PATH
];
FIXME
(
shell
,
"(%p): stub
\n
"
,
sei
);
if
(
sei
->
fMask
&
SEE_MASK_IDLIST
)
{
SHGetPathFromIDList32W
(
sei
->
lpIDList
,
szTemp
);
TRACE
(
shell
,
"-- idlist=%p (%s)
\n
"
,
sei
->
lpIDList
,
debugstr_w
(
szTemp
));
}
if
(
sei
->
fMask
&
SEE_MASK_CLASSNAME
)
{
TRACE
(
shell
,
"-- classname= %s
\n
"
,
debugstr_w
(
sei
->
lpClass
));
}
if
(
sei
->
lpVerb
)
{
TRACE
(
shell
,
"-- action=%s
\n
"
,
debugstr_w
(
sei
->
lpVerb
));
}
return
0
;
}
/*************************************************************************
* SHSetInstanceExplorer [SHELL32.176]
*
*/
...
...
@@ -1218,7 +1256,7 @@ BOOL32 WINAPI FileIconInit(BOOL32 bFullInit)
* IsUserAdmin [NT 4.0:SHELL32.680]
*
*/
HRESULT
WINAPI
IsUserAdmin
()
HRESULT
WINAPI
IsUserAdmin
(
void
)
{
FIXME
(
shell
,
"stub
\n
"
);
return
TRUE
;
}
...
...
@@ -1533,7 +1571,7 @@ HRESULT WINAPI DriveType32(DWORD u)
* SHAbortInvokeCommand [SHELL32.198]
*
*/
HRESULT
WINAPI
SHAbortInvokeCommand
()
HRESULT
WINAPI
SHAbortInvokeCommand
(
void
)
{
FIXME
(
shell
,
"stub
\n
"
);
return
1
;
}
...
...
@@ -1549,7 +1587,7 @@ HRESULT WINAPI SHOutOfMemoryMessageBox(DWORD u, DWORD v, DWORD w)
* SHFlushClipboard [SHELL32.121]
*
*/
HRESULT
WINAPI
SHFlushClipboard
()
HRESULT
WINAPI
SHFlushClipboard
(
void
)
{
FIXME
(
shell
,
"stub
\n
"
);
return
1
;
}
...
...
@@ -1592,3 +1630,10 @@ LPWSTR WINAPI StrRChrW(LPWSTR lpStart, LPWSTR lpEnd, DWORD wMatch)
}
while
(
lpStart
<=
lpEnd
);
return
wptr
;
}
/*************************************************************************
* PathProcessCommand [SHELL32.653]
*/
HRESULT
WINAPI
PathProcessCommand
(
DWORD
u
,
DWORD
v
,
DWORD
w
,
DWORD
x
)
{
FIXME
(
shell
,
"0x%04lx 0x%04lx 0x%04lx 0x%04lx stub
\n
"
,
u
,
v
,
w
,
x
);
return
0
;
}
dlls/shell32/shlfolder.c
View file @
72b76d1a
...
...
@@ -105,31 +105,32 @@ LPSHELLFOLDER IShellFolder_Constructor(LPSHELLFOLDER pParent,LPITEMIDLIST pidl)
sf
=
(
LPSHELLFOLDER
)
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
IShellFolder
));
sf
->
ref
=
1
;
sf
->
lpvtbl
=&
sfvt
;
sf
->
mlpszFolder
=
NULL
;
/* path of the folder */
sf
->
sMyPath
=
NULL
;
/* path of the folder */
sf
->
pMyPidl
=
NULL
;
/* my qualified pidl */
sf
->
mpSFParent
=
pParent
;
/* parrent shellfolder */
TRACE
(
shell
,
"(%p)->(parent=%p, pidl=%p)
\n
"
,
sf
,
pParent
,
pidl
);
/* keep a copy of the pidl in the instance*/
sf
->
mpidl
=
ILClone
(
pidl
);
sf
->
mpidlNSRoot
=
NULL
;
if
(
sf
->
mpidl
)
/* do we have a pidl? */
{
dwSize
=
0
;
if
(
sf
->
mpSFParent
->
mlpszFolder
)
/* get the size of the parents path */
{
dwSize
+=
strlen
(
sf
->
mpSFParent
->
mlpszFolder
)
+
1
;
TRACE
(
shell
,
"-- (%p)->(parent's path=%s)
\n
"
,
sf
,
debugstr_a
(
sf
->
mpSFParent
->
mlpszFolder
));
if
(
sf
->
mpSFParent
->
sMyPath
)
/* get the size of the parents path */
{
dwSize
+=
strlen
(
sf
->
mpSFParent
->
sMyPath
)
+
1
;
TRACE
(
shell
,
"-- (%p)->(parent's path=%s)
\n
"
,
sf
,
debugstr_a
(
sf
->
mpSFParent
->
sMyPath
));
}
dwSize
+=
_ILGetFolderText
(
sf
->
mpidl
,
NULL
,
0
);
/* add the size of the foldername*/
sf
->
mlpszFolder
=
SHAlloc
(
dwSize
);
if
(
sf
->
mlpszFolder
)
{
*
(
sf
->
mlpszFolder
)
=
0x00
;
if
(
sf
->
mpSFParent
->
mlpszFolder
)
/* if the parent has a path, get it*/
{
strcpy
(
sf
->
mlpszFolder
,
sf
->
mpSFParent
->
mlpszFolder
);
PathAddBackslash32A
(
sf
->
mlpszFolder
);
sf
->
sMyPath
=
SHAlloc
(
dwSize
);
if
(
sf
->
sMyPath
)
{
*
(
sf
->
sMyPath
)
=
0x00
;
if
(
sf
->
mpSFParent
->
sMyPath
)
/* if the parent has a path, get it*/
{
strcpy
(
sf
->
sMyPath
,
sf
->
mpSFParent
->
sMyPath
);
PathAddBackslash32A
(
sf
->
sMyPath
);
}
_ILGetFolderText
(
sf
->
mpidl
,
sf
->
mlpszFolder
+
strlen
(
sf
->
mlpszFolder
),
dwSize
-
strlen
(
sf
->
mlpszFolder
));
TRACE
(
shell
,
"-- (%p)->(my path=%s)
\n
"
,
sf
,
debugstr_a
(
sf
->
mlpszFolder
));
sf
->
pMyPidl
=
ILCombine
(
sf
->
pMyPidl
,
pidl
);
_ILGetFolderText
(
sf
->
mpidl
,
sf
->
sMyPath
+
strlen
(
sf
->
sMyPath
),
dwSize
-
strlen
(
sf
->
sMyPath
));
TRACE
(
shell
,
"-- (%p)->(my path=%s)
\n
"
,
sf
,
debugstr_a
(
sf
->
sMyPath
));
}
}
return
sf
;
...
...
@@ -185,14 +186,14 @@ static ULONG WINAPI IShellFolder_Release(LPSHELLFOLDER this)
{
pdesktopfolder
=
NULL
;
TRACE
(
shell
,
"-- destroyed IShellFolder(%p) was Desktopfolder
\n
"
,
this
);
}
if
(
this
->
mpidlNSRoot
)
{
SHFree
(
this
->
mpidlNSRoot
);
if
(
this
->
pMyPidl
)
{
SHFree
(
this
->
pMyPidl
);
}
if
(
this
->
mpidl
)
{
SHFree
(
this
->
mpidl
);
}
if
(
this
->
mlpszFolder
)
{
SHFree
(
this
->
mlpszFolder
);
if
(
this
->
sMyPath
)
{
SHFree
(
this
->
sMyPath
);
}
HeapFree
(
GetProcessHeap
(),
0
,
this
);
...
...
@@ -296,7 +297,7 @@ static HRESULT WINAPI IShellFolder_EnumObjects(
{
TRACE
(
shell
,
"(%p)->(HWND=0x%08x flags=0x%08lx pplist=%p)
\n
"
,
this
,
hwndOwner
,
dwFlags
,
ppEnumIDList
);
*
ppEnumIDList
=
NULL
;
*
ppEnumIDList
=
IEnumIDList_Constructor
(
this
->
mlpszFolder
,
dwFlags
);
*
ppEnumIDList
=
IEnumIDList_Constructor
(
this
->
sMyPath
,
dwFlags
);
TRACE
(
shell
,
"-- (%p)->(new ID List: %p)
\n
"
,
this
,
*
ppEnumIDList
);
if
(
!*
ppEnumIDList
)
{
return
E_OUTOFMEMORY
;
...
...
@@ -307,16 +308,15 @@ static HRESULT WINAPI IShellFolder_EnumObjects(
* IShellFolder_Initialize()
* IPersistFolder Method
*/
static
HRESULT
WINAPI
IShellFolder_Initialize
(
LPSHELLFOLDER
this
,
LPCITEMIDLIST
pidl
)
{
TRACE
(
shell
,
"(%p)->(pidl=%p)
\n
"
,
this
,
pidl
);
if
(
this
->
mpidlNSRoot
)
{
SHFree
(
this
->
mpidlNSRoot
);
this
->
mpidlNSRoot
=
NULL
;
}
this
->
mpidlNSRoot
=
ILClone
(
pidl
);
return
S_OK
;
static
HRESULT
WINAPI
IShellFolder_Initialize
(
LPSHELLFOLDER
this
,
LPCITEMIDLIST
pidl
)
{
TRACE
(
shell
,
"(%p)->(pidl=%p)
\n
"
,
this
,
pidl
);
if
(
this
->
pMyPidl
)
{
SHFree
(
this
->
pMyPidl
);
this
->
pMyPidl
=
NULL
;
}
this
->
pMyPidl
=
ILClone
(
pidl
);
return
S_OK
;
}
/**************************************************************************
...
...
@@ -327,30 +327,29 @@ static HRESULT WINAPI IShellFolder_Initialize(
* REFIID riid, //[in ] Initial Interface
* LPVOID* ppvObject //[out] Interface*
*/
static
HRESULT
WINAPI
IShellFolder_BindToObject
(
LPSHELLFOLDER
this
,
LPCITEMIDLIST
pidl
,
LPBC
pbcReserved
,
REFIID
riid
,
LPVOID
*
ppvOut
)
static
HRESULT
WINAPI
IShellFolder_BindToObject
(
LPSHELLFOLDER
this
,
LPCITEMIDLIST
pidl
,
LPBC
pbcReserved
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
char
xriid
[
50
];
HRESULT
hr
;
HRESULT
hr
;
LPSHELLFOLDER
pShellFolder
;
WINE_StringFromCLSID
(
riid
,
xriid
);
TRACE
(
shell
,
"(%p)->(pidl=%p,%p,
\n\t
IID:%s,%p)
\n
"
,
this
,
pidl
,
pbcReserved
,
xriid
,
ppvOut
);
*
ppvOut
=
NULL
;
pShellFolder
=
IShellFolder_Constructor
(
this
,
pidl
);
if
(
!
pShellFolder
)
return
E_OUTOFMEMORY
;
/* pShellFolder->lpvtbl->fnInitialize(pShellFolder, this->mpidlNSRoot);*/
IShellFolder_Initialize
(
pShellFolder
,
this
->
mpidlNSRoot
);
hr
=
pShellFolder
->
lpvtbl
->
fnQueryInterface
(
pShellFolder
,
riid
,
ppvOut
);
pShellFolder
->
lpvtbl
->
fnRelease
(
pShellFolder
);
*
ppvOut
=
NULL
;
pShellFolder
=
IShellFolder_Constructor
(
this
,
pidl
);
if
(
!
pShellFolder
)
return
E_OUTOFMEMORY
;
IShellFolder_Initialize
(
pShellFolder
,
this
->
pMyPidl
);
hr
=
pShellFolder
->
lpvtbl
->
fnQueryInterface
(
pShellFolder
,
riid
,
ppvOut
);
pShellFolder
->
lpvtbl
->
fnRelease
(
pShellFolder
);
TRACE
(
shell
,
"-- (%p)->(interface=%p)
\n
"
,
this
,
ppvOut
);
return
hr
;
return
hr
;
}
/**************************************************************************
...
...
@@ -578,8 +577,8 @@ static HRESULT WINAPI IShellFolder_GetUIObjectOf( LPSHELLFOLDER this,HWND32 hwnd
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIcon
))
{
if
(
cidl
!=
1
)
return
(
E_INVALIDARG
);
pidl
=
ILCombine
(
this
->
mpidl
,
apidl
[
0
]);
pObj
=
(
LPUNKNOWN
)
IExtractIcon_Constructor
(
pidl
);
pidl
=
ILCombine
(
this
->
pMyPidl
,
apidl
[
0
]);
pObj
=
(
LPUNKNOWN
)
IExtractIcon_Constructor
(
pidl
);
SHFree
(
pidl
);
}
else
...
...
@@ -672,9 +671,9 @@ static HRESULT WINAPI IShellFolder_GetDisplayNameOf( LPSHELLFOLDER this, LPCITEM
{
/* if the IShellFolder has parents, get the path from the
parent and add the ItemName*/
szText
[
0
]
=
0x00
;
if
(
this
->
mlpszFolder
&&
strlen
(
this
->
mlpszFolder
))
{
if
(
strcmp
(
this
->
mlpszFolder
,
"My Computer"
))
{
strcpy
(
szText
,
this
->
mlpszFolder
);
if
(
this
->
sMyPath
&&
strlen
(
this
->
sMyPath
))
{
if
(
strcmp
(
this
->
sMyPath
,
"My Computer"
))
{
strcpy
(
szText
,
this
->
sMyPath
);
PathAddBackslash32A
(
szText
);
}
}
...
...
@@ -748,13 +747,13 @@ static BOOL32 WINAPI IShellFolder_GetFolderPath(LPSHELLFOLDER this, LPSTR lpszOu
*
lpszOut
=
0
;
if
(
!
this
->
mlpszFolder
)
if
(
!
this
->
sMyPath
)
return
FALSE
;
dwSize
=
strlen
(
this
->
mlpszFolder
)
+
1
;
dwSize
=
strlen
(
this
->
sMyPath
)
+
1
;
if
(
dwSize
>
dwOutSize
)
return
FALSE
;
strcpy
(
lpszOut
,
this
->
mlpszFolder
);
strcpy
(
lpszOut
,
this
->
sMyPath
);
TRACE
(
shell
,
"-- (%p)->(return=%s)
\n
"
,
this
,
lpszOut
);
return
TRUE
;
...
...
include/shell.h
View file @
72b76d1a
...
...
@@ -253,10 +253,15 @@ HRESULT WINAPI SHGetSpecialFolderLocation(HWND32, INT32, LPITEMIDLIST *);
/****************************************************************************
* string and path functions
*/
LPSTR
WINAPI
PathAddBackslash32A
(
LPSTR
path
);
LPWSTR
WINAPI
PathAddBackslash32W
(
LPWSTR
path
);
LPSTR
WINAPI
PathAddBackslash32A
(
LP
C
STR
path
);
LPWSTR
WINAPI
PathAddBackslash32W
(
LP
C
WSTR
path
);
#define PathAddBackslash WINELIB_NAME_AW(PathAddBackslash)
LPVOID
WINAPI
PathAddBackslash32AW
(
LPVOID
path
);
LPVOID
WINAPI
PathAddBackslash32AW
(
LPCVOID
path
);
LPSTR
WINAPI
PathQuoteSpaces32A
(
LPCSTR
path
);
LPWSTR
WINAPI
PathQuoteSpaces32W
(
LPCWSTR
path
);
#define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)
LPVOID
WINAPI
PathQuoteSpaces32AW
(
LPCVOID
path
);
LPSTR
WINAPI
PathCombine32A
(
LPSTR
szDest
,
LPCSTR
lpszDir
,
LPCSTR
lpszFile
);
LPWSTR
WINAPI
PathCombine32W
(
LPWSTR
szDest
,
LPCWSTR
lpszDir
,
LPCWSTR
lpszFile
);
...
...
@@ -278,10 +283,15 @@ LPCWSTR WINAPI PathFindFilename32W(LPCWSTR path);
#define PathFindFilename WINELIB_NAME_AW(PathFindFilename)
LPCVOID
WINAPI
PathFindFilename32AW
(
LPCVOID
path
);
LPSTR
WINAPI
PathRemoveBlanks
(
LPSTR
str
);
LPSTR
WINAPI
PathRemoveBlanks
(
LP
C
STR
str
);
/****************************************************************************
* other functions
*/
HICON32
WINAPI
ExtractIconEx32A
(
LPSTR
,
INT32
,
HICON32
*
,
HICON32
*
,
UINT32
);
HICON32
WINAPI
ExtractIconEx32W
(
LPWSTR
,
INT32
,
HICON32
*
,
HICON32
*
,
UINT32
);
#define ExtractIconEx WINELIB_NAME_AW(ExtractIconEx)
HICON32
WINAPI
ExtractIconEx32AW
(
LPVOID
,
INT32
,
HICON32
*
,
HICON32
*
,
UINT32
);
LPVOID
WINAPI
SHAlloc
(
DWORD
len
);
DWORD
WINAPI
SHFree
(
LPVOID
x
);
...
...
include/shlobj.h
View file @
72b76d1a
...
...
@@ -534,7 +534,7 @@ typedef enum
{
FVM_ICON
=
1
,
FVM_SMALLICON
=
2
,
FVM_LIST
=
3
,
FVM_DETAILS
=
4
,
FVM_DETAILS
=
4
}
FOLDERVIEWMODE
;
typedef
struct
...
...
@@ -626,10 +626,10 @@ typedef struct IShellFolder_VTable {
struct
tagSHELLFOLDER
{
LPSHELLFOLDER_VTABLE
lpvtbl
;
DWORD
ref
;
LPSTR
mlpszFolder
;
LPITEMIDLIST
mp
idl
;
LPITEMIDLIST
mpidlNSRoot
;
LPSHELLFOLDER
mpSFParent
;
LPSTR
sMyPath
;
LPITEMIDLIST
pMyP
idl
;
LPITEMIDLIST
mpidl
;
LPSHELLFOLDER
mpSFParent
;
};
extern
LPSHELLFOLDER
pdesktopfolder
;
...
...
@@ -676,7 +676,15 @@ DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *);
#define FCT_MERGE 0x0001
#define FCT_CONFIGABLE 0x0002
#define FCT_ADDTOEND 0x0004
/* undocumented, found in the web posted by Chris Becke */
#define CWM_SETPATH (WM_USER+2)
#define CWM_WANTIDLE (WM_USER+3)
#define CWM_GETSETCURRENTINFO (WM_USER+4)
#define CWM_SELECTITEM (WM_USER+5)
#define CWM_STOPWAITING (WM_USER+6)
#define CWM_GETISHELLBROWSER (WM_USER+7)
typedef
struct
IShellBrowser_VTable
{
// *** IUnknown methods ***
STDMETHOD
(
QueryInterface
)
(
THIS_
REFIID
riid
,
LPVOID
*
ppvObj
)
PURE
;
...
...
@@ -703,7 +711,7 @@ typedef struct IShellBrowser_VTable
STDMETHOD
(
QueryActiveShellView
)(
THIS_
IShellView
**
ppshv
)
PURE
;
STDMETHOD
(
OnViewWindowActive
)(
THIS_
IShellView
*
ppshv
)
PURE
;
STDMETHOD
(
SetToolbarItems
)(
THIS_
LPTBBUTTON
lpButtons
,
UINT32
nButtons
,
UINT32
uFlags
)
PURE
;
}
*
LPSHELLBROWSER_VTABLE
,
IShellBrowser_VTable
;
;
}
*
LPSHELLBROWSER_VTABLE
,
IShellBrowser_VTable
;
struct
tagSHELLBROWSER
{
LPSHELLBROWSER_VTABLE
lpvtbl
;
...
...
@@ -741,12 +749,35 @@ struct tagSHELLBROWSER
FCIDM_BROWSERFIRST/LAST for the explorer frame (IShellBrowser)
FCIDM_GLOBAL/LAST for the explorer's submenu IDs
*/
#define FCIDM_SHVIEWFIRST 0x0000
#define FCIDM_SHVIEWLAST 0x7fff
#define FCIDM_BROWSERFIRST 0xa000
#define FCIDM_BROWSERLAST 0xbf00
#define FCIDM_GLOBALFIRST 0x8000
#define FCIDM_GLOBALLAST 0x9fff
#define FCIDM_SHVIEWFIRST 0x0000
/* undocumented */
#define FCIDM_SHVIEW_ARRANGE 0x7001
#define FCIDM_SHVIEW_DELETE 0x7011
#define FCIDM_SHVIEW_PROPERTIES 0x7013
#define FCIDM_SHVIEW_CUT 0x7018
#define FCIDM_SHVIEW_COPY 0x7019
#define FCIDM_SHVIEW_INSERT 0x701A
#define FCIDM_SHVIEW_UNDO 0x701B
#define FCIDM_SHVIEW_INSERTLINK 0x701C
#define FCIDM_SHVIEW_SELECTALL 0x7021
#define FCIDM_SHVIEW_INVERTSELECTION 0x7022
#define FCIDM_SHVIEW_BIGICON 0x7029
#define FCIDM_SHVIEW_SMALLICON 0x702A
#define FCIDM_SHVIEW_LISTVIEW 0x702B
#define FCIDM_SHVIEW_REPORTVIEW 0x702C
#define FCIDM_SHVIEW_AUTOARRANGE 0x7031
#define FCIDM_SHVIEW_SNAPTOGRID 0x7032
#define FCIDM_SHVIEW_HELP 0x7041
#define FCIDM_SHVIEWLAST 0x7fff
#define FCIDM_BROWSERFIRST 0xA000
/* undocumented toolbar items from stddlg's*/
#define FCIDM_TB_SMALLICON 0xA003
#define FCIDM_TB_REPORTVIEW 0xA004
#define FCIDM_BROWSERLAST 0xbf00
#define FCIDM_GLOBALFIRST 0x8000
#define FCIDM_GLOBALLAST 0x9fff
/*
* Global submenu IDs and separator IDs
...
...
@@ -953,6 +984,9 @@ struct IExtractIcon
};
#undef THIS
DWORD
WINAPI
SHMapPIDLToSystemImageListIndex
(
LPSHELLFOLDER
sh
,
LPITEMIDLIST
pidl
,
DWORD
z
);
/****************************************************************************
* IShellIcon interface
*/
...
...
@@ -1026,14 +1060,14 @@ struct tagSERVICEPROVIDER
* Class constructors
*/
#ifdef __WINE__
extern
LPDATAOBJECT
IDataObject_Constructor
();
extern
LPDATAOBJECT
IDataObject_Constructor
(
HWND32
hwndOwner
,
LPSHELLFOLDER
psf
,
LPITEMIDLIST
*
apidl
,
UINT32
cidl
);
extern
LPENUMFORMATETC
IEnumFORMATETC_Constructor
(
UINT32
,
const
FORMATETC32
[]);
extern
LPCLASSFACTORY
IClassFactory_Constructor
();
extern
LPCLASSFACTORY
IClassFactory_Constructor
(
void
);
extern
LPCONTEXTMENU
IContextMenu_Constructor
(
LPSHELLFOLDER
,
LPCITEMIDLIST
*
,
UINT32
);
extern
LPSHELLFOLDER
IShellFolder_Constructor
(
LPSHELLFOLDER
,
LPITEMIDLIST
);
extern
LPSHELLVIEW
IShellView_Constructor
(
LPSHELLFOLDER
,
LPCITEMIDLIST
);
extern
LPSHELLLINK
IShellLink_Constructor
();
extern
LPSHELLLINK
IShellLink_Constructor
(
void
);
extern
LPENUMIDLIST
IEnumIDList_Constructor
(
LPCSTR
,
DWORD
);
extern
LPEXTRACTICON
IExtractIcon_Constructor
(
LPITEMIDLIST
);
#endif
...
...
misc/shell.c
View file @
72b76d1a
This diff is collapsed.
Click to expand it.
relay32/shell32.spec
View file @
72b76d1a
...
...
@@ -8,18 +8,18 @@ init Shell32LibMain
# This list was updated to dll version 4.72
2 stdcall SHChangeNotifyRegister(long long long long long long) SHChangeNotifyRegister
3 stub CheckEscapesA
# exported by name
3 stub CheckEscapesA
@8
4 stdcall SHChangeNotifyDeregister (long long) SHChangeNotifyDeregister
5 stub SHChangeNotifyUpdateEntryList@16
6 stub CheckEscapesW
# exported by name
7 stdcall CommandLineToArgvW(wstr ptr) CommandLineToArgvW
# exported by name
8 stub Control_FillCache_RunDLL@16
# exported by name
6 stub CheckEscapesW
@8
7 stdcall CommandLineToArgvW(wstr ptr) CommandLineToArgvW
8 stub Control_FillCache_RunDLL@16
9 stub PifMgr_OpenProperties@16
10 stub PifMgr_GetProperties@20
11 stub PifMgr_SetProperties@20
12 stub Control_FillCache_RunDLLA
# exported by name
12 stub Control_FillCache_RunDLLA
@16
13 stub PifMgr_CloseProperties@8
14 stub Control_FillCache_RunDLLW@16
# exported by name
14 stub Control_FillCache_RunDLLW@16
15 stdcall ILGetDisplayName(ptr ptr) ILGetDisplayName
16 stdcall ILFindLastID(ptr) ILFindLastID
17 stdcall ILRemoveLastID(ptr) ILRemoveLastID
...
...
@@ -28,7 +28,7 @@ init Shell32LibMain
20 stub ILGlobalClone@4
21 stdcall ILIsEqual (ptr ptr) ILIsEqual
22 stdcall Control_RunDLL(long long long long) Control_RunDLL # exported by name
23 st
ub ILIsParent@12
23 st
dcall ILIsParent (long long long) ILIsParent
24 stdcall ILFindChild (long long) ILFindChild
25 stdcall ILCombine(ptr ptr) ILCombine
26 stub ILLoadFromStream@8
...
...
@@ -45,26 +45,26 @@ init Shell32LibMain
37 stdcall PathCombine(ptr ptr ptr) PathCombine32AW
38 stub PathStripPath
39 stdcall PathIsUNC(str) PathIsUNC
40 stub PathIsRelative
41 stub Control_RunDLLA
# exported by name
42 stub Control_RunDLLW
# exported by name
40 stub PathIsRelative
@4
41 stub Control_RunDLLA
@16
42 stub Control_RunDLLW
@16
43 stdcall PathIsExe (ptr) PathIsExe
44 stub DoEnvironmentSubstA
# exported by name
44 stub DoEnvironmentSubstA
@8
45 stdcall PathFileExists(str) PathFileExists
46 stdcall PathMatchSpec (str str) PathMatchSpec
47 stub PathMakeUniqueName@20
48 stub PathSetDlgItemPath@12
49 stub PathQualify@4
50 stub PathStripToRoot
50 stub PathStripToRoot
@4
51 stdcall PathResolve(str long long) PathResolve
52 stdcall PathGetArgs(str) PathGetArgs
53 stub DoEnvironmentSubstW@8
# exported by name
53 stub DoEnvironmentSubstW@8
54 stdcall DragAcceptFiles(long long) DragAcceptFiles32
55 st
ub PathQuoteSpaces
55 st
dcall PathQuoteSpaces (ptr) PathQuoteSpaces32AW
56 stdcall PathUnquoteSpaces(str) PathUnquoteSpaces
57 stdcall PathGetDriveNumber (str) PathGetDriveNumber32
58 stdcall ParseField(str long str long) ParseField
59 stub RestartDialog
59 stub RestartDialog
@12
60 stdcall ExitWindowsDialog(long) ExitWindowsDialog
61 stdcall RunFileDlg(long long long str str long) RunFileDlg
62 stdcall PickIconDlg(long long long long) PickIconDlg
...
...
@@ -194,9 +194,9 @@ init Shell32LibMain
186 stub ExtractAssociatedIconExW # exported by name
187 stub ExtractAssociatedIconW # exported by name
188 stdcall ExtractIconA(long str long) ExtractIcon32A # exported by name
189 st
ub ExtractIconEx # exported by name
190 st
ub ExtractIconExA # exported by name
191 st
ub ExtractIconExW # exported by name
189 st
dcall ExtractIconEx(ptr long ptr ptr long) ExtractIconEx32AW
190 st
dcall ExtractIconExA(str long ptr ptr long) ExtractIconEx32A
191 st
dcall ExtractIconExW(wstr long ptr ptr long) ExtractIconEx32W
192 stub ExtractIconResInfoA # exported by name
193 stub ExtractIconResInfoW # exported by name
194 stdcall ExtractIconW(long wstr long) ExtractIcon32W # exported by name
...
...
@@ -297,9 +297,9 @@ init Shell32LibMain
288 stdcall ShellAboutA(long str str long) ShellAbout32A
289 stdcall ShellAboutW(long wstr wstr long) ShellAbout32W
290 stdcall ShellExecuteA(long str str str str long) ShellExecute32A
291 stdcall ShellExecuteEx (long) ShellExecuteEx32
A
291 stdcall ShellExecuteEx (long) ShellExecuteEx32
292 stdcall ShellExecuteExA (long) ShellExecuteEx32A
293 st
ub ShellExecuteEx
W
293 st
dcall ShellExecuteExW (long) ShellExecuteEx32
W
294 stub ShellExecuteW
295 stub ShellHookProc # exported by name
296 stdcall Shell_NotifyIcon(long ptr) Shell_NotifyIcon
...
...
@@ -339,7 +339,7 @@ init Shell32LibMain
505 stdcall SHRegCloseKey (long) SHRegCloseKey32
506 stdcall SHRegOpenKeyA (long str long) SHRegOpenKey32A
507 stdcall SHRegOpenKeyW (long wstr long
long
) SHRegOpenKey32W
507 stdcall SHRegOpenKeyW (long wstr long) SHRegOpenKey32W
508 stub SHRegQueryValueA@16
509 stdcall SHRegQueryValueExA(long str ptr ptr ptr ptr) SHRegQueryValueEx32A
510 stdcall SHRegQueryValueW (long long long long) SHRegQueryValue32W
...
...
@@ -366,7 +366,7 @@ init Shell32LibMain
650 stub PathIsSameRoot@8
651 stdcall ReadCabinetState (long long) ReadCabinetState
652 stdcall WriteCabinetState (long) WriteCabinetState
653 st
ub PathProcessCommand@16
653 st
dcall PathProcessCommand (long long long long) PathProcessCommand
660 stdcall FileIconInit (long) FileIconInit
...
...
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