2 * Defines the COM interfaces and APIs related to IShellLink.
4 * Depends on 'obj_base.h'.
7 #ifndef __WINE_WINE_OBJ_SHELLLINK_H
8 #define __WINE_WINE_OBJ_SHELLLINK_H
10 #include "wine/obj_base.h"
16 #endif /* defined(__cplusplus) */
18 /*****************************************************************************
19 * Predeclare the interfaces
21 DEFINE_SHLGUID(IID_IShellLink, 0x000214EEL, 0, 0);
22 typedef struct IShellLink IShellLink,*LPSHELLLINK;
23 #define IShellLinkA IShellLink
25 DEFINE_SHLGUID(IID_IShellLinkW, 0x000214F9L, 0, 0);
26 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
28 /*****************************************************************************
33 SLR_ANY_MATCH = 0x0002,
37 /*****************************************************************************
41 { SLGP_SHORTPATH = 0x0001,
42 SLGP_UNCPRIORITY = 0x0002
44 /*****************************************************************************
45 * IShellLink interface
47 #define ICOM_INTERFACE IShellLink
48 #define IShellLink_METHODS \
49 ICOM_METHOD4( HRESULT, GetPath, LPSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
50 ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
51 ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
52 ICOM_METHOD2( HRESULT, GetDescription, LPSTR, pszName, INT, cchMaxName) \
53 ICOM_METHOD1( HRESULT, SetDescription, LPCSTR, pszName) \
54 ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPSTR, pszDir,INT, cchMaxPath) \
55 ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCSTR, pszDir) \
56 ICOM_METHOD2( HRESULT, GetArguments, LPSTR, pszArgs, INT, cchMaxPath) \
57 ICOM_METHOD1( HRESULT, SetArguments, LPCSTR, pszArgs) \
58 ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
59 ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
60 ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
61 ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
62 ICOM_METHOD3( HRESULT, GetIconLocation, LPSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
63 ICOM_METHOD2( HRESULT, SetIconLocation, LPCSTR, pszIconPath,INT, iIcon) \
64 ICOM_METHOD2( HRESULT, SetRelativePath, LPCSTR, pszPathRel, DWORD, dwReserved) \
65 ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
66 ICOM_METHOD1( HRESULT, SetPath, LPCSTR, pszFile)
67 #define IShellLink_IMETHODS \
70 ICOM_DEFINE(IShellLink,IUnknown)
73 #ifdef ICOM_CINTERFACE
74 /*** IUnknown methods ***/
75 #define IShellLink_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
76 #define IShellLink_AddRef(p) ICOM_CALL (AddRef,p)
77 #define IShellLink_Release(p) ICOM_CALL (Release,p)
78 /*** IShellLink methods ***/
79 #define IShellLink_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
80 #define IShellLink_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
81 #define IShellLink_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
82 #define IShellLink_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
83 #define IShellLink_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
84 #define IShellLink_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
85 #define IShellLink_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
86 #define IShellLink_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
87 #define IShellLink_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
88 #define IShellLink_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
89 #define IShellLink_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
90 #define IShellLink_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
91 #define IShellLink_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
92 #define IShellLink_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
93 #define IShellLink_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
94 #define IShellLink_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
95 #define IShellLink_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
96 #define IShellLink_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
99 /*****************************************************************************
100 * IShellLinkW interface
102 #define ICOM_INTERFACE IShellLinkW
103 #define IShellLinkW_METHODS \
104 ICOM_METHOD4( HRESULT, GetPath, LPWSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
105 ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
106 ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
107 ICOM_METHOD2( HRESULT, GetDescription, LPWSTR, pszName, INT, cchMaxName) \
108 ICOM_METHOD1( HRESULT, SetDescription, LPCWSTR, pszName) \
109 ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPWSTR, pszDir,INT, cchMaxPath) \
110 ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCWSTR, pszDir) \
111 ICOM_METHOD2( HRESULT, GetArguments, LPWSTR, pszArgs, INT, cchMaxPath) \
112 ICOM_METHOD1( HRESULT, SetArguments, LPCWSTR, pszArgs) \
113 ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
114 ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
115 ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
116 ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
117 ICOM_METHOD3( HRESULT, GetIconLocation, LPWSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
118 ICOM_METHOD2( HRESULT, SetIconLocation, LPCWSTR, pszIconPath,INT, iIcon) \
119 ICOM_METHOD2( HRESULT, SetRelativePath, LPCWSTR, pszPathRel, DWORD, dwReserved) \
120 ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
121 ICOM_METHOD1( HRESULT, SetPath, LPCWSTR, pszFile)
122 #define IShellLinkW_IMETHODS \
125 ICOM_DEFINE(IShellLinkW,IUnknown)
126 #undef ICOM_INTERFACE
128 #ifdef ICOM_CINTERFACE
129 /*** IUnknown methods ***/
130 #define IShellLinkW_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
131 #define IShellLinkW_AddRef(p) ICOM_CALL (AddRef,p)
132 #define IShellLinkW_Release(p) ICOM_CALL (Release,p)
133 /*** IShellLinkW methods ***/
134 #define IShellLinkW_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
135 #define IShellLinkW_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
136 #define IShellLinkW_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
137 #define IShellLinkW_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
138 #define IShellLinkW_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
139 #define IShellLinkW_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
140 #define IShellLinkW_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
141 #define IShellLinkW_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
142 #define IShellLinkW_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
143 #define IShellLinkW_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
144 #define IShellLinkW_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
145 #define IShellLinkW_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
146 #define IShellLinkW_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
147 #define IShellLinkW_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
148 #define IShellLinkW_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
149 #define IShellLinkW_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
150 #define IShellLinkW_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
151 #define IShellLinkW_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
156 #endif /* defined(__cplusplus) */
158 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */