2 * Defines the COM interfaces and APIs related to IShellLink.
4 * Depends on 'obj_base.h'.
6 * Copyright (C) 1999 Juergen Schmied
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #ifndef __WINE_WINE_OBJ_SHELLLINK_H
24 #define __WINE_WINE_OBJ_SHELLLINK_H
28 #endif /* defined(__cplusplus) */
30 /*****************************************************************************
31 * Predeclare the interfaces
33 typedef struct IShellLinkA IShellLinkA
,*LPSHELLLINK
;
34 typedef struct IShellLinkW IShellLinkW
,*LPSHELLLINKW
;
36 /*****************************************************************************
41 SLR_ANY_MATCH
= 0x0002,
45 /*****************************************************************************
49 { SLGP_SHORTPATH
= 0x0001,
50 SLGP_UNCPRIORITY
= 0x0002
52 /*****************************************************************************
53 * IShellLink interface
55 #define ICOM_INTERFACE IShellLinkA
56 #define IShellLinkA_METHODS \
57 ICOM_METHOD4( HRESULT, GetPath, LPSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
58 ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
59 ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
60 ICOM_METHOD2( HRESULT, GetDescription, LPSTR, pszName, INT, cchMaxName) \
61 ICOM_METHOD1( HRESULT, SetDescription, LPCSTR, pszName) \
62 ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPSTR, pszDir,INT, cchMaxPath) \
63 ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCSTR, pszDir) \
64 ICOM_METHOD2( HRESULT, GetArguments, LPSTR, pszArgs, INT, cchMaxPath) \
65 ICOM_METHOD1( HRESULT, SetArguments, LPCSTR, pszArgs) \
66 ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
67 ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
68 ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
69 ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
70 ICOM_METHOD3( HRESULT, GetIconLocation, LPSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
71 ICOM_METHOD2( HRESULT, SetIconLocation, LPCSTR, pszIconPath,INT, iIcon) \
72 ICOM_METHOD2( HRESULT, SetRelativePath, LPCSTR, pszPathRel, DWORD, dwReserved) \
73 ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
74 ICOM_METHOD1( HRESULT, SetPath, LPCSTR, pszFile)
75 #define IShellLinkA_IMETHODS \
78 ICOM_DEFINE(IShellLinkA
,IUnknown
)
81 /*** IUnknown methods ***/
82 #define IShellLinkA_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
83 #define IShellLinkA_AddRef(p) ICOM_CALL (AddRef,p)
84 #define IShellLinkA_Release(p) ICOM_CALL (Release,p)
85 /*** IShellLink methods ***/
86 #define IShellLinkA_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
87 #define IShellLinkA_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
88 #define IShellLinkA_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
89 #define IShellLinkA_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
90 #define IShellLinkA_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
91 #define IShellLinkA_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
92 #define IShellLinkA_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
93 #define IShellLinkA_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
94 #define IShellLinkA_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
95 #define IShellLinkA_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
96 #define IShellLinkA_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
97 #define IShellLinkA_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
98 #define IShellLinkA_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
99 #define IShellLinkA_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
100 #define IShellLinkA_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
101 #define IShellLinkA_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
102 #define IShellLinkA_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
103 #define IShellLinkA_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
105 /*****************************************************************************
106 * IShellLinkW interface
108 #define ICOM_INTERFACE IShellLinkW
109 #define IShellLinkW_METHODS \
110 ICOM_METHOD4( HRESULT, GetPath, LPWSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
111 ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
112 ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
113 ICOM_METHOD2( HRESULT, GetDescription, LPWSTR, pszName, INT, cchMaxName) \
114 ICOM_METHOD1( HRESULT, SetDescription, LPCWSTR, pszName) \
115 ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPWSTR, pszDir,INT, cchMaxPath) \
116 ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCWSTR, pszDir) \
117 ICOM_METHOD2( HRESULT, GetArguments, LPWSTR, pszArgs, INT, cchMaxPath) \
118 ICOM_METHOD1( HRESULT, SetArguments, LPCWSTR, pszArgs) \
119 ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
120 ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
121 ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
122 ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
123 ICOM_METHOD3( HRESULT, GetIconLocation, LPWSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
124 ICOM_METHOD2( HRESULT, SetIconLocation, LPCWSTR, pszIconPath,INT, iIcon) \
125 ICOM_METHOD2( HRESULT, SetRelativePath, LPCWSTR, pszPathRel, DWORD, dwReserved) \
126 ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
127 ICOM_METHOD1( HRESULT, SetPath, LPCWSTR, pszFile)
128 #define IShellLinkW_IMETHODS \
131 ICOM_DEFINE(IShellLinkW
,IUnknown
)
132 #undef ICOM_INTERFACE
134 /*** IUnknown methods ***/
135 #define IShellLinkW_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
136 #define IShellLinkW_AddRef(p) ICOM_CALL (AddRef,p)
137 #define IShellLinkW_Release(p) ICOM_CALL (Release,p)
138 /*** IShellLinkW methods ***/
139 #define IShellLinkW_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
140 #define IShellLinkW_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
141 #define IShellLinkW_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
142 #define IShellLinkW_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
143 #define IShellLinkW_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
144 #define IShellLinkW_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
145 #define IShellLinkW_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
146 #define IShellLinkW_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
147 #define IShellLinkW_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
148 #define IShellLinkW_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
149 #define IShellLinkW_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
150 #define IShellLinkW_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
151 #define IShellLinkW_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
152 #define IShellLinkW_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
153 #define IShellLinkW_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
154 #define IShellLinkW_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
155 #define IShellLinkW_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
156 #define IShellLinkW_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
160 #endif /* defined(__cplusplus) */
162 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */