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
6acd0599
Commit
6acd0599
authored
Oct 11, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Oct 11, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfixes, shellview uses DPA's now, IShellView_GetItemObject implemented.
parent
bbb946f0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
141 additions
and
101 deletions
+141
-101
shellole.c
dlls/shell32/shellole.c
+1
-1
shellord.c
dlls/shell32/shellord.c
+70
-20
shlfolder.c
dlls/shell32/shlfolder.c
+63
-77
shlview.c
dlls/shell32/shlview.c
+0
-0
shell.h
include/shell.h
+7
-3
No files found.
dlls/shell32/shellole.c
View file @
6acd0599
...
...
@@ -304,7 +304,7 @@ static HRESULT WINAPI IClassFactory_CreateInstance(
{
pObj
=
(
IUnknown
*
)
IShellFolder_Constructor
(
NULL
,
NULL
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellView
))
{
pObj
=
(
IUnknown
*
)
IShellView_Constructor
();
{
pObj
=
(
IUnknown
*
)
IShellView_Constructor
(
NULL
,
NULL
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLink
))
{
pObj
=
(
IUnknown
*
)
IShellLink_Constructor
();
...
...
dlls/shell32/shellord.c
View file @
6acd0599
...
...
@@ -117,16 +117,16 @@ LPSTR WINAPI PathFindExtension(LPSTR path) {
* append \ if there is none
*/
LPSTR
WINAPI
PathAddBackslash
(
LPSTR
path
)
{
int
len
;
TRACE
(
shell
,
"%p->%s
\n
"
,
path
,
path
);
len
=
strlen
(
path
);
if
(
len
&&
path
[
len
-
1
]
!=
'\\'
)
{
path
[
len
+
0
]
=
'\\'
;
path
[
len
+
1
]
=
'\0
'
;
return
path
+
len
+
1
;
}
else
return
path
+
len
;
{
int
len
;
TRACE
(
shell
,
"%p->%s
\n
"
,
path
,
path
);
len
=
strlen
(
path
);
if
(
len
&&
path
[
len
-
1
]
!=
'\\'
)
{
path
[
len
]
=
'\\
'
;
path
[
len
+
1
]
=
0x00
;
return
path
+
len
+
1
;
}
return
path
+
len
;
}
/*************************************************************************
...
...
@@ -232,17 +232,25 @@ LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
*
* NOTES
* if lpszFile='.' skip it
* szDest can be equal to lpszFile. Thats why we use sTemp
*/
LPSTR
WINAPI
PathCombine
(
LPSTR
szDest
,
LPCSTR
lpszDir
,
LPCSTR
lpszFile
)
{
TRACE
(
shell
,
"%s %s
\n
"
,
lpszDir
,
lpszFile
);
{
char
sTemp
[
MAX_PATH
];
TRACE
(
shell
,
"%p %p->%s %p->%s
\n
"
,
szDest
,
lpszDir
,
lpszDir
,
lpszFile
,
lpszFile
);
if
(
!
lpszFile
||
!
lpszFile
[
0
]
||
(
lpszFile
[
0
]
==
'.'
&&
!
lpszFile
[
1
])
)
{
strcpy
(
szDest
,
lpszDir
);
return
szDest
;
}
strcpy
(
szDest
,
lpszDir
);
PathAddBackslash
(
szDest
);
strcat
(
szDest
,
lpszFile
);
/* if lpszFile is a complete path don't care about lpszDir */
if
(
PathIsRoot
(
lpszFile
))
{
strcpy
(
szDest
,
lpszFile
);
}
strcpy
(
sTemp
,
lpszDir
);
PathAddBackslash
(
sTemp
);
strcat
(
sTemp
,
lpszFile
);
strcpy
(
szDest
,
sTemp
);
return
szDest
;
}
...
...
@@ -777,15 +785,33 @@ DWORD WINAPI SHAddToRecentDocs32 (UINT32 uFlags,LPCVOID pv)
}
return
0
;
}
/*************************************************************************
* SHFileOperation32 [SHELL32.242]
*
*/
DWORD
WINAPI
SHFileOperation32
(
DWORD
x
)
{
FIXME
(
shell
,
"0x%08lx stub
\n
"
,
x
);
return
0
;
}
/*************************************************************************
* SHFileOperation
[SHELL32.242
]
* SHFileOperation
32A [SHELL32.243
]
*
* NOTES
* exported by name
*/
DWORD
WINAPI
SHFileOperation32
(
LPSHFILEOPSTRUCT32A
lpFileOp
)
DWORD
WINAPI
SHFileOperation32A
(
LPSHFILEOPSTRUCT32A
lpFileOp
)
{
FIXME
(
shell
,
"(%p):stub.
\n
"
,
lpFileOp
);
return
1
;
}
/*************************************************************************
* SHFileOperation32W [SHELL32.244]
*
* NOTES
* exported by name
*/
DWORD
WINAPI
SHFileOperation32W
(
LPSHFILEOPSTRUCT32W
lpFileOp
)
{
FIXME
(
shell
,
"(%p):stub.
\n
"
,
lpFileOp
);
return
1
;
}
...
...
@@ -964,13 +990,37 @@ HRESULT WINAPI SHGetDataFromIDListA(DWORD u, DWORD v, DWORD w, DWORD x, DWORD y)
return
0
;
}
/*************************************************************************
* SH
FileOperationA [SHELL32.243
]
* SH
RegQueryValueEx32W [NT4.0:SHELL32.511
]
*
*/
HRESULT
WINAPI
SH
FileOperationA
(
DWORD
x
)
{
FIXME
(
shell
,
"0x%0
8lx stub
\n
"
,
x
);
HRESULT
WINAPI
SH
RegQueryValueEx32W
(
DWORD
u
,
LPWSTR
v
,
DWORD
w
,
DWORD
x
,
DWORD
y
,
DWORD
z
)
{
FIXME
(
shell
,
"0x%0
4lx %s 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub
\n
"
,
u
,
debugstr_w
(
v
),
w
,
x
,
y
,
z
);
return
0
;
}
/*************************************************************************
* ReadCabinetState [NT 4.0:SHELL32.651]
*
*/
HRESULT
WINAPI
ReadCabinetState
(
DWORD
u
,
DWORD
v
)
{
FIXME
(
shell
,
"0x%04lx 0x%04lx stub
\n
"
,
u
,
v
);
return
0
;
}
/*************************************************************************
* WriteCabinetState [NT 4.0:SHELL32.652]
*
*/
HRESULT
WINAPI
WriteCabinetState
(
DWORD
u
)
{
FIXME
(
shell
,
"0x%04lx stub
\n
"
,
u
);
return
0
;
}
/*************************************************************************
* IsUserAdmin [NT 4.0:SHELL32.680]
*
*/
HRESULT
WINAPI
IsUserAdmin
()
{
FIXME
(
shell
,
"stub
\n
"
);
return
TRUE
;
}
/*************************************************************************
* SHFlushClipboard [SHELL32.121]
...
...
dlls/shell32/shlfolder.c
View file @
6acd0599
...
...
@@ -378,14 +378,16 @@ static HRESULT WINAPI IShellFolder_BindToStorage(
* LPARAM lParam, //[in ] Column?
* LPCITEMIDLIST pidl1, //[in ] simple pidl
* LPCITEMIDLIST pidl2) //[in ] simple pidl
*
* NOTES
* Special case - If one of the items is a Path and the other is a File,
* always make the Path come before the File.
*
* FIXME
* we have to handle simple pidl's only
* we have to handle simple pidl's only
(?)
*/
static
HRESULT
WINAPI
IShellFolder_CompareIDs
(
LPSHELLFOLDER
this
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
/*simple pidl*/
LPCITEMIDLIST
pidl2
)
/*simple pidl*/
static
HRESULT
WINAPI
IShellFolder_CompareIDs
(
LPSHELLFOLDER
this
,
LPARAM
lParam
,
LPCITEMIDLIST
pidl1
,
LPCITEMIDLIST
pidl2
)
{
CHAR
szString1
[
MAX_PATH
]
=
""
;
CHAR
szString2
[
MAX_PATH
]
=
""
;
int
nReturn
;
...
...
@@ -393,9 +395,13 @@ static HRESULT WINAPI IShellFolder_CompareIDs(
TRACE
(
shell
,
"(%p)->(0x%08lx,pidl1=%p,pidl2=%p)
\n
"
,
this
,
lParam
,
pidl1
,
pidl2
);
/*Special case - If one of the items is a Path and the other is a File, always
make the Path come before the File.*/
if
(
!
pidl1
&&
!
pidl2
)
return
0
;
if
(
!
pidl1
)
/* Desktop < anything */
return
-
1
;
if
(
!
pidl2
)
return
1
;
/* get the last item in each list */
while
((
ILGetNext
(
pidlTemp1
))
->
mkid
.
cb
)
pidlTemp1
=
ILGetNext
(
pidlTemp1
);
...
...
@@ -412,12 +418,14 @@ static HRESULT WINAPI IShellFolder_CompareIDs(
_ILGetDrive
(
pidl1
,
szString1
,
sizeof
(
szString1
));
_ILGetDrive
(
pidl2
,
szString1
,
sizeof
(
szString2
));
nReturn
=
strcasecmp
(
szString1
,
szString2
);
if
(
nReturn
)
return
nReturn
;
_ILGetFolderText
(
pidl1
,
szString1
,
sizeof
(
szString1
));
_ILGetFolderText
(
pidl2
,
szString2
,
sizeof
(
szString2
));
nReturn
=
strcasecmp
(
szString1
,
szString2
);
if
(
nReturn
)
return
nReturn
;
...
...
@@ -439,27 +447,24 @@ static HRESULT WINAPI IShellFolder_CompareIDs(
* NOTES
* the same as SHCreateShellFolderViewEx ???
*/
static
HRESULT
WINAPI
IShellFolder_CreateViewObject
(
LPSHELLFOLDER
this
,
HWND32
hwndOwner
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
LPSHELLVIEW
pShellView
;
char
xriid
[
50
];
HRESULT
hr
;
static
HRESULT
WINAPI
IShellFolder_CreateViewObject
(
LPSHELLFOLDER
this
,
HWND32
hwndOwner
,
REFIID
riid
,
LPVOID
*
ppvOut
)
{
LPSHELLVIEW
pShellView
;
char
xriid
[
50
];
HRESULT
hr
;
WINE_StringFromCLSID
(
riid
,
xriid
);
TRACE
(
shell
,
"(%p)->(hwnd=0x%x,
\n\t
IID:
\t
%s,%p)
\n
"
,
this
,
hwndOwner
,
xriid
,
ppvOut
);
TRACE
(
shell
,
"(%p)->(hwnd=0x%x,
\n\t
IID:
\t
%s,%p)
\n
"
,
this
,
hwndOwner
,
xriid
,
ppvOut
);
*
ppvOut
=
NULL
;
pShellView
=
IShellView_Constructor
(
this
,
this
->
mpidl
);
if
(
!
pShellView
)
return
E_OUTOFMEMORY
;
hr
=
pShellView
->
lpvtbl
->
fnQueryInterface
(
pShellView
,
riid
,
ppvOut
);
pShellView
->
lpvtbl
->
fnRelease
(
pShellView
);
TRACE
(
shell
,
"-- (%p)->(interface=%p)
\n
"
,
this
,
ppvOut
);
return
hr
;
pShellView
=
IShellView_Constructor
(
this
,
this
->
mpidl
);
if
(
!
pShellView
)
return
E_OUTOFMEMORY
;
hr
=
pShellView
->
lpvtbl
->
fnQueryInterface
(
pShellView
,
riid
,
ppvOut
);
pShellView
->
lpvtbl
->
fnRelease
(
pShellView
);
TRACE
(
shell
,
"-- (%p)->(interface=%p)
\n
"
,
this
,
ppvOut
);
return
hr
;
}
/**************************************************************************
...
...
@@ -494,7 +499,8 @@ static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT32 cid
do
{
if
(
*
pidltemp
)
{
if
(
_ILIsDesktop
(
*
pidltemp
))
{
pdump
(
*
pidltemp
);
if
(
_ILIsDesktop
(
*
pidltemp
))
{
*
rgfInOut
|=
(
SFGAO_HASSUBFOLDER
|
SFGAO_FOLDER
|
SFGAO_DROPTARGET
|
SFGAO_HASPROPSHEET
|
SFGAO_CANLINK
);
}
else
if
(
_ILIsMyComputer
(
*
pidltemp
))
...
...
@@ -541,63 +547,43 @@ static HRESULT WINAPI IShellFolder_GetAttributesOf(LPSHELLFOLDER this,UINT32 cid
*/
static
HRESULT
WINAPI
IShellFolder_GetUIObjectOf
(
LPSHELLFOLDER
this
,
HWND32
hwndOwner
,
UINT32
cidl
,
LPCITEMIDLIST
*
apidl
,
REFIID
riid
,
UINT32
*
prgfInOut
,
LPVOID
*
ppvOut
)
{
char
xclsid
[
50
];
LPEXTRACTICON
pei
;
LPCONTEXTMENU
pcm
;
LPITEMIDLIST
pidl
;
{
char
xclsid
[
50
];
LPITEMIDLIST
pidl
;
LPUNKNOWN
pObj
=
NULL
;
WINE_StringFromCLSID
(
riid
,
xclsid
);
WINE_StringFromCLSID
(
riid
,
xclsid
);
TRACE
(
shell
,
"(%p)->(%u,%u,pidl=%p,
\n\t
IID:%s,%p,%p)
\n
"
,
TRACE
(
shell
,
"(%p)->(%u,%u,pidl=%p,
\n\t
IID:%s,%p,%p)
\n
"
,
this
,
hwndOwner
,
cidl
,
apidl
,
xclsid
,
prgfInOut
,
ppvOut
);
*
ppvOut
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
pcm
=
IContextMenu_Constructor
(
this
,
apidl
,
cidl
);
if
(
pcm
)
{
*
ppvOut
=
pcm
;
return
S_OK
;
}
}
if
(
cidl
!=
1
)
return
E_FAIL
;
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIcon
))
{
pidl
=
ILCombine
(
this
->
mpidl
,
apidl
[
0
]);
pei
=
IExtractIcon_Constructor
(
pidl
);
/* The temp PIDL can be deleted because the new CExtractIcon either failed or
made its own copy of it. */
SHFree
(
pidl
);
*
ppvOut
=
NULL
;
if
(
pei
)
{
*
ppvOut
=
pei
;
return
S_OK
;
}
return
E_OUTOFMEMORY
;
}
if
(
IsEqualIID
(
riid
,
&
IID_IContextMenu
))
{
if
(
cidl
<
1
)
return
E_INVALIDARG
;
pObj
=
(
LPUNKNOWN
)
IContextMenu_Constructor
(
this
,
apidl
,
cidl
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IDataObject
))
{
if
(
cidl
<
1
)
return
(
E_INVALIDARG
);
pObj
=
(
LPUNKNOWN
)
IDataObject_Constructor
(
hwndOwner
,
this
,
apidl
,
cidl
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIcon
))
{
if
(
cidl
!=
1
)
return
(
E_INVALIDARG
);
pidl
=
ILCombine
(
this
->
mpidl
,
apidl
[
0
]);
pObj
=
(
LPUNKNOWN
)
IExtractIcon_Constructor
(
pidl
);
SHFree
(
pidl
);
}
else
{
ERR
(
shell
,
"(%p)->E_NOINTERFACE
\n
"
,
this
);
return
E_NOINTERFACE
;
}
if
(
!
pObj
)
return
E_OUTOFMEMORY
;
/* if(IsEqualIID(riid, IID_IQueryInfo))
{ CQueryInfo *pqit;
LPITEMIDLIST pidl;
pidl = m_pPidlMgr->Concatenate(m_pidl, pPidl[0]);
pqit = new CQueryInfo(pidl);
*/
/* The temp PIDL can be deleted because the new CQueryInfo either failed or
made its own copy of it. */
/* m_pPidlMgr->Delete(pidl);
if(pqit)
{ *ppvReturn = pqit;
return S_OK;
}
return E_OUTOFMEMORY;
}
*/
ERR
(
shell
,
"(%p)->E_NOINTERFACE
\n
"
,
this
);
return
E_NOINTERFACE
;
*
ppvOut
=
pObj
;
return
S_OK
;
}
/**************************************************************************
* IShellFolder_GetDisplayNameOf
...
...
dlls/shell32/shlview.c
View file @
6acd0599
This diff is collapsed.
Click to expand it.
include/shell.h
View file @
6acd0599
...
...
@@ -95,8 +95,8 @@ typedef struct _NOTIFYICONDATA {
*/
#pragma pack(1)
typedef
struct
{
WORD
cb
;
/* nr of bytes in this item */
BYTE
abID
[
1
];
/* first byte in this item */
{
WORD
cb
;
/* nr of bytes in this item */
BYTE
abID
[
1
];
/* first byte in this item */
}
SHITEMID
,
*
LPSHITEMID
;
typedef
struct
...
...
@@ -167,7 +167,11 @@ typedef struct _SHFILEOPSTRUCTW
#define SHFILEOPSTRUCT WINELIB_NAME_AW(SHFILEOPSTRUCT)
#define LPSHFILEOPSTRUCT WINELIB_NAME_AW(LPSHFILEOPSTRUCT)
DWORD
WINAPI
SHFileOperation32
(
LPSHFILEOPSTRUCT32A
lpFileOp
);
DWORD
WINAPI
SHFileOperation32A
(
LPSHFILEOPSTRUCT32A
lpFileOp
);
DWORD
WINAPI
SHFileOperation32W
(
LPSHFILEOPSTRUCT32W
lpFileOp
);
#define SHFileOperation WINELIB_NAME_AW(SHFileOperation)
DWORD
WINAPI
SHFileOperation32
(
DWORD
x
);
/****************************************************************************
* APPBARDATA
...
...
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