Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
565b2e0b
Commit
565b2e0b
authored
Jul 25, 1999
by
Juergen Schmied
Committed by
Alexandre Julliard
Jul 25, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Many fixes/reimplementations.
parent
2b0c1d8a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
168 additions
and
126 deletions
+168
-126
brsfolder.c
dlls/shell32/brsfolder.c
+2
-1
pidl.c
dlls/shell32/pidl.c
+0
-0
pidl.h
dlls/shell32/pidl.h
+24
-14
shell32_main.c
dlls/shell32/shell32_main.c
+0
-0
shell32_main.h
dlls/shell32/shell32_main.h
+33
-41
shlmenu.c
dlls/shell32/shlmenu.c
+82
-54
shell.h
include/shell.h
+2
-2
shlguid.h
include/shlguid.h
+5
-2
shlobj.h
include/shlobj.h
+6
-1
obj_enumidlist.h
include/wine/obj_enumidlist.h
+1
-7
obj_shellfolder.h
include/wine/obj_shellfolder.h
+9
-0
shell32.spec
relay32/shell32.spec
+4
-4
No files found.
dlls/shell32/brsfolder.c
View file @
565b2e0b
...
...
@@ -17,6 +17,7 @@
#include "wine/obj_base.h"
#include "wine/obj_enumidlist.h"
#include "wine/obj_shellfolder.h"
#include "wine/undocshell.h"
#include "pidl.h"
#include "shell32_main.h"
...
...
@@ -253,7 +254,7 @@ BOOL WINAPI BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
switch
(
wParam
)
{
case
IDOK
:
pdump
(
pidlRet
);
_ILGetPidlPath
(
pidlRet
,
lpBrowseInfo
->
pszDisplayName
,
MAX_PATH
);
SHGetPathFromIDListA
(
pidlRet
,
lpBrowseInfo
->
pszDisplayName
);
EndDialog
(
hWnd
,
(
DWORD
)
ILClone
(
pidlRet
));
return
TRUE
;
...
...
dlls/shell32/pidl.c
View file @
565b2e0b
This diff is collapsed.
Click to expand it.
dlls/shell32/pidl.h
View file @
565b2e0b
...
...
@@ -32,7 +32,7 @@
* drive 0x23/25 drive (usual)
* drive 0x25/25 drive (lnk/persistant)
* drive 0x29/25 drive
*
control/printer 0x2E
*
shell extension 0x2E mycomp
* drive 0x2F drive (lnk/persistant)
* folder/file 0x30 folder/file (1) (lnk/persistant)
* folder 0x31 folder (usual)
...
...
@@ -40,8 +40,9 @@
* workgroup 0x41 network (3)
* computer 0x42 network (4)
* whole network 0x47 network (5)
* MSITStore 0x61 htmlhlp (7)
* history/favorites 0xb1 file
* share 0xc3
m
etwork (6)
* share 0xc3
n
etwork (6)
*
* guess: the persistant elements are non tracking
*
...
...
@@ -51,6 +52,8 @@
* (4) one string "\\sirius"
* (5) one string "whole network"
* (6) one string "\\sirius\c"
* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm"
* GUID 871C5380-42A0-1069-A2EA-08002B30309D
*/
#define PT_DESKTOP 0x00
/* internal */
...
...
@@ -76,8 +79,9 @@ typedef struct tagPIDLDATA
{
PIDLTYPE
type
;
/*00*/
union
{
struct
{
BYTE
dummy
;
GUID
guid
;
{
BYTE
dummy
;
/*01*/
GUID
guid
;
/*02*/
BYTE
dummy1
;
/*18*/
}
mycomp
;
struct
{
CHAR
szDriveName
[
20
];
/*01*/
...
...
@@ -98,6 +102,11 @@ typedef struct tagPIDLDATA
{
WORD
dummy
;
/*01*/
CHAR
szNames
[
1
];
/*03*/
}
network
;
struct
{
WORD
dummy
;
/*01*/
DWORD
dummy1
;
/*02*/
CHAR
szName
[
1
];
/*06*/
/* teminated by 0x00 0x00 */
}
htmlhelp
;
}
u
;
}
PIDLDATA
,
*
LPPIDLDATA
;
#include "poppack.h"
...
...
@@ -108,10 +117,12 @@ typedef struct tagPIDLDATA
* return value is strlen()
*/
DWORD
WINAPI
_ILGetDrive
(
LPCITEMIDLIST
,
LPSTR
,
UINT16
);
/*
DWORD WINAPI _ILGetItemText(LPCITEMIDLIST,LPSTR,UINT16);
DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST,LPSTR,DWORD);
DWORD WINAPI _ILGetValueText(LPCITEMIDLIST,LPSTR,DWORD);
DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
*/
/*
* getting special values from simple pidls
...
...
@@ -129,22 +140,22 @@ BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST);
BOOL
WINAPI
_ILIsDrive
(
LPCITEMIDLIST
);
BOOL
WINAPI
_ILIsFolder
(
LPCITEMIDLIST
);
BOOL
WINAPI
_ILIsValue
(
LPCITEMIDLIST
);
BOOL
WINAPI
_ILIsSpecialFolder
(
LPCITEMIDLIST
pidl
);
BOOL
WINAPI
_ILIsPidlSimple
(
LPCITEMIDLIST
pidl
);
/*
* simple pidls from strings
*/
LPITEMIDLIST
WINAPI
_ILCreateDesktop
(
void
);
LPITEMIDLIST
WINAPI
_ILCreateMyComputer
(
void
);
LPITEMIDLIST
WINAPI
_ILCreateIExplore
(
void
);
LPITEMIDLIST
WINAPI
_ILCreateDrive
(
LPCSTR
);
LPITEMIDLIST
WINAPI
_ILCreateFolder
(
LPCSTR
,
LPCSTR
);
LPITEMIDLIST
WINAPI
_ILCreateValue
(
LPCSTR
,
LPCSTR
);
LPITEMIDLIST
WINAPI
_ILCreateFolder
(
WIN32_FIND_DATAA
*
stffile
);
LPITEMIDLIST
WINAPI
_ILCreateValue
(
WIN32_FIND_DATAA
*
stffile
);
LPITEMIDLIST
WINAPI
_ILCreateSpecial
(
LPCSTR
szGUID
);
DWORD
WINAPI
_ILSimpleGetText
(
LPCITEMIDLIST
pidl
,
LPSTR
szOut
,
UINT
uOutSize
);
/*
* raw pidl handling (binary)
*
* data is binary / sizes are bytes
*/
DWORD
WINAPI
_ILGetData
(
PIDLTYPE
,
LPCITEMIDLIST
,
LPVOID
,
UINT
);
LPITEMIDLIST
WINAPI
_ILCreate
(
PIDLTYPE
,
LPCVOID
,
UINT16
);
/*
...
...
@@ -153,8 +164,7 @@ LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPCVOID,UINT16);
LPPIDLDATA
WINAPI
_ILGetDataPointer
(
LPCITEMIDLIST
);
LPSTR
WINAPI
_ILGetTextPointer
(
PIDLTYPE
type
,
LPPIDLDATA
pidldata
);
LPSTR
WINAPI
_ILGetSTextPointer
(
PIDLTYPE
type
,
LPPIDLDATA
pidldata
);
LPITEMIDLIST
WINAPI
ILFindChild
(
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
);
REFIID
WINAPI
_ILGetGUIDPointer
(
LPCITEMIDLIST
pidl
);
void
pdump
(
LPCITEMIDLIST
pidl
);
BOOL
pcheck
(
LPCITEMIDLIST
pidl
);
...
...
dlls/shell32/shell32_main.c
View file @
565b2e0b
This diff is collapsed.
Click to expand it.
dlls/shell32/shell32_main.h
View file @
565b2e0b
...
...
@@ -36,6 +36,7 @@ extern HIMAGELIST (WINAPI* pImageList_Create) (INT,INT,UINT,INT,INT);
extern
BOOL
(
WINAPI
*
pImageList_Draw
)
(
HIMAGELIST
himl
,
int
i
,
HDC
hdcDest
,
int
x
,
int
y
,
UINT
fStyle
);
extern
HICON
(
WINAPI
*
pImageList_GetIcon
)
(
HIMAGELIST
,
INT
,
UINT
);
extern
INT
(
WINAPI
*
pImageList_GetImageCount
)(
HIMAGELIST
);
extern
COLORREF
(
WINAPI
*
pImageList_SetBkColor
)(
HIMAGELIST
,
COLORREF
);
extern
LPVOID
(
WINAPI
*
pCOMCTL32_Alloc
)
(
INT
);
extern
BOOL
(
WINAPI
*
pCOMCTL32_Free
)
(
LPVOID
);
...
...
@@ -52,23 +53,6 @@ extern LPVOID (WINAPI* pDPA_DeletePtr) (const HDPA hdpa, INT i);
extern
HICON
(
WINAPI
*
pLookupIconIdFromDirectoryEx
)(
LPBYTE
dir
,
BOOL
bIcon
,
INT
width
,
INT
height
,
UINT
cFlag
);
extern
HICON
(
WINAPI
*
pCreateIconFromResourceEx
)(
LPBYTE
bits
,
UINT
cbSize
,
BOOL
bIcon
,
DWORD
dwVersion
,
INT
width
,
INT
height
,
UINT
cFlag
);
/* undocumented WINAPI functions not globaly exported */
LPITEMIDLIST
WINAPI
ILClone
(
LPCITEMIDLIST
pidl
);
LPITEMIDLIST
WINAPI
ILGetNext
(
LPITEMIDLIST
pidl
);
LPITEMIDLIST
WINAPI
ILCombine
(
LPCITEMIDLIST
iil1
,
LPCITEMIDLIST
iil2
);
LPITEMIDLIST
WINAPI
ILFindLastID
(
LPITEMIDLIST
pidl
);
DWORD
WINAPI
ILGetSize
(
LPITEMIDLIST
pidl
);
BOOL
WINAPI
ILGetDisplayName
(
LPCITEMIDLIST
pidl
,
LPSTR
path
);
DWORD
WINAPI
ILFree
(
LPITEMIDLIST
pidl
);
HRESULT
WINAPI
SHILCreateFromPathA
(
LPSTR
path
,
LPITEMIDLIST
*
ppidl
,
DWORD
attributes
);
HRESULT
WINAPI
SHILCreateFromPathW
(
LPWSTR
path
,
LPITEMIDLIST
*
ppidl
,
DWORD
attributes
);
HRESULT
WINAPI
SHILCreateFromPathAW
(
LPVOID
path
,
LPITEMIDLIST
*
ppidl
,
DWORD
attributes
);
LPITEMIDLIST
WINAPI
ILCreateFromPathA
(
LPSTR
path
);
LPITEMIDLIST
WINAPI
ILCreateFromPathW
(
LPWSTR
path
);
LPITEMIDLIST
WINAPI
ILCreateFromPathAW
(
LPVOID
path
);
BOOL
WINAPI
Shell_GetImageList
(
HIMAGELIST
*
lpBigList
,
HIMAGELIST
*
lpSmallList
);
HRESULT
WINAPI
StrRetToStrN
(
LPVOID
dest
,
DWORD
len
,
LPSTRRET
src
,
LPITEMIDLIST
pidl
);
...
...
@@ -82,43 +66,51 @@ BOOL PidlToSicIndex (IShellFolder * sh, LPITEMIDLIST pidl, BOOL bBigIcon, UINT *
BOOL
HCR_MapTypeToValue
(
LPCSTR
szExtension
,
LPSTR
szFileType
,
DWORD
len
);
BOOL
HCR_GetExecuteCommand
(
LPCSTR
szClass
,
LPCSTR
szVerb
,
LPSTR
szDest
,
DWORD
len
);
BOOL
HCR_GetDefaultIcon
(
LPCSTR
szClass
,
LPSTR
szDest
,
DWORD
len
,
LPDWORD
dwNr
);
BOOL
HCR_GetClassName
(
REFIID
riid
,
LPSTR
szDest
,
DWORD
len
);
BOOL
HCR_GetFolderAttributes
(
REFIID
riid
,
LPDWORD
szDest
);
DWORD
WINAPI
ParseFieldA
(
LPCSTR
src
,
DWORD
field
,
LPSTR
dst
,
DWORD
len
);
DWORD
WINAPI
ParseFieldA
(
LPCSTR
src
,
DWORD
field
,
LPSTR
dst
,
DWORD
len
);
HGLOBAL
WINAPI
SHAllocShared
(
LPVOID
psrc
,
DWORD
size
,
DWORD
procID
);
LPVOID
WINAPI
SHLockShared
(
HANDLE
hmem
,
DWORD
procID
);
BOOL
WINAPI
SHUnlockShared
(
HANDLE
pmem
);
LPVOID
WINAPI
SHLockShared
(
HANDLE
hmem
,
DWORD
procID
);
BOOL
WINAPI
SHUnlockShared
(
HANDLE
pmem
);
HANDLE
WINAPI
SHFreeShared
(
HANDLE
hmem
,
DWORD
procID
);
/****************************************************************************
* Class constructors
*/
extern
LPDATAOBJECT
IDataObject_Constructor
(
HWND
hwndOwner
,
LPSHELLFOLDER
psf
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
extern
LPENUMFORMATETC
IEnumFORMATETC_Constructor
(
UINT
,
const
FORMATETC
[]);
LPDATAOBJECT
IDataObject_Constructor
(
HWND
hwndOwner
,
LPITEMIDLIST
myPidl
,
LPITEMIDLIST
*
apidl
,
UINT
cidl
);
LPENUMFORMATETC
IEnumFORMATETC_Constructor
(
UINT
,
const
FORMATETC
[]);
LPCLASSFACTORY
IClassFactory_Constructor
(
REFCLSID
);
IContextMenu
*
IContextMenu_Constructor
(
LPSHELLFOLDER
pSFParent
,
LPCITEMIDLIST
pidl
,
LPCITEMIDLIST
*
aPidls
,
UINT
uItemCount
);
IContextMenu
*
ISvBgCm_Constructor
(
void
);
LPSHELLVIEW
IShellView_Constructor
(
LPSHELLFOLDER
);
LPSHELLLINK
IShellLink_Constructor
(
BOOL
);
extern
LPCLASSFACTORY
IClassFactory_Constructor
(
REFCLSID
);
extern
LPCONTEXTMENU
IContextMenu_Constructor
(
LPSHELLFOLDER
,
LPCITEMIDLIST
*
,
UINT
);
extern
LPSHELLVIEW
IShellView_Constructor
(
LPSHELLFOLDER
,
LPCITEMIDLIST
);
extern
LPSHELLLINK
IShellLink_Constructor
(
BOOL
);
extern
LPENUMIDLIST
IEnumIDList_Constructor
(
LPCSTR
,
DWORD
);
extern
LPEXTRACTICONA
IExtractIconA_Constructor
(
LPITEMIDLIST
);
extern
HRESULT
CreateStreamOnFile
(
LPCSTR
pszFilename
,
IStream
**
ppstm
);
IShellFolder
*
ISF_Desktop_Constructor
(
void
);
/* 3th parameter */
#define EIDL_DESK 0
#define EIDL_MYCOMP 1
#define EIDL_FILE 2
LPENUMIDLIST
IEnumIDList_Constructor
(
LPCSTR
,
DWORD
,
DWORD
);
LPEXTRACTICONA
IExtractIconA_Constructor
(
LPITEMIDLIST
);
HRESULT
CreateStreamOnFile
(
LPCSTR
pszFilename
,
IStream
**
ppstm
);
/* fixme: rename the functions when the shell32.dll has it's own exports namespace */
HRESULT
WINAPI
SHELL32_DllGetClassObject
(
REFCLSID
rclsid
,
REFIID
riid
,
LPVOID
*
ppv
);
HRESULT
WINAPI
SHELL32_DllCanUnloadNow
(
void
);
LRESULT
WINAPI
SHCoCreateInstance
(
LPSTR
,
REFCLSID
,
LPUNKNOWN
,
REFIID
,
LPVOID
*
);
/* fixme: move away */
#define ResultFromShort(i) MAKE_SCODE(SEVERITY_SUCCESS, 0, (USHORT)(i))
/* elements of this structure are accessed directly from within shell32 */
typedef
struct
{
ICOM_VTABLE
(
IShellFolder
)
*
lpvtbl
;
DWORD
ref
;
ICOM_VTABLE
(
IPersistFolder
)
*
lpvtblPersistFolder
;
LPSTR
sMyPath
;
LPITEMIDLIST
pMyPidl
;
LPITEMIDLIST
mpidl
;
}
IGenericSFImpl
;
extern
LPSHELLFOLDER
IShellFolder_Constructor
(
IGenericSFImpl
*
,
LPITEMIDLIST
);
/* menu merging */
#define MM_ADDSEPARATOR 0x00000001L
#define MM_SUBMENUSHAVEIDS 0x00000002L
HRESULT
WINAPI
Shell_MergeMenus
(
HMENU
hmDst
,
HMENU
hmSrc
,
UINT
uInsert
,
UINT
uIDAdjust
,
UINT
uIDAdjustMax
,
ULONG
uFlags
);
#endif
dlls/shell32/shlmenu.c
View file @
565b2e0b
...
...
@@ -7,6 +7,7 @@
#include "wine/obj_base.h"
#include "wine/obj_enumidlist.h"
#include "wine/obj_shellfolder.h"
#include "wine/undocshell.h"
#include "heap.h"
#include "debugtools.h"
...
...
@@ -111,7 +112,7 @@ static int FM_InitMenuPopup(HMENU hmenu, LPITEMIDLIST pAlternatePidl)
MENUINFO
MenuInfo
;
LPFMINFO
menudata
;
TRACE
(
"
\n
"
);
TRACE
(
"
0x%04x %p
\n
"
,
hmenu
,
pAlternatePidl
);
MenuInfo
.
cbSize
=
sizeof
(
MENUINFO
);
MenuInfo
.
fMask
=
MIM_MENUDATA
;
...
...
@@ -765,26 +766,27 @@ BOOL _SHIsMenuSeparator(HMENU hm, int i)
mii
.
fMask
=
MIIM_TYPE
;
mii
.
cch
=
0
;
/* WARNING: We MUST initialize it to 0*/
if
(
!
GetMenuItemInfoA
(
hm
,
i
,
TRUE
,
&
mii
))
{
return
(
FALSE
);
{
return
(
FALSE
);
}
if
(
mii
.
fType
&
MFT_SEPARATOR
)
{
return
(
TRUE
);
{
return
(
TRUE
);
}
return
(
FALSE
);
return
(
FALSE
);
}
#define MM_ADDSEPARATOR 0x00000001L
#define MM_SUBMENUSHAVEIDS 0x00000002L
HRESULT
WINAPI
Shell_MergeMenus
(
HMENU
hmDst
,
HMENU
hmSrc
,
UINT
uInsert
,
UINT
uIDAdjust
,
UINT
uIDAdjustMax
,
ULONG
uFlags
)
{
int
nItem
;
HMENU
hmSubMenu
;
BOOL
bAlreadySeparated
;
MENUITEMINFOA
miiSrc
;
MENUITEMINFOA
miiSrc
;
char
szName
[
256
];
UINT
uTemp
,
uIDMax
=
uIDAdjust
;
FIXME
(
"hmenu1=0x%04x hmenu2=0x%04x 0x%04x 0x%04x 0x%04x 0x%04lx stub
\n
"
,
TRACE
(
"hmenu1=0x%04x hmenu2=0x%04x 0x%04x 0x%04x 0x%04x 0x%04lx
\n
"
,
hmDst
,
hmSrc
,
uInsert
,
uIDAdjust
,
uIDAdjustMax
,
uFlags
);
if
(
!
hmDst
||
!
hmSrc
)
...
...
@@ -792,15 +794,20 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
}
nItem
=
GetMenuItemCount
(
hmDst
);
if
(
uInsert
>=
(
UINT
)
nItem
)
{
uInsert
=
(
UINT
)
nItem
;
if
(
uInsert
>=
(
UINT
)
nItem
)
/* insert position inside menu? */
{
uInsert
=
(
UINT
)
nItem
;
/* append on the end */
bAlreadySeparated
=
TRUE
;
}
else
{
bAlreadySeparated
=
_SHIsMenuSeparator
(
hmDst
,
uInsert
);;
{
bAlreadySeparated
=
_SHIsMenuSeparator
(
hmDst
,
uInsert
);;
}
if
((
uFlags
&
MM_ADDSEPARATOR
)
&&
!
bAlreadySeparated
)
{
/* Add a separator between the menus */
{
/* Add a separator between the menus */
InsertMenuA
(
hmDst
,
uInsert
,
MF_BYPOSITION
|
MF_SEPARATOR
,
0
,
NULL
);
bAlreadySeparated
=
TRUE
;
}
...
...
@@ -808,83 +815,104 @@ HRESULT WINAPI Shell_MergeMenus (HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uI
/* Go through the menu items and clone them*/
for
(
nItem
=
GetMenuItemCount
(
hmSrc
)
-
1
;
nItem
>=
0
;
nItem
--
)
{
miiSrc
.
cbSize
=
sizeof
(
MENUITEMINFOA
);
miiSrc
.
fMask
=
MIIM_STATE
|
MIIM_ID
|
MIIM_SUBMENU
|
MIIM_CHECKMARKS
|
MIIM_TYPE
|
MIIM_DATA
;
/* We need to reset this every time through the loop in case
menus DON'T have IDs*/
{
miiSrc
.
cbSize
=
sizeof
(
MENUITEMINFOA
);
miiSrc
.
fMask
=
MIIM_STATE
|
MIIM_ID
|
MIIM_SUBMENU
|
MIIM_CHECKMARKS
|
MIIM_TYPE
|
MIIM_DATA
;
/* We need to reset this every time through the loop in case menus DON'T have IDs*/
miiSrc
.
fType
=
MFT_STRING
;
miiSrc
.
dwTypeData
=
szName
;
miiSrc
.
dwItemData
=
0
;
miiSrc
.
cch
=
sizeof
(
szName
);
if
(
!
GetMenuItemInfoA
(
hmSrc
,
nItem
,
TRUE
,
&
miiSrc
))
{
continue
;
{
continue
;
}
/* TRACE("found menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmSrc, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu);
*/
if
(
miiSrc
.
fType
&
MFT_SEPARATOR
)
{
/* This is a separator; don't put two of them in a row*/
{
/* This is a separator; don't put two of them in a row */
if
(
bAlreadySeparated
)
{
continue
;
}
continue
;
bAlreadySeparated
=
TRUE
;
}
else
if
(
miiSrc
.
hSubMenu
)
{
if
(
uFlags
&
MM_SUBMENUSHAVEIDS
)
{
/* Adjust the ID and check it*/
miiSrc
.
wID
+=
uIDAdjust
;
if
(
miiSrc
.
wID
>
uIDAdjustMax
)
{
continue
;
}
if
(
uIDMax
<=
miiSrc
.
wID
)
{
uIDMax
=
miiSrc
.
wID
+
1
;
}
{
if
(
uFlags
&
MM_SUBMENUSHAVEIDS
)
{
miiSrc
.
wID
+=
uIDAdjust
;
/* add uIDAdjust to the ID */
if
(
miiSrc
.
wID
>
uIDAdjustMax
)
/* skip ID's higher uIDAdjustMax */
continue
;
if
(
uIDMax
<=
miiSrc
.
wID
)
/* remember the highest ID */
uIDMax
=
miiSrc
.
wID
+
1
;
}
else
{
/* Don't set IDs for submenus that didn't have them already */
miiSrc
.
fMask
&=
~
MIIM_ID
;
{
miiSrc
.
fMask
&=
~
MIIM_ID
;
/* Don't set IDs for submenus that didn't have them already */
}
hmSubMenu
=
miiSrc
.
hSubMenu
;
miiSrc
.
hSubMenu
=
CreatePopupMenu
();
if
(
!
miiSrc
.
hSubMenu
)
{
return
(
uIDMax
);
}
uTemp
=
Shell_MergeMenus
(
miiSrc
.
hSubMenu
,
hmSubMenu
,
0
,
uIDAdjust
,
uIDAdjustMax
,
uFlags
&
MM_SUBMENUSHAVEIDS
);
if
(
!
miiSrc
.
hSubMenu
)
return
(
uIDMax
);
uTemp
=
Shell_MergeMenus
(
miiSrc
.
hSubMenu
,
hmSubMenu
,
0
,
uIDAdjust
,
uIDAdjustMax
,
uFlags
&
MM_SUBMENUSHAVEIDS
);
if
(
uIDMax
<=
uTemp
)
{
uIDMax
=
uTemp
;
}
uIDMax
=
uTemp
;
bAlreadySeparated
=
FALSE
;
}
else
{
/* Adjust the ID and check it*/
miiSrc
.
wID
+=
uIDAdjust
;
if
(
miiSrc
.
wID
>
uIDAdjustMax
)
{
continue
;
}
if
(
uIDMax
<=
miiSrc
.
wID
)
{
uIDMax
=
miiSrc
.
wID
+
1
;
}
else
/* normal menu item */
{
miiSrc
.
wID
+=
uIDAdjust
;
/* add uIDAdjust to the ID */
if
(
miiSrc
.
wID
>
uIDAdjustMax
)
/* skip ID's higher uIDAdjustMax */
continue
;
if
(
uIDMax
<=
miiSrc
.
wID
)
/* remember the highest ID */
uIDMax
=
miiSrc
.
wID
+
1
;
bAlreadySeparated
=
FALSE
;
}
/* TRACE("inserting menu=0x%04x %s id=0x%04x mask=0x%08x smenu=0x%04x\n", hmDst, debugstr_a(miiSrc.dwTypeData), miiSrc.wID, miiSrc.fMask, miiSrc.hSubMenu);
*/
if
(
!
InsertMenuItemA
(
hmDst
,
uInsert
,
TRUE
,
&
miiSrc
))
{
return
(
uIDMax
);
{
return
(
uIDMax
);
}
}
/* Ensure the correct number of separators at the beginning of the
inserted menu items*/
if
(
uInsert
==
0
)
{
if
(
bAlreadySeparated
)
{
DeleteMenu
(
hmDst
,
uInsert
,
MF_BYPOSITION
);
{
if
(
bAlreadySeparated
)
{
DeleteMenu
(
hmDst
,
uInsert
,
MF_BYPOSITION
);
}
}
else
{
if
(
_SHIsMenuSeparator
(
hmDst
,
uInsert
-
1
))
{
if
(
bAlreadySeparated
)
{
DeleteMenu
(
hmDst
,
uInsert
,
MF_BYPOSITION
);
{
if
(
_SHIsMenuSeparator
(
hmDst
,
uInsert
-
1
))
{
if
(
bAlreadySeparated
)
{
DeleteMenu
(
hmDst
,
uInsert
,
MF_BYPOSITION
);
}
}
else
{
if
((
uFlags
&
MM_ADDSEPARATOR
)
&&
!
bAlreadySeparated
)
{
/* Add a separator between the menus*/
{
if
((
uFlags
&
MM_ADDSEPARATOR
)
&&
!
bAlreadySeparated
)
{
/* Add a separator between the menus*/
InsertMenuA
(
hmDst
,
uInsert
,
MF_BYPOSITION
|
MF_SEPARATOR
,
0
,
NULL
);
}
}
...
...
include/shell.h
View file @
565b2e0b
...
...
@@ -73,8 +73,8 @@ typedef struct
}
ITEMIDLIST
,
*
LPITEMIDLIST
,
*
LPCITEMIDLIST
;
#include "poppack.h"
DWORD
WINAPI
SHGetPathFromIDListA
(
LPCITEMIDLIST
pidl
,
LPSTR
pszPath
);
DWORD
WINAPI
SHGetPathFromIDListW
(
LPCITEMIDLIST
pidl
,
LPWSTR
pszPath
);
BOOL
WINAPI
SHGetPathFromIDListA
(
LPCITEMIDLIST
pidl
,
LPSTR
pszPath
);
BOOL
WINAPI
SHGetPathFromIDListW
(
LPCITEMIDLIST
pidl
,
LPWSTR
pszPath
);
#define SHGetPathFromIDList WINELIB_NAME_AW(SHGetPathFromIDList)
...
...
include/shlguid.h
View file @
565b2e0b
...
...
@@ -31,8 +31,11 @@ DEFINE_GUID (IID_IDockingWindow, 0x012dd920L, 0x7B26, 0x11D0, 0x8C, 0xA9, 0x00,
DEFINE_GUID
(
IID_IDockingWindowSite
,
0x2A342FC2L
,
0x7B26
,
0x11D0
,
0x8C
,
0xA9
,
0x00
,
0xA0
,
0xC9
,
0x2D
,
0xBF
,
0xE8
);
/****************************************************************************
*
the following should be moved to the right place
*
undocumented stuff
*/
DEFINE_GUID
(
IID_MyComputer
,
0x20D04FE0L
,
0x3AEA
,
0x1069
,
0xA2
,
0xD8
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
/* the next two IID's are the namespace elements in the desktop folder */
DEFINE_GUID
(
IID_MyComputer
,
0x20D04FE0L
,
0x3AEA
,
0x1069
,
0xA2
,
0xD8
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
DEFINE_GUID
(
IID_IExplore
,
0x871C5380L
,
0x42A0
,
0x1069
,
0xA2
,
0xEA
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
DEFINE_GUID
(
CLSID_PaperBin
,
0x645FF040L
,
0x5081
,
0x101B
,
0x9F
,
0x08
,
0x00
,
0xAA
,
0x00
,
0x2F
,
0x95
,
0x4E
);
#endif
/* __WINE_SHLGUID_H */
include/shlobj.h
View file @
565b2e0b
...
...
@@ -41,7 +41,7 @@ extern UINT cfShellIDList;
typedef
struct
{
UINT
cidl
;
UINT
aoffset
[
1
];
}
CIDA
,
*
LPCIDA
;
}
CIDA
,
*
LPCIDA
,
*
LPIDA
;
#define CFSTR_SHELLIDLISTOFFSET "Shell Object Offsets"
/* CF_OBJECTPOSITIONS */
#define CFSTR_NETRESOURCES "Net Resource"
/* CF_NETRESOURCE */
...
...
@@ -299,6 +299,11 @@ HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, int n
HRESULT
WINAPI
SHGetDataFromIDListW
(
LPSHELLFOLDER
psf
,
LPCITEMIDLIST
pidl
,
int
nFormat
,
LPVOID
pv
,
int
cb
);
#define SHGetDataFromIDList WINELIB_NAME_AW(SHGetDataFromIDList)
BOOL
WINAPI
SHGetSpecialFolderPathA
(
HWND
hwndOwner
,
LPSTR
szPath
,
DWORD
csidl
,
BOOL
bCreate
);
BOOL
WINAPI
SHGetSpecialFolderPathW
(
HWND
hwndOwner
,
LPWSTR
szPath
,
DWORD
csidl
,
BOOL
bCreate
);
#define SHGetSpecialFolderPath WINELIB_NAME_AW(SHGetSpecialFolderPath)
HRESULT
WINAPI
SHGetSpecialFolderLocation
(
HWND
hwndOwner
,
INT
nFolder
,
LPITEMIDLIST
*
ppidl
);
/****************************************************************************
* shlview structures
...
...
include/wine/obj_enumidlist.h
View file @
565b2e0b
...
...
@@ -26,10 +26,7 @@ typedef struct IEnumIDList IEnumIDList, *LPENUMIDLIST;
ICOM_METHOD3(HRESULT, Next, ULONG, celt, LPITEMIDLIST*, rgelt, ULONG*, pceltFetched) \
ICOM_METHOD1(HRESULT, Skip, ULONG, celt) \
ICOM_METHOD (HRESULT, Reset) \
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum) \
ICOM_METHOD2(BOOL, CreateEnumList, LPCSTR,, DWORD,) \
ICOM_METHOD1(BOOL, AddToEnumList, LPITEMIDLIST,) \
ICOM_METHOD (BOOL, DeleteList)
ICOM_METHOD1(HRESULT, Clone, IEnumIDList**, ppenum)
#define IEnumIDList_IMETHODS \
IUnknown_IMETHODS \
IEnumIDList_METHODS
...
...
@@ -46,9 +43,6 @@ ICOM_DEFINE(IEnumIDList,IUnknown)
#define IEnumIDList_Skip(p,a) ICOM_CALL1(Skip,p,a)
#define IEnumIDList_Reset(p) ICOM_CALL(Reset,p)
#define IEnumIDList_Clone(p,a) ICOM_CALL1(Clone,p,a)
#define IEnumIDList_CreateEnumList(p,a,b) ICOM_CALL2(CreateEnumList,p,a,b)
#define IEnumIDList_AddToEnumList(p,a) ICOM_CALL1(AddToEnumList,p,a)
#define IEnumIDList_DeleteList(p) ICOM_CALL(DeleteList,p)
#endif
#ifdef __cplusplus
...
...
include/wine/obj_shellfolder.h
View file @
565b2e0b
...
...
@@ -82,6 +82,7 @@ typedef enum tagSHCONTF
#define SFGAO_SHARE 0x00020000L
/* shared */
#define SFGAO_READONLY 0x00040000L
/* read-only */
#define SFGAO_GHOSTED 0x00080000L
/* ghosted icon */
#define SFGAO_HIDDEN 0x00080000L
/* hidden object */
#define SFGAO_DISPLAYATTRMASK 0x000F0000L
#define SFGAO_FILESYSANCESTOR 0x10000000L
/* It contains file system folder */
#define SFGAO_FOLDER 0x20000000L
/* It's a folder. */
...
...
@@ -90,6 +91,9 @@ typedef enum tagSHCONTF
#define SFGAO_CONTENTSMASK 0x80000000L
#define SFGAO_VALIDATE 0x01000000L
/* invalidate cached information */
#define SFGAO_REMOVABLE 0x02000000L
/* is this removeable media? */
#define SFGAO_BROWSABLE 0x08000000L
/* is in-place browsable */
#define SFGAO_NONENUMERATED 0x00100000L
/* is a non-enumerated object */
#define SFGAO_NEWCONTENT 0x00200000L
/* should show bold in explorer tree */
/************************************************************************
*
...
...
@@ -182,6 +186,11 @@ ICOM_DEFINE(IShellFolder,IUnknown)
/*****************************************************************************
* IPersistFolder interface
*/
DEFINE_GUID
(
CLSID_SFMyComp
,
0x20D04FE0
,
0x3AEA
,
0x1069
,
0xA2
,
0xD8
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
DEFINE_GUID
(
CLSID_SFINet
,
0x871C5380
,
0x42A0
,
0x1069
,
0xA2
,
0xEA
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
DEFINE_GUID
(
CLSID_SFFile
,
0xF3364BA0
,
0x65B9
,
0x11CE
,
0xA9
,
0xBA
,
0x00
,
0xAA
,
0x00
,
0x4A
,
0xE8
,
0x37
);
#define ICOM_INTERFACE IPersistFolder
#define IPersistFolder_METHODS \
ICOM_METHOD1( HRESULT, Initialize, LPCITEMIDLIST, pidl)
...
...
relay32/shell32.spec
View file @
565b2e0b
...
...
@@ -75,7 +75,7 @@ init Shell32LibMain
67 stdcall Shell_MergeMenus (long long long long long long) Shell_MergeMenus
68 stdcall SHGetSettings(ptr long long) SHGetSettings
69 stub SHGetNetResource
70 st
ub
SHCreateDefClassObject
70 st
dcall SHCreateDefClassObject(long long long long long)
SHCreateDefClassObject
71 stdcall Shell_GetImageList(ptr ptr) Shell_GetImageList
72 stdcall Shell_GetCachedImageIndex(ptr ptr long) Shell_GetCachedImageIndexA # ASCII!!!
73 stub SHShellFolderView_Message
...
...
@@ -83,7 +83,7 @@ init Shell32LibMain
75 stdcall PathYetAnotherMakeUniqueName(ptr ptr) PathYetAnotherMakeUniqueNameA
76 stub DragQueryInfo
77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN
AW
79 stdcall StrToOleStrN(wstr long str long) StrToOleStrNAW
80 stdcall DragFinish(long) DragFinish
81 stdcall DragQueryFile(long long ptr long) DragQueryFileA
...
...
@@ -152,7 +152,7 @@ init Shell32LibMain
144 stdcall FileMenu_GetItemExtent (long long) FileMenu_GetItemExtent
145 stdcall PathFindOnPath (ptr ptr) PathFindOnPathAW
146 stdcall RLBuildListOfPaths()RLBuildListOfPaths
147 stdcall SHCLSIDFromString(long long) SHCLSIDFromString
147 stdcall SHCLSIDFromString(long long) SHCLSIDFromString
AW
148 stdcall ExtractAssociatedIconA(long ptr long) ExtractAssociatedIconA # exported by name
149 stdcall SHFind_InitMenuPopup(long long long long) SHFind_InitMenuPopup
150 stub ExtractAssociatedIconExA # exported by name
...
...
@@ -180,7 +180,7 @@ init Shell32LibMain
172 stub SHCreateLinks
173 stdcall SHValidateUNC(long long long)SHValidateUNC
174 stdcall SHCreateShellFolderViewEx (ptr ptr) SHCreateShellFolderViewEx
175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPath
175 stdcall SHGetSpecialFolderPath(long long long long) SHGetSpecialFolderPath
AW
176 stdcall SHSetInstanceExplorer (long) SHSetInstanceExplorer
177 stub DAD_SetDragImageFromListView
178 stub SHObjectProperties
...
...
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