Added missing goto in switch statement.
[wine.git] / include / wine / obj_shelllink.h
blob9f5f867f12b565c92daaff3cad7396b2dfe4b561
1 /*
2 * Defines the COM interfaces and APIs related to IShellLink.
4 * Depends on 'obj_base.h'.
5 */
7 #ifndef __WINE_WINE_OBJ_SHELLLINK_H
8 #define __WINE_WINE_OBJ_SHELLLINK_H
10 #include "wine/obj_base.h"
11 #include "winbase.h"
12 #include "shell.h"
14 #ifdef __cplusplus
15 extern "C" {
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 /*****************************************************************************
31 typedef enum
32 { SLR_NO_UI = 0x0001,
33 SLR_ANY_MATCH = 0x0002,
34 SLR_UPDATE = 0x0004
35 } SLR_FLAGS;
37 /*****************************************************************************
38 * GetPath fFlags
40 typedef enum
41 { SLGP_SHORTPATH = 0x0001,
42 SLGP_UNCPRIORITY = 0x0002
43 } SLGP_FLAGS;
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 \
68 IUnknown_IMETHODS \
69 IShellLink_METHODS
70 ICOM_DEFINE(IShellLink,IUnknown)
71 #undef ICOM_INTERFACE
73 /*** IUnknown methods ***/
74 #define IShellLink_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
75 #define IShellLink_AddRef(p) ICOM_CALL (AddRef,p)
76 #define IShellLink_Release(p) ICOM_CALL (Release,p)
77 /*** IShellLink methods ***/
78 #define IShellLink_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
79 #define IShellLink_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
80 #define IShellLink_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
81 #define IShellLink_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
82 #define IShellLink_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
83 #define IShellLink_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
84 #define IShellLink_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
85 #define IShellLink_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
86 #define IShellLink_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
87 #define IShellLink_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
88 #define IShellLink_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
89 #define IShellLink_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
90 #define IShellLink_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
91 #define IShellLink_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
92 #define IShellLink_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
93 #define IShellLink_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
94 #define IShellLink_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
95 #define IShellLink_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
97 /*****************************************************************************
98 * IShellLinkW interface
100 #define ICOM_INTERFACE IShellLinkW
101 #define IShellLinkW_METHODS \
102 ICOM_METHOD4( HRESULT, GetPath, LPWSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
103 ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
104 ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
105 ICOM_METHOD2( HRESULT, GetDescription, LPWSTR, pszName, INT, cchMaxName) \
106 ICOM_METHOD1( HRESULT, SetDescription, LPCWSTR, pszName) \
107 ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPWSTR, pszDir,INT, cchMaxPath) \
108 ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCWSTR, pszDir) \
109 ICOM_METHOD2( HRESULT, GetArguments, LPWSTR, pszArgs, INT, cchMaxPath) \
110 ICOM_METHOD1( HRESULT, SetArguments, LPCWSTR, pszArgs) \
111 ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
112 ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
113 ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
114 ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
115 ICOM_METHOD3( HRESULT, GetIconLocation, LPWSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
116 ICOM_METHOD2( HRESULT, SetIconLocation, LPCWSTR, pszIconPath,INT, iIcon) \
117 ICOM_METHOD2( HRESULT, SetRelativePath, LPCWSTR, pszPathRel, DWORD, dwReserved) \
118 ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
119 ICOM_METHOD1( HRESULT, SetPath, LPCWSTR, pszFile)
120 #define IShellLinkW_IMETHODS \
121 IUnknown_IMETHODS \
122 IShellLinkW_METHODS
123 ICOM_DEFINE(IShellLinkW,IUnknown)
124 #undef ICOM_INTERFACE
126 /*** IUnknown methods ***/
127 #define IShellLinkW_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
128 #define IShellLinkW_AddRef(p) ICOM_CALL (AddRef,p)
129 #define IShellLinkW_Release(p) ICOM_CALL (Release,p)
130 /*** IShellLinkW methods ***/
131 #define IShellLinkW_GetPath(p,a,b,c,d) ICOM_CALL4(GetPath,p,a,b,c,d)
132 #define IShellLinkW_GetIDList(p,a) ICOM_CALL1(GetIDList,p,a)
133 #define IShellLinkW_SetIDList(p,a) ICOM_CALL1(SetIDList,p,a)
134 #define IShellLinkW_GetDescription(p,a,b) ICOM_CALL2(GetDescription,p,a,b)
135 #define IShellLinkW_SetDescription(p,a) ICOM_CALL1(SetDescription,p,a)
136 #define IShellLinkW_GetWorkingDirectory(p,a,b) ICOM_CALL2(GetWorkingDirectory,p,a,b)
137 #define IShellLinkW_SetWorkingDirectory(p,a) ICOM_CALL1(SetWorkingDirectory,p,a)
138 #define IShellLinkW_GetArguments(p,a,b) ICOM_CALL2(GetArguments,p,a,b)
139 #define IShellLinkW_SetArguments(p,a) ICOM_CALL1(SetArguments,p,a)
140 #define IShellLinkW_GetHotkey(p,a) ICOM_CALL1(GetHotkey,p,a)
141 #define IShellLinkW_SetHotkey(p,a) ICOM_CALL1(SetHotkey,p,a)
142 #define IShellLinkW_GetShowCmd(p,a) ICOM_CALL1(GetShowCmd,p,a)
143 #define IShellLinkW_SetShowCmd(p,a) ICOM_CALL1(SetShowCmd,p,a)
144 #define IShellLinkW_GetIconLocation(p,a,b,c) ICOM_CALL3(GetIconLocation,p,a,b,c)
145 #define IShellLinkW_SetIconLocation(p,a,b) ICOM_CALL2(SetIconLocation,p,a,b)
146 #define IShellLinkW_SetRelativePath(p,a,b) ICOM_CALL2(SetRelativePath,p,a,b)
147 #define IShellLinkW_Resolve(p,a,b) ICOM_CALL2(Resolve,p,a,b)
148 #define IShellLinkW_SetPath(p,a) ICOM_CALL1(SetPath,p,a)
150 #ifdef __cplusplus
151 } /* extern "C" */
152 #endif /* defined(__cplusplus) */
154 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */