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
cd390f33
Commit
cd390f33
authored
Dec 14, 1998
by
Juergen Schmied
Committed by
Alexandre Julliard
Dec 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds the IPersistFile Interface to IShellLink[W] and gave both own
IClassFactorys.
parent
8bc54b6c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
31 deletions
+45
-31
shelllink.c
dlls/shell32/shelllink.c
+0
-0
shellole.c
dlls/shell32/shellole.c
+12
-11
shlobj.h
include/shlobj.h
+33
-20
No files found.
dlls/shell32/shelllink.c
View file @
cd390f33
This diff is collapsed.
Click to expand it.
dlls/shell32/shellole.c
View file @
cd390f33
/*
*
Shell Folder stuff (...and all the OLE-Objects of SHELL32.DLL)
*
handling of SHELL32.DLL OLE-Objects
*
* Copyright 1997 Marcus Meissner
* Copyright 1998 Juergen Schmied <juergen.schmied@metronet.de>
...
...
@@ -19,6 +19,7 @@
#include "winerror.h"
#include "winnls.h"
#include "winproc.h"
#include "winversion.h"
#include "commctrl.h"
#include "shell32_main.h"
...
...
@@ -173,10 +174,16 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
{
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ShellDesktop
))
/*debug*/
{
TRACE
(
shell
,
"-- requested CLSID_ShellDesktop
\n
"
);
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ShellLink
))
/*debug*/
{
TRACE
(
shell
,
"-- requested CLSID_ShellLink
\n
"
);
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_ShellLink
))
{
if
(
VERSION_OsIsUnicode
())
lpclf
=
IShellLinkW_CF_Constructor
();
lpclf
=
IShellLink_CF_Constructor
();
}
else
{
lpclf
=
IClassFactory_Constructor
();
}
lpclf
=
IClassFactory_Constructor
();
if
(
lpclf
)
{
hres
=
lpclf
->
lpvtbl
->
fnQueryInterface
(
lpclf
,
iid
,
ppv
);
lpclf
->
lpvtbl
->
fnRelease
(
lpclf
);
...
...
@@ -186,7 +193,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv)
{
WARN
(
shell
,
"-- CLSID not found
\n
"
);
hres
=
CLASS_E_CLASSNOTAVAILABLE
;
}
TRACE
(
shell
,
"--
return pointer to interface
: %p
\n
"
,
*
ppv
);
TRACE
(
shell
,
"--
pointer to class factory
: %p
\n
"
,
*
ppv
);
return
hres
;
}
...
...
@@ -306,12 +313,6 @@ static HRESULT WINAPI IClassFactory_CreateInstance(
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellView
))
{
pObj
=
(
IUnknown
*
)
IShellView_Constructor
(
NULL
,
NULL
);
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLink
))
{
pObj
=
(
IUnknown
*
)
IShellLink_Constructor
();
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IShellLinkW
))
{
pObj
=
(
IUnknown
*
)
IShellLinkW_Constructor
();
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IExtractIcon
))
{
pObj
=
(
IUnknown
*
)
IExtractIcon_Constructor
(
NULL
);
}
...
...
include/shlobj.h
View file @
cd390f33
...
...
@@ -16,10 +16,6 @@
#define FAR
#define THIS_ THIS,
#define __T(x) x
#define _T(x) __T(x)
#define TEXT _T
/****************************************************************************
* DllGetClassObject
*/
...
...
@@ -29,6 +25,7 @@ DWORD WINAPI SHELL32_DllGetClassObject(LPCLSID,REFIID,LPVOID*);
typedef
LPVOID
LPBC
;
/* *IBindCtx really */
/* foreward declaration of the objects*/
typedef
struct
tagPERSISTFILE
*
LPPERSISTFILE
,
IPersistFile
;
typedef
struct
tagCONTEXTMENU
*
LPCONTEXTMENU
,
IContextMenu
;
typedef
struct
tagSHELLEXTINIT
*
LPSHELLEXTINIT
,
IShellExtInit
;
typedef
struct
tagENUMIDLIST
*
LPENUMIDLIST
,
IEnumIDList
;
...
...
@@ -45,6 +42,9 @@ typedef struct tagENUMFORMATETC *LPENUMFORMATETC, IEnumFORMATETC;
/****************************************************************************
* SHELL ID
*/
/* desktop elements */
DEFINE_GUID
(
IID_MyComputer
,
0x20D04FE0L
,
0x3AEA
,
0x1069
,
0xA2
,
0xD8
,
0x08
,
0x00
,
0x2B
,
0x30
,
0x30
,
0x9D
);
/* strange Objects */
DEFINE_SHLGUID
(
IID_IEnumUnknown
,
0x00000100L
,
0
,
0
);
DEFINE_SHLGUID
(
IID_IEnumString
,
0x00000101L
,
0
,
0
);
...
...
@@ -70,6 +70,7 @@ DEFINE_GUID (IID_IDockingWindowFrame, 0x47D2657AL, 0x7B27, 0x11D0, 0x8C, 0xA9, 0
DEFINE_SHLGUID
(
CLSID_ShellDesktop
,
0x00021400L
,
0
,
0
);
DEFINE_SHLGUID
(
CLSID_ShellLink
,
0x00021401L
,
0
,
0
);
/* shell32 formatids */
DEFINE_SHLGUID
(
FMTID_Intshcut
,
0x000214A0L
,
0
,
0
);
DEFINE_SHLGUID
(
FMTID_InternetSite
,
0x000214A1L
,
0
,
0
);
...
...
@@ -125,7 +126,31 @@ typedef struct _STRRET
WCHAR
cStrW
[
MAX_PATH
];
}
u
;
}
STRRET
,
*
LPSTRRET
;
/*****************************************************************************
* IPersistFile interface
*/
#define THIS LPPERSISTFILE this
typedef
struct
IPersistFile_VTable
{
// *** IUnknown methods ***
STDMETHOD
(
QueryInterface
)
(
THIS_
REFIID
riid
,
LPVOID
*
ppvObj
)
PURE
;
STDMETHOD_
(
ULONG
,
AddRef
)
(
THIS
)
PURE
;
STDMETHOD_
(
ULONG
,
Release
)
(
THIS
)
PURE
;
STDMETHOD
(
GetClassID
)(
THIS_
CLSID
*
pClassID
)
PURE
;
STDMETHOD
(
IsDirty
)(
THIS
)
PURE
;
STDMETHOD
(
Load
)(
THIS_
LPCOLESTR32
pszFileName
,
DWORD
dwMode
)
PURE
;
STDMETHOD
(
Save
)(
THIS_
LPCOLESTR32
pszFileName
,
BOOL32
fRemember
)
PURE
;
STDMETHOD
(
SaveCompleted
)(
THIS_
LPCOLESTR32
pszFileName
)
PURE
;
STDMETHOD
(
GetCurFile
)(
THIS_
LPOLESTR32
*
ppszFileName
)
PURE
;
}
IPersistFile_VTable
,
*
LPPERSISTFILE_VTABLE
;
struct
tagPERSISTFILE
{
LPPERSISTFILE_VTABLE
lpvtbl
;
DWORD
ref
;
};
#undef THIS
/*****************************************************************************
* IContextMenu interface
*/
...
...
@@ -936,6 +961,8 @@ typedef struct IShellLink_VTable
struct
IShellLink
{
LPSHELLLINK_VTABLE
lpvtbl
;
DWORD
ref
;
/* IPersistfile interface */
LPPERSISTFILE
lppf
;
};
#undef THIS
...
...
@@ -983,6 +1010,8 @@ typedef struct IShellLinkW_VTable
struct
IShellLinkW
{
LPSHELLLINKW_VTABLE
lpvtbl
;
DWORD
ref
;
/* IPersistfile interface */
LPPERSISTFILE
lppf
;
};
#undef THIS
...
...
@@ -1099,22 +1128,6 @@ struct tagSERVICEPROVIDER
DWORD
ref
;
};
/****************************************************************************
* Class constructors
*/
#ifdef __WINE__
extern
LPDATAOBJECT
IDataObject_Constructor
(
HWND32
hwndOwner
,
LPSHELLFOLDER
psf
,
LPITEMIDLIST
*
apidl
,
UINT32
cidl
);
extern
LPENUMFORMATETC
IEnumFORMATETC_Constructor
(
UINT32
,
const
FORMATETC32
[]);
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
(
void
);
extern
LPSHELLLINKW
IShellLinkW_Constructor
(
void
);
extern
LPENUMIDLIST
IEnumIDList_Constructor
(
LPCSTR
,
DWORD
);
extern
LPEXTRACTICON
IExtractIcon_Constructor
(
LPITEMIDLIST
);
#endif
/****************************************************************************
* Shell Execute API
*/
#define SE_ERR_FNF 2 // file not found
...
...
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