1 | /* $Id: sh.cpp,v 1.9 1999-10-09 11:13:20 sandervl Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 SHELL32 for OS/2
|
---|
5 | * Copyright 1999 Patrick Haller
|
---|
6 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
7 | */
|
---|
8 |
|
---|
9 |
|
---|
10 | /*****************************************************************************
|
---|
11 | * Includes *
|
---|
12 | *****************************************************************************/
|
---|
13 |
|
---|
14 | #include <os2win.h>
|
---|
15 | #include <shellapi.h>
|
---|
16 | #include <winreg.h>
|
---|
17 | #include <stdarg.h>
|
---|
18 | //#include <builtin.h>
|
---|
19 | #include <stdio.h>
|
---|
20 | #include <stdlib.h>
|
---|
21 | #include <string.h>
|
---|
22 |
|
---|
23 | #define ICOM_CINTERFACE 1
|
---|
24 | #include "shell32_main.h"
|
---|
25 | #include <win\shlobj.h>
|
---|
26 | #include <misc.h>
|
---|
27 | //#include <nameid.h>
|
---|
28 | #include <unicode.h>
|
---|
29 |
|
---|
30 |
|
---|
31 | /*****************************************************************************
|
---|
32 | * Types & Defines *
|
---|
33 | *****************************************************************************/
|
---|
34 |
|
---|
35 | #define LPSHELLVIEWDATA LPVOID
|
---|
36 | #define LPUNKNOWN LPVOID
|
---|
37 | //#define IDSTRUCT VOID
|
---|
38 | #define IDropTarget VOID
|
---|
39 |
|
---|
40 | static LPUNKNOWN SHELL32_IExplorerInterface=0;
|
---|
41 |
|
---|
42 |
|
---|
43 |
|
---|
44 | /*****************************************************************************
|
---|
45 | * Name : LPITEMIDLIST SHBrowseForFolder
|
---|
46 | * Purpose :
|
---|
47 | * Parameters: LPBROWSEINFOA lpbi
|
---|
48 | * Variables :
|
---|
49 | * Result :
|
---|
50 | * Remark : SHELL32.236
|
---|
51 | * Status : UNTESTED STUB
|
---|
52 | *
|
---|
53 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
54 | *****************************************************************************/
|
---|
55 |
|
---|
56 | LPITEMIDLIST WIN32API SHBrowseForFolder(LPBROWSEINFOA lpbi)
|
---|
57 | {
|
---|
58 | dprintf(("SHELL32: SHBrowseForFolder(%08xh) not implemented.\n",
|
---|
59 | lpbi));
|
---|
60 |
|
---|
61 | //@@@PH automatically decide between A and W
|
---|
62 |
|
---|
63 | return(NULL);
|
---|
64 | }
|
---|
65 |
|
---|
66 |
|
---|
67 | /*****************************************************************************
|
---|
68 | * Name : LPITEMIDLIST SHBrowseForFolderW
|
---|
69 | * Purpose :
|
---|
70 | * Parameters: LPBROWSEINFOW lpbi
|
---|
71 | * Variables :
|
---|
72 | * Result :
|
---|
73 | * Remark : SHELL32.238
|
---|
74 | * Status : UNTESTED STUB
|
---|
75 | *
|
---|
76 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
77 | *****************************************************************************/
|
---|
78 |
|
---|
79 | LPITEMIDLIST WIN32API SHBrowseForFolderW(LPBROWSEINFOA lpbi)
|
---|
80 | {
|
---|
81 | dprintf(("SHELL32: SHBrowseForFolderW(%08xh) not implemented.\n",
|
---|
82 | lpbi));
|
---|
83 |
|
---|
84 | return(NULL);
|
---|
85 | }
|
---|
86 |
|
---|
87 |
|
---|
88 | /*****************************************************************************
|
---|
89 | * Name : DWORD SHEmptyRecycleBinA
|
---|
90 | * Purpose : ... be the janitor
|
---|
91 | * Parameters:
|
---|
92 | * Variables :
|
---|
93 | * Result :
|
---|
94 | * Remark : SHELL32.240
|
---|
95 | * Status : UNTESTED STUB UNKNOWN
|
---|
96 | *
|
---|
97 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
98 | *****************************************************************************/
|
---|
99 |
|
---|
100 | DWORD WIN32API SHEmptyRecycleBinA(DWORD x1,
|
---|
101 | DWORD x2,
|
---|
102 | DWORD x3)
|
---|
103 | {
|
---|
104 | dprintf(("SHELL32: SHEmptyRecycleBinA(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
105 | x1,
|
---|
106 | x2,
|
---|
107 | x3));
|
---|
108 |
|
---|
109 | return 0;
|
---|
110 | }
|
---|
111 |
|
---|
112 |
|
---|
113 | /*****************************************************************************
|
---|
114 | * Name : DWORD SHEmptyRecycleBinW
|
---|
115 | * Purpose : ... be the janitor
|
---|
116 | * Parameters:
|
---|
117 | * Variables :
|
---|
118 | * Result :
|
---|
119 | * Remark : SHELL32.241
|
---|
120 | * Status : UNTESTED STUB UNKNOWN
|
---|
121 | *
|
---|
122 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
123 | *****************************************************************************/
|
---|
124 |
|
---|
125 | DWORD WIN32API SHEmptyRecycleBinW(DWORD x1,
|
---|
126 | DWORD x2,
|
---|
127 | DWORD x3)
|
---|
128 | {
|
---|
129 | dprintf(("SHELL32: SHEmptyRecycleBinW(%08xh,%08xh,%08xh) not implemented.\n",
|
---|
130 | x1,
|
---|
131 | x2,
|
---|
132 | x3));
|
---|
133 |
|
---|
134 | return 0;
|
---|
135 | }
|
---|
136 |
|
---|
137 |
|
---|
138 | /*****************************************************************************
|
---|
139 | * Name : DWORD SHFormatDrive
|
---|
140 | * Purpose : format a drive ? ;-)
|
---|
141 | * Parameters:
|
---|
142 | * Variables :
|
---|
143 | * Result :
|
---|
144 | * Remark : SHELL32.245
|
---|
145 | * Status : UNTESTED STUB UNKNOWN
|
---|
146 | *
|
---|
147 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
148 | *****************************************************************************/
|
---|
149 |
|
---|
150 | DWORD WIN32API SHFormatDrive(DWORD x1,
|
---|
151 | DWORD x2,
|
---|
152 | DWORD x3,
|
---|
153 | DWORD x4)
|
---|
154 | {
|
---|
155 | dprintf(("SHELL32: SHFormatDrive(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
156 | x1,
|
---|
157 | x2,
|
---|
158 | x3,
|
---|
159 | x4));
|
---|
160 |
|
---|
161 | return 0;
|
---|
162 | }
|
---|
163 |
|
---|
164 |
|
---|
165 | /*****************************************************************************
|
---|
166 | * Name : DWORD SHFreeNameMappings
|
---|
167 | * Purpose :
|
---|
168 | * Parameters:
|
---|
169 | * Variables :
|
---|
170 | * Result :
|
---|
171 | * Remark : SHELL32.246
|
---|
172 | * Status : UNTESTED STUB UNKNOWN
|
---|
173 | *
|
---|
174 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
175 | *****************************************************************************/
|
---|
176 |
|
---|
177 | DWORD WIN32API SHFreeNameMappings(DWORD x1)
|
---|
178 | {
|
---|
179 | dprintf(("SHELL32: SHFreeNameMappings(%08xh) not implemented.\n",
|
---|
180 | x1));
|
---|
181 |
|
---|
182 | return 0;
|
---|
183 | }
|
---|
184 |
|
---|
185 |
|
---|
186 | /*****************************************************************************
|
---|
187 | * Name : DWORD SHGetNewLinkInfo
|
---|
188 | * Purpose :
|
---|
189 | * Parameters:
|
---|
190 | * Variables :
|
---|
191 | * Result :
|
---|
192 | * Remark : SHELL32.258
|
---|
193 | * Status : UNTESTED STUB UNKNOWN
|
---|
194 | *
|
---|
195 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
196 | *****************************************************************************/
|
---|
197 |
|
---|
198 | DWORD WIN32API SHGetNewLinkInfo(DWORD x1,
|
---|
199 | DWORD x2,
|
---|
200 | DWORD x3,
|
---|
201 | DWORD x4,
|
---|
202 | DWORD x5)
|
---|
203 | {
|
---|
204 | dprintf(("SHELL32: SHGetNewLinkInfo(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
205 | x1,
|
---|
206 | x2,
|
---|
207 | x3,
|
---|
208 | x4,
|
---|
209 | x5));
|
---|
210 |
|
---|
211 | return 0;
|
---|
212 | }
|
---|
213 |
|
---|
214 |
|
---|
215 | /*****************************************************************************
|
---|
216 | * Name : DWORD SHHelpShortcuts_RunDLLA
|
---|
217 | * Purpose :
|
---|
218 | * Parameters:
|
---|
219 | * Variables :
|
---|
220 | * Result :
|
---|
221 | * Remark : SHELL32.264
|
---|
222 | * Status : UNTESTED STUB
|
---|
223 | *
|
---|
224 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
225 | *****************************************************************************/
|
---|
226 |
|
---|
227 | DWORD WIN32API SHHelpShortcuts_RunDLLA(DWORD x1,
|
---|
228 | DWORD x2,
|
---|
229 | DWORD x3,
|
---|
230 | DWORD x4)
|
---|
231 | {
|
---|
232 | dprintf(("SHELL32: SHHelpShortcuts_RunDLLA(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
233 | x1,
|
---|
234 | x2,
|
---|
235 | x3,
|
---|
236 | x4));
|
---|
237 |
|
---|
238 | return(0);
|
---|
239 | }
|
---|
240 |
|
---|
241 |
|
---|
242 | /*****************************************************************************
|
---|
243 | * Name : DWORD SHHelpShortcuts_RunDLLW
|
---|
244 | * Purpose :
|
---|
245 | * Parameters:
|
---|
246 | * Variables :
|
---|
247 | * Result :
|
---|
248 | * Remark : SHELL32.265
|
---|
249 | * Status : UNTESTED STUB
|
---|
250 | *
|
---|
251 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
252 | *****************************************************************************/
|
---|
253 |
|
---|
254 | DWORD WIN32API SHHelpShortcuts_RunDLLW(DWORD x1,
|
---|
255 | DWORD x2,
|
---|
256 | DWORD x3,
|
---|
257 | DWORD x4)
|
---|
258 | {
|
---|
259 | dprintf(("SHELL32: SHHelpShortcuts_RunDLLW(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
260 | x1,
|
---|
261 | x2,
|
---|
262 | x3,
|
---|
263 | x4));
|
---|
264 |
|
---|
265 | return(0);
|
---|
266 | }
|
---|
267 |
|
---|
268 |
|
---|
269 | /*****************************************************************************
|
---|
270 | * Name : DWORD SHQueryRecycleBinA
|
---|
271 | * Purpose :
|
---|
272 | * Parameters:
|
---|
273 | * Variables :
|
---|
274 | * Result :
|
---|
275 | * Remark : SHELL32.268
|
---|
276 | * Status : UNTESTED STUB
|
---|
277 | *
|
---|
278 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
279 | *****************************************************************************/
|
---|
280 |
|
---|
281 | DWORD WIN32API SHQueryRecycleBinA(DWORD x1,
|
---|
282 | DWORD x2)
|
---|
283 | {
|
---|
284 | dprintf(("SHELL32: SHQueryRecycleBinA(%08xh,%08xh) not implemented.\n",
|
---|
285 | x1,
|
---|
286 | x2));
|
---|
287 |
|
---|
288 | return(0);
|
---|
289 | }
|
---|
290 |
|
---|
291 |
|
---|
292 | /*****************************************************************************
|
---|
293 | * Name : DWORD SHQueryRecycleBinW
|
---|
294 | * Purpose :
|
---|
295 | * Parameters:
|
---|
296 | * Variables :
|
---|
297 | * Result :
|
---|
298 | * Remark : SHELL32.269
|
---|
299 | * Status : UNTESTED STUB
|
---|
300 | *
|
---|
301 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
302 | *****************************************************************************/
|
---|
303 |
|
---|
304 | DWORD WIN32API SHQueryRecycleBinW(DWORD x1,
|
---|
305 | DWORD x2)
|
---|
306 | {
|
---|
307 | dprintf(("SHELL32: SHQueryRecycleBinW(%08xh,%08xh) not implemented.\n",
|
---|
308 | x1,
|
---|
309 | x2));
|
---|
310 |
|
---|
311 | return(0);
|
---|
312 | }
|
---|
313 |
|
---|
314 |
|
---|
315 | /*****************************************************************************
|
---|
316 | * Name : DWORD SHUpdateRecycleBinIcon
|
---|
317 | * Purpose :
|
---|
318 | * Parameters:
|
---|
319 | * Variables :
|
---|
320 | * Result :
|
---|
321 | * Remark : SHELL32.269
|
---|
322 | * Status : UNTESTED STUB
|
---|
323 | *
|
---|
324 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
325 | *****************************************************************************/
|
---|
326 |
|
---|
327 | DWORD WIN32API SHUpdateRecycleBinIcon(void)
|
---|
328 | {
|
---|
329 | dprintf(("SHELL32: SHUpdateRecycleBinIcon() not implemented.\n"));
|
---|
330 |
|
---|
331 | return(0);
|
---|
332 | }
|
---|
333 |
|
---|
334 |
|
---|
335 | /*****************************************************************************
|
---|
336 | * Name : HRESULT SHRegDeleteKeyW
|
---|
337 | * Purpose :
|
---|
338 | * Parameters:
|
---|
339 | * Variables :
|
---|
340 | * Result :
|
---|
341 | * Remark : SHELL32.512
|
---|
342 | * Status : UNTESTED STUB
|
---|
343 | *
|
---|
344 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
345 | *****************************************************************************/
|
---|
346 |
|
---|
347 | HRESULT WIN32API SHRegDeleteKeyW (HKEY hkey,
|
---|
348 | LPWSTR lpszKey)
|
---|
349 | {
|
---|
350 | dprintf(("SHELL32: SHRegDeleteKeyW(%08xh,%08xh)\n",
|
---|
351 | hkey,
|
---|
352 | lpszKey));
|
---|
353 |
|
---|
354 | return RegDeleteKeyW(hkey,
|
---|
355 | lpszKey);
|
---|
356 | }
|
---|
357 |
|
---|
358 |
|
---|
359 | /*****************************************************************************
|
---|
360 | * Name : HRESULT SHRegDeleteKeyA
|
---|
361 | * Purpose :
|
---|
362 | * Parameters:
|
---|
363 | * Variables :
|
---|
364 | * Result :
|
---|
365 | * Remark : SHELL32.513
|
---|
366 | * Status : UNTESTED STUB
|
---|
367 | *
|
---|
368 | * Author : Patrick Haller [Tue, 1999/06/09 20:02]
|
---|
369 | *****************************************************************************/
|
---|
370 |
|
---|
371 | HRESULT WIN32API SHRegDeleteKeyA (HKEY hkey,
|
---|
372 | LPSTR lpszKey)
|
---|
373 | {
|
---|
374 | dprintf(("SHELL32: SHRegDeleteKeyA(%08xh,%s)\n",
|
---|
375 | hkey,
|
---|
376 | lpszKey));
|
---|
377 |
|
---|
378 | return RegDeleteKeyA(hkey,
|
---|
379 | lpszKey);
|
---|
380 | }
|
---|