Release 20010510.
[wine] / include / wine / obj_shelllink.h
1 /*
2  * Defines the COM interfaces and APIs related to IShellLink.
3  *
4  * Depends on 'obj_base.h'.
5  */
6
7 #ifndef __WINE_WINE_OBJ_SHELLLINK_H
8 #define __WINE_WINE_OBJ_SHELLLINK_H
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif /* defined(__cplusplus) */
13
14 /*****************************************************************************
15  * Predeclare the interfaces
16  */
17 typedef struct IShellLinkA IShellLinkA,*LPSHELLLINK;
18 typedef struct IShellLinkW IShellLinkW,*LPSHELLLINKW;
19
20 /*****************************************************************************
21  * 
22  */
23 typedef enum 
24 {       SLR_NO_UI       = 0x0001,
25         SLR_ANY_MATCH   = 0x0002,
26         SLR_UPDATE      = 0x0004
27 } SLR_FLAGS;
28
29 /*****************************************************************************
30  * GetPath fFlags 
31  */
32 typedef enum 
33 {       SLGP_SHORTPATH          = 0x0001,
34         SLGP_UNCPRIORITY        = 0x0002
35 } SLGP_FLAGS;
36 /*****************************************************************************
37  * IShellLink interface
38  */
39 #define ICOM_INTERFACE IShellLinkA
40 #define IShellLinkA_METHODS \
41     ICOM_METHOD4( HRESULT, GetPath, LPSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
42     ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
43     ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
44     ICOM_METHOD2( HRESULT, GetDescription, LPSTR, pszName, INT, cchMaxName) \
45     ICOM_METHOD1( HRESULT, SetDescription, LPCSTR, pszName) \
46     ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPSTR, pszDir,INT, cchMaxPath) \
47     ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCSTR, pszDir) \
48     ICOM_METHOD2( HRESULT, GetArguments, LPSTR, pszArgs, INT, cchMaxPath) \
49     ICOM_METHOD1( HRESULT, SetArguments, LPCSTR, pszArgs) \
50     ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
51     ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
52     ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
53     ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
54     ICOM_METHOD3( HRESULT, GetIconLocation, LPSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
55     ICOM_METHOD2( HRESULT, SetIconLocation, LPCSTR, pszIconPath,INT, iIcon) \
56     ICOM_METHOD2( HRESULT, SetRelativePath, LPCSTR, pszPathRel, DWORD, dwReserved) \
57     ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
58     ICOM_METHOD1( HRESULT, SetPath, LPCSTR, pszFile)
59 #define IShellLinkA_IMETHODS \
60     IUnknown_IMETHODS \
61     IShellLinkA_METHODS
62 ICOM_DEFINE(IShellLinkA,IUnknown)
63 #undef ICOM_INTERFACE
64
65 /*** IUnknown methods ***/
66 #define IShellLinkA_QueryInterface(p,a,b)       ICOM_CALL2(QueryInterface,p,a,b)
67 #define IShellLinkA_AddRef(p)                   ICOM_CALL (AddRef,p)
68 #define IShellLinkA_Release(p)                  ICOM_CALL (Release,p)
69 /*** IShellLink methods ***/
70 #define IShellLinkA_GetPath(p,a,b,c,d)          ICOM_CALL4(GetPath,p,a,b,c,d)
71 #define IShellLinkA_GetIDList(p,a)              ICOM_CALL1(GetIDList,p,a)
72 #define IShellLinkA_SetIDList(p,a)              ICOM_CALL1(SetIDList,p,a)
73 #define IShellLinkA_GetDescription(p,a,b)       ICOM_CALL2(GetDescription,p,a,b)
74 #define IShellLinkA_SetDescription(p,a)         ICOM_CALL1(SetDescription,p,a)
75 #define IShellLinkA_GetWorkingDirectory(p,a,b)  ICOM_CALL2(GetWorkingDirectory,p,a,b)
76 #define IShellLinkA_SetWorkingDirectory(p,a)    ICOM_CALL1(SetWorkingDirectory,p,a)
77 #define IShellLinkA_GetArguments(p,a,b)         ICOM_CALL2(GetArguments,p,a,b)
78 #define IShellLinkA_SetArguments(p,a)           ICOM_CALL1(SetArguments,p,a)
79 #define IShellLinkA_GetHotkey(p,a)              ICOM_CALL1(GetHotkey,p,a)
80 #define IShellLinkA_SetHotkey(p,a)              ICOM_CALL1(SetHotkey,p,a)
81 #define IShellLinkA_GetShowCmd(p,a)             ICOM_CALL1(GetShowCmd,p,a)
82 #define IShellLinkA_SetShowCmd(p,a)             ICOM_CALL1(SetShowCmd,p,a)
83 #define IShellLinkA_GetIconLocation(p,a,b,c)    ICOM_CALL3(GetIconLocation,p,a,b,c)
84 #define IShellLinkA_SetIconLocation(p,a,b)      ICOM_CALL2(SetIconLocation,p,a,b)
85 #define IShellLinkA_SetRelativePath(p,a,b)      ICOM_CALL2(SetRelativePath,p,a,b)
86 #define IShellLinkA_Resolve(p,a,b)              ICOM_CALL2(Resolve,p,a,b)
87 #define IShellLinkA_SetPath(p,a)                ICOM_CALL1(SetPath,p,a)
88
89 /*****************************************************************************
90  * IShellLinkW interface
91  */
92 #define ICOM_INTERFACE IShellLinkW
93 #define IShellLinkW_METHODS \
94     ICOM_METHOD4( HRESULT, GetPath, LPWSTR, pszFile, INT, cchMaxPath, WIN32_FIND_DATAA *, pfd, DWORD, fFlags) \
95     ICOM_METHOD1( HRESULT, GetIDList, LPITEMIDLIST *, ppidl) \
96     ICOM_METHOD1( HRESULT, SetIDList, LPCITEMIDLIST, pidl) \
97     ICOM_METHOD2( HRESULT, GetDescription, LPWSTR, pszName, INT, cchMaxName) \
98     ICOM_METHOD1( HRESULT, SetDescription, LPCWSTR, pszName) \
99     ICOM_METHOD2( HRESULT, GetWorkingDirectory, LPWSTR, pszDir,INT, cchMaxPath) \
100     ICOM_METHOD1( HRESULT, SetWorkingDirectory, LPCWSTR, pszDir) \
101     ICOM_METHOD2( HRESULT, GetArguments, LPWSTR, pszArgs, INT, cchMaxPath) \
102     ICOM_METHOD1( HRESULT, SetArguments, LPCWSTR, pszArgs) \
103     ICOM_METHOD1( HRESULT, GetHotkey, WORD*, pwHotkey) \
104     ICOM_METHOD1( HRESULT, SetHotkey, WORD, wHotkey) \
105     ICOM_METHOD1( HRESULT, GetShowCmd, INT*, piShowCmd) \
106     ICOM_METHOD1( HRESULT, SetShowCmd, INT, iShowCmd) \
107     ICOM_METHOD3( HRESULT, GetIconLocation, LPWSTR, pszIconPath, INT, cchIconPath,INT *, piIcon) \
108     ICOM_METHOD2( HRESULT, SetIconLocation, LPCWSTR, pszIconPath,INT, iIcon) \
109     ICOM_METHOD2( HRESULT, SetRelativePath, LPCWSTR, pszPathRel, DWORD, dwReserved) \
110     ICOM_METHOD2( HRESULT, Resolve, HWND, hwnd, DWORD, fFlags) \
111     ICOM_METHOD1( HRESULT, SetPath, LPCWSTR, pszFile)
112 #define IShellLinkW_IMETHODS \
113     IUnknown_IMETHODS \
114     IShellLinkW_METHODS
115 ICOM_DEFINE(IShellLinkW,IUnknown)
116 #undef ICOM_INTERFACE
117
118 /*** IUnknown methods ***/
119 #define IShellLinkW_QueryInterface(p,a,b)       ICOM_CALL2(QueryInterface,p,a,b)
120 #define IShellLinkW_AddRef(p)                   ICOM_CALL (AddRef,p)
121 #define IShellLinkW_Release(p)                  ICOM_CALL (Release,p)
122 /*** IShellLinkW methods ***/
123 #define IShellLinkW_GetPath(p,a,b,c,d)          ICOM_CALL4(GetPath,p,a,b,c,d)
124 #define IShellLinkW_GetIDList(p,a)              ICOM_CALL1(GetIDList,p,a)
125 #define IShellLinkW_SetIDList(p,a)              ICOM_CALL1(SetIDList,p,a)
126 #define IShellLinkW_GetDescription(p,a,b)       ICOM_CALL2(GetDescription,p,a,b)
127 #define IShellLinkW_SetDescription(p,a)         ICOM_CALL1(SetDescription,p,a)
128 #define IShellLinkW_GetWorkingDirectory(p,a,b)  ICOM_CALL2(GetWorkingDirectory,p,a,b)
129 #define IShellLinkW_SetWorkingDirectory(p,a)    ICOM_CALL1(SetWorkingDirectory,p,a)
130 #define IShellLinkW_GetArguments(p,a,b)         ICOM_CALL2(GetArguments,p,a,b)
131 #define IShellLinkW_SetArguments(p,a)           ICOM_CALL1(SetArguments,p,a)
132 #define IShellLinkW_GetHotkey(p,a)              ICOM_CALL1(GetHotkey,p,a)
133 #define IShellLinkW_SetHotkey(p,a)              ICOM_CALL1(SetHotkey,p,a)
134 #define IShellLinkW_GetShowCmd(p,a)             ICOM_CALL1(GetShowCmd,p,a)
135 #define IShellLinkW_SetShowCmd(p,a)             ICOM_CALL1(SetShowCmd,p,a)
136 #define IShellLinkW_GetIconLocation(p,a,b,c)    ICOM_CALL3(GetIconLocation,p,a,b,c)
137 #define IShellLinkW_SetIconLocation(p,a,b)      ICOM_CALL2(SetIconLocation,p,a,b)
138 #define IShellLinkW_SetRelativePath(p,a,b)      ICOM_CALL2(SetRelativePath,p,a,b)
139 #define IShellLinkW_Resolve(p,a,b)              ICOM_CALL2(Resolve,p,a,b)
140 #define IShellLinkW_SetPath(p,a)                ICOM_CALL1(SetPath,p,a)
141
142 #ifdef __cplusplus
143 } /* extern "C" */
144 #endif /* defined(__cplusplus) */
145
146 #endif /* __WINE_WINE_OBJ_SHELLLINK_H */