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
0569609e
Commit
0569609e
authored
Jun 13, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Jun 13, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement ShellLink's IShellExtInit::Initialize() method.
parent
2e4bca9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
2 deletions
+45
-2
shelllink.c
dlls/shell32/shelllink.c
+45
-2
No files found.
dlls/shell32/shelllink.c
View file @
0569609e
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
*/
*/
#define COBJMACROS
#define COBJMACROS
#define NONAMELESSUNION
#include "wine/debug.h"
#include "wine/debug.h"
#include "winerror.h"
#include "winerror.h"
...
@@ -2254,13 +2255,55 @@ ShellLink_ExtInit_Release( IShellExtInit* iface )
...
@@ -2254,13 +2255,55 @@ ShellLink_ExtInit_Release( IShellExtInit* iface )
return
IShellLinkA_Release
((
IShellLinkA
*
)
This
);
return
IShellLinkA_Release
((
IShellLinkA
*
)
This
);
}
}
/**************************************************************************
* ShellLink implementation of IShellExtInit::Initialize()
*
* Loads the shelllink from the dataobject the shell is pointing to.
*/
static
HRESULT
WINAPI
static
HRESULT
WINAPI
ShellLink_ExtInit_Initialize
(
IShellExtInit
*
iface
,
LPCITEMIDLIST
pidlFolder
,
ShellLink_ExtInit_Initialize
(
IShellExtInit
*
iface
,
LPCITEMIDLIST
pidlFolder
,
IDataObject
*
pdtobj
,
HKEY
hkeyProgID
)
IDataObject
*
pdtobj
,
HKEY
hkeyProgID
)
{
{
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
_ICOM_THIS_From_IShellExtInit
(
IShellLinkImpl
,
iface
);
FIXME
(
"%p %p %p %p
\n
"
,
This
,
pidlFolder
,
pdtobj
,
hkeyProgID
);
FORMATETC
format
;
return
E_NOTIMPL
;
STGMEDIUM
stgm
;
UINT
count
;
HRESULT
r
=
E_FAIL
;
TRACE
(
"%p %p %p %p
\n
"
,
This
,
pidlFolder
,
pdtobj
,
hkeyProgID
);
if
(
!
pdtobj
)
return
r
;
format
.
cfFormat
=
CF_HDROP
;
format
.
ptd
=
NULL
;
format
.
dwAspect
=
DVASPECT_CONTENT
;
format
.
lindex
=
-
1
;
format
.
tymed
=
TYMED_HGLOBAL
;
if
(
FAILED
(
IDataObject_GetData
(
pdtobj
,
&
format
,
&
stgm
)
)
)
return
r
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
-
1
,
NULL
,
0
);
if
(
count
==
1
)
{
LPWSTR
path
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
0
,
NULL
,
0
);
count
++
;
path
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
WCHAR
)
);
if
(
path
)
{
IPersistFile
*
pf
=
(
IPersistFile
*
)
&
This
->
lpvtblPersistFile
;
count
=
DragQueryFileW
(
stgm
.
u
.
hGlobal
,
0
,
path
,
count
);
r
=
IPersistFile_Load
(
pf
,
path
,
0
);
HeapFree
(
GetProcessHeap
(),
0
,
path
);
}
}
ReleaseStgMedium
(
&
stgm
);
return
r
;
}
}
static
const
IShellExtInitVtbl
eivt
=
static
const
IShellExtInitVtbl
eivt
=
...
...
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