1 | /* $Id: misc.cpp,v 1.2 1999-06-24 19:27:48 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 SHELL32 for OS/2
|
---|
5 | * 1998/06/15 Patrick Haller (haller@zebra.fh-weingarten.de)
|
---|
6 | * Copyright 1997 Marcus Meissner
|
---|
7 | * Copyright 1988 Patrick Haller (adapted for win32os2)
|
---|
8 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
9 | *
|
---|
10 | */
|
---|
11 |
|
---|
12 |
|
---|
13 | /*****************************************************************************
|
---|
14 | * Includes *
|
---|
15 | *****************************************************************************/
|
---|
16 |
|
---|
17 | #include <os2win.h>
|
---|
18 | #include <shellapi.h>
|
---|
19 | #include <wchar.h>
|
---|
20 | #include <wcstr.h>
|
---|
21 | #include <winnls.h>
|
---|
22 | #include "shell32.h"
|
---|
23 | #include <misc.h>
|
---|
24 | #include <string.h>
|
---|
25 |
|
---|
26 |
|
---|
27 | /*****************************************************************************
|
---|
28 | * Types & Defines *
|
---|
29 | *****************************************************************************/
|
---|
30 |
|
---|
31 |
|
---|
32 | /*****************************************************************************
|
---|
33 | * Name : LPWSTR* WIN32API CommandLineToArgvW
|
---|
34 | * Purpose :
|
---|
35 | * Parameters:
|
---|
36 | * Variables :
|
---|
37 | * Result :
|
---|
38 | * Remark :
|
---|
39 | * Status : UNTESTED STUB
|
---|
40 | *
|
---|
41 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
42 | *****************************************************************************/
|
---|
43 |
|
---|
44 | LPWSTR * WIN32API CommandLineToArgvW(LPCWSTR lpCmdLine,
|
---|
45 | int *pNumArgs)
|
---|
46 | {
|
---|
47 | LPWSTR *argv, s, t;
|
---|
48 | int i;
|
---|
49 |
|
---|
50 | dprintf(("SHELL32: CommandLineToArgvW(%s,%08xh)\n",
|
---|
51 | lpCmdLine,
|
---|
52 | pNumArgs));
|
---|
53 |
|
---|
54 | s = (LPWSTR)lpCmdLine;
|
---|
55 | i = 0;
|
---|
56 | while (*s) {
|
---|
57 | /* space */
|
---|
58 | if (*s==0x0020) {
|
---|
59 | i++;
|
---|
60 | s++;
|
---|
61 | while (*s && *s==0x0020)
|
---|
62 | s++;
|
---|
63 | continue;
|
---|
64 | }
|
---|
65 | s++;
|
---|
66 | }
|
---|
67 | argv = (LPWSTR *)LocalAlloc(LPTR, sizeof(LPWSTR)*(i+1));
|
---|
68 | s = t = (LPWSTR)lpCmdLine;
|
---|
69 | i = 0;
|
---|
70 | while(*s) {
|
---|
71 | if (*s==0x0020) {
|
---|
72 | *s=0;
|
---|
73 | argv[i++] = t;
|
---|
74 | *s=0x0020;
|
---|
75 | while (*s && *s==0x0020)
|
---|
76 | s++;
|
---|
77 | if(*s)
|
---|
78 | t=s+1;
|
---|
79 | else t=s;
|
---|
80 | continue;
|
---|
81 | }
|
---|
82 | s++;
|
---|
83 | }
|
---|
84 | if(*t)
|
---|
85 | argv[i++] = t;
|
---|
86 |
|
---|
87 | argv[i]=NULL;
|
---|
88 | *pNumArgs = i;
|
---|
89 | return argv;
|
---|
90 | }
|
---|
91 |
|
---|
92 |
|
---|
93 | /*****************************************************************************
|
---|
94 | * Name : HICON WIN32API ExtractIconA
|
---|
95 | * Purpose :
|
---|
96 | * Parameters:
|
---|
97 | * Variables :
|
---|
98 | * Result :
|
---|
99 | * Remark :
|
---|
100 | * Status : UNTESTED STUB
|
---|
101 | *
|
---|
102 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
103 | *****************************************************************************/
|
---|
104 |
|
---|
105 | HICON WIN32API ExtractIconA(HINSTANCE hInst,
|
---|
106 | LPCSTR lpszExeFileName,
|
---|
107 | UINT nIconIndex)
|
---|
108 | {
|
---|
109 | dprintf(("SHELL32: ExtractIconA(%08xh,%s,%08xh) not implemented.\n",
|
---|
110 | hInst,
|
---|
111 | lpszExeFileName,
|
---|
112 | nIconIndex));
|
---|
113 |
|
---|
114 | return(NULL);
|
---|
115 | }
|
---|
116 |
|
---|
117 |
|
---|
118 | /*****************************************************************************
|
---|
119 | * Name : HICON WIN32API ExtractIconW
|
---|
120 | * Purpose :
|
---|
121 | * Parameters:
|
---|
122 | * Variables :
|
---|
123 | * Result :
|
---|
124 | * Remark :
|
---|
125 | * Status : UNTESTED STUB
|
---|
126 | *
|
---|
127 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
128 | *****************************************************************************/
|
---|
129 |
|
---|
130 | HICON WIN32API ExtractIconW(HINSTANCE hInst,
|
---|
131 | LPCWSTR lpszExeFileName,
|
---|
132 | UINT nIconIndex)
|
---|
133 | {
|
---|
134 | HICON hicon = NULL;
|
---|
135 | char *astring = UnicodeToAsciiString((LPWSTR)lpszExeFileName);
|
---|
136 |
|
---|
137 | dprintf(("SHELL32: ExtractIconW(%08xh,%s,%08xh) not implemented.\n",
|
---|
138 | hInst,
|
---|
139 | lpszExeFileName,
|
---|
140 | nIconIndex));
|
---|
141 |
|
---|
142 |
|
---|
143 | FreeAsciiString(astring);
|
---|
144 | return(hicon);
|
---|
145 | }
|
---|
146 |
|
---|
147 |
|
---|
148 | /*****************************************************************************
|
---|
149 | * Name : HICON WIN32API ExtractIconExA
|
---|
150 | * Purpose :
|
---|
151 | * Parameters:
|
---|
152 | * Variables :
|
---|
153 | * Result :
|
---|
154 | * Remark :
|
---|
155 | * Status : UNTESTED STUB
|
---|
156 | *
|
---|
157 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
158 | *****************************************************************************/
|
---|
159 |
|
---|
160 | DWORD WIN32API ExtractIconExA(LPCSTR lpszFile,
|
---|
161 | int nIconIndex,
|
---|
162 | HICON *phiconLarge,
|
---|
163 | HICON *phiconSmall,
|
---|
164 | UINT nIcons)
|
---|
165 | {
|
---|
166 | dprintf(("SHELL32: ExtractIconExA(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
|
---|
167 | lpszFile,
|
---|
168 | nIconIndex,
|
---|
169 | phiconLarge,
|
---|
170 | phiconSmall,
|
---|
171 | nIcons));
|
---|
172 |
|
---|
173 | return (0);
|
---|
174 | }
|
---|
175 |
|
---|
176 |
|
---|
177 | /*****************************************************************************
|
---|
178 | * Name : HICON WIN32API ExtractIconExW
|
---|
179 | * Purpose :
|
---|
180 | * Parameters:
|
---|
181 | * Variables :
|
---|
182 | * Result :
|
---|
183 | * Remark :
|
---|
184 | * Status : UNTESTED STUB
|
---|
185 | *
|
---|
186 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
187 | *****************************************************************************/
|
---|
188 |
|
---|
189 | HICON WIN32API ExtractIconExW(LPCWSTR lpszFile,
|
---|
190 | int nIconIndex,
|
---|
191 | HICON *phiconLarge,
|
---|
192 | HICON *phiconSmall,
|
---|
193 | UINT nIcons)
|
---|
194 | {
|
---|
195 | dprintf(("SHELL32: ExtractIconExW(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
|
---|
196 | lpszFile,
|
---|
197 | nIconIndex,
|
---|
198 | phiconLarge,
|
---|
199 | phiconSmall,
|
---|
200 | nIcons));
|
---|
201 |
|
---|
202 | return (0);
|
---|
203 | }
|
---|
204 |
|
---|
205 |
|
---|
206 | /*****************************************************************************
|
---|
207 | * Name : HINSTANCE WIN32API FindExecutableA
|
---|
208 | * Purpose :
|
---|
209 | * Parameters:
|
---|
210 | * Variables :
|
---|
211 | * Result :
|
---|
212 | * Remark :
|
---|
213 | * Status : UNTESTED STUB
|
---|
214 | *
|
---|
215 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
216 | *****************************************************************************/
|
---|
217 |
|
---|
218 | HINSTANCE WIN32API FindExecutableA(LPCSTR lpszFile,
|
---|
219 | LPCSTR lpszDir,
|
---|
220 | LPTSTR lpszResult)
|
---|
221 | {
|
---|
222 | dprintf(("SHELL32: FindExecutableA (%s,%s,%s) not implemented.\n",
|
---|
223 | lpszFile,
|
---|
224 | lpszDir,
|
---|
225 | lpszResult));
|
---|
226 |
|
---|
227 | return(NULL);
|
---|
228 | }
|
---|
229 |
|
---|
230 |
|
---|
231 | /*****************************************************************************
|
---|
232 | * Name : HINSTANCE WIN32API FindExecutableW
|
---|
233 | * Purpose :
|
---|
234 | * Parameters:
|
---|
235 | * Variables :
|
---|
236 | * Result :
|
---|
237 | * Remark :
|
---|
238 | * Status : UNTESTED STUB
|
---|
239 | *
|
---|
240 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
241 | *****************************************************************************/
|
---|
242 |
|
---|
243 | HINSTANCE WIN32API FindExecutableW(LPCWSTR lpszFile,
|
---|
244 | LPCWSTR lpszDir,
|
---|
245 | LPWSTR lpszResult)
|
---|
246 | {
|
---|
247 | dprintf(("SHELL32: FindExecutableW (%s,%s,%s) not implemented.\n",
|
---|
248 | lpszFile,
|
---|
249 | lpszDir,
|
---|
250 | lpszResult));
|
---|
251 |
|
---|
252 | return(NULL);
|
---|
253 | }
|
---|
254 |
|
---|
255 |
|
---|
256 | /*****************************************************************************
|
---|
257 | * Name : HICON WIN32API ExtractAssociatedIconA
|
---|
258 | * Purpose : Return icon for given file (either from file itself or from associated
|
---|
259 | * executable) and patch parameters if needed.
|
---|
260 | * Parameters:
|
---|
261 | * Variables :
|
---|
262 | * Result :
|
---|
263 | * Remark : SHELL.36
|
---|
264 | * Status : UNTESTED STUB
|
---|
265 | *
|
---|
266 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
267 | *****************************************************************************/
|
---|
268 |
|
---|
269 | HICON WIN32API ExtractAssociatedIconA(HINSTANCE hInst,
|
---|
270 | LPSTR lpIconPath,
|
---|
271 | LPWORD lpiIcon)
|
---|
272 | {
|
---|
273 | HICON hIcon;
|
---|
274 |
|
---|
275 | dprintf(("SHELL32: ExtractAssociatedIconA(%08xh,%s,%08xh)\n",
|
---|
276 | hInst,
|
---|
277 | lpIconPath,
|
---|
278 | lpiIcon));
|
---|
279 |
|
---|
280 | hIcon = ExtractIconA(hInst,
|
---|
281 | lpIconPath,
|
---|
282 | *lpiIcon);
|
---|
283 |
|
---|
284 | if( hIcon < 2 )
|
---|
285 | {
|
---|
286 | if( hIcon == 1 ) /* no icons found in given file */
|
---|
287 | {
|
---|
288 | char tempPath[0x80];
|
---|
289 | UINT uRet = FindExecutableA(lpIconPath,
|
---|
290 | NULL,
|
---|
291 | tempPath);
|
---|
292 |
|
---|
293 | if(uRet > 32 && tempPath[0])
|
---|
294 | {
|
---|
295 | strcpy(lpIconPath,tempPath);
|
---|
296 | hIcon = ExtractIconA(hInst,
|
---|
297 | lpIconPath,
|
---|
298 | *lpiIcon);
|
---|
299 | if( hIcon > 2 )
|
---|
300 | return hIcon;
|
---|
301 | }
|
---|
302 | else
|
---|
303 | hIcon = 0;
|
---|
304 | }
|
---|
305 |
|
---|
306 | if( hIcon == 1 )
|
---|
307 | *lpiIcon = 2; /* MSDOS icon - we found .exe but no icons in it */
|
---|
308 | else
|
---|
309 | *lpiIcon = 6; /* generic icon - found nothing */
|
---|
310 |
|
---|
311 | /* @@@PH - how is this supposed to work ?
|
---|
312 | GetModuleFileNameA(hInst,
|
---|
313 | lpIconPath,
|
---|
314 | 0x80);
|
---|
315 | hIcon = LoadIconA(hInst,
|
---|
316 | *lpiIcon);
|
---|
317 | */
|
---|
318 | }
|
---|
319 | return hIcon;
|
---|
320 | }
|
---|
321 |
|
---|
322 |
|
---|
323 | /*****************************************************************************
|
---|
324 | * Name : HICON WIN32API ExtractAssociatedIconW
|
---|
325 | * Purpose : Return icon for given file (either from file itself or from associated
|
---|
326 | * executable) and patch parameters if needed.
|
---|
327 | * Parameters:
|
---|
328 | * Variables :
|
---|
329 | * Result :
|
---|
330 | * Remark : SHELL.36
|
---|
331 | * Status : UNTESTED STUB
|
---|
332 | *
|
---|
333 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
334 | *****************************************************************************/
|
---|
335 |
|
---|
336 | HICON WIN32API ExtractAssociatedIconW(HINSTANCE hInst,
|
---|
337 | LPWSTR lpIconPath,
|
---|
338 | LPWORD lpiIcon)
|
---|
339 | {
|
---|
340 | LPSTR lpIconPathAscii = UnicodeToAsciiString(lpIconPath);
|
---|
341 | HICON hIcon;
|
---|
342 |
|
---|
343 | dprintf(("SHELL32: ExtractAssociatedIconW(%08xh,%s,%08xh)\n",
|
---|
344 | hInst,
|
---|
345 | lpIconPathAscii,
|
---|
346 | lpiIcon));
|
---|
347 |
|
---|
348 | hIcon = ExtractAssociatedIconA(hInst,
|
---|
349 | lpIconPathAscii,
|
---|
350 | lpiIcon);
|
---|
351 |
|
---|
352 | FreeAsciiString(lpIconPathAscii);
|
---|
353 |
|
---|
354 | return (hIcon);
|
---|
355 | }
|
---|
356 |
|
---|
357 |
|
---|
358 | /*****************************************************************************
|
---|
359 | * Name : ParseField
|
---|
360 | * Purpose :
|
---|
361 | * Parameters:
|
---|
362 | * Variables :
|
---|
363 | * Result :
|
---|
364 | * Remark : SHELL32.58
|
---|
365 | * Status : UNTESTED UNKNOWN STUB
|
---|
366 | *
|
---|
367 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
368 | *****************************************************************************/
|
---|
369 |
|
---|
370 | DWORD WIN32API ParseFieldA(LPCSTR src,
|
---|
371 | DWORD field,
|
---|
372 | LPSTR dst,
|
---|
373 | DWORD len)
|
---|
374 | {
|
---|
375 | dprintf(("SHELL32: ParseFieldA(%s,%08xh,%08xh,%08xh) not correctly implemented.\n",
|
---|
376 | src,
|
---|
377 | field,
|
---|
378 | dst,
|
---|
379 | len));
|
---|
380 |
|
---|
381 | if (!src || !src[0] || !dst || !len)
|
---|
382 | return 0;
|
---|
383 |
|
---|
384 | if (field >1)
|
---|
385 | {
|
---|
386 | field--;
|
---|
387 | while (field)
|
---|
388 | {
|
---|
389 | if (*src==0x0) return FALSE;
|
---|
390 | if (*src==',') field--;
|
---|
391 | src++;
|
---|
392 | }
|
---|
393 | }
|
---|
394 |
|
---|
395 | while (*src!=0x00 && *src!=',' && len>0)
|
---|
396 | {
|
---|
397 | *dst=*src; dst++, src++; len--;
|
---|
398 | }
|
---|
399 | *dst=0x0;
|
---|
400 | return TRUE;
|
---|
401 | }
|
---|
402 |
|
---|
403 |
|
---|
404 | /*****************************************************************************
|
---|
405 | * Name : PickIconDlg
|
---|
406 | * Purpose :
|
---|
407 | * Parameters:
|
---|
408 | * Variables :
|
---|
409 | * Result :
|
---|
410 | * Remark : SHELL32.62
|
---|
411 | * Status : UNTESTED UNKNOWN STUB
|
---|
412 | *
|
---|
413 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
414 | *****************************************************************************/
|
---|
415 |
|
---|
416 | DWORD WIN32API PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)
|
---|
417 | {
|
---|
418 | dprintf(("SHELL32: PickIconDlg(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
419 | x,
|
---|
420 | y,
|
---|
421 | z,
|
---|
422 | a));
|
---|
423 |
|
---|
424 | return 0xffffffff;
|
---|
425 | }
|
---|
426 |
|
---|
427 |
|
---|
428 | /*****************************************************************************
|
---|
429 | * Name : GetFileNameFromBrowse
|
---|
430 | * Purpose :
|
---|
431 | * Parameters:
|
---|
432 | * Variables :
|
---|
433 | * Result :
|
---|
434 | * Remark : SHELL32.63
|
---|
435 | * Status : UNTESTED UNKNOWN STUB
|
---|
436 | *
|
---|
437 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
438 | *****************************************************************************/
|
---|
439 |
|
---|
440 | DWORD WIN32API GetFileNameFromBrowse(HWND howner,
|
---|
441 | LPSTR targetbuf,
|
---|
442 | DWORD len,
|
---|
443 | DWORD x,
|
---|
444 | LPCSTR suffix,
|
---|
445 | LPCSTR y,
|
---|
446 | LPCSTR cmd)
|
---|
447 | {
|
---|
448 | dprintf(("SHELL32: GetFileNameFromBrowse(%08xh, %08xh,%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
449 | howner,
|
---|
450 | targetbuf,
|
---|
451 | len,
|
---|
452 | x,
|
---|
453 | suffix,
|
---|
454 | y,
|
---|
455 | cmd));
|
---|
456 |
|
---|
457 | /* puts up a Open Dialog and requests input into targetbuf */
|
---|
458 | /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
|
---|
459 | strcpy(targetbuf,
|
---|
460 | "x:\\dummy.exe");
|
---|
461 |
|
---|
462 | return 1;
|
---|
463 | }
|
---|
464 |
|
---|
465 |
|
---|
466 | /*****************************************************************************
|
---|
467 | * Name : OleStrToStrN
|
---|
468 | * Purpose :
|
---|
469 | * Parameters:
|
---|
470 | * Variables :
|
---|
471 | * Result :
|
---|
472 | * Remark : SHELL32.78
|
---|
473 | * Status : UNTESTED UNKNOWN STUB
|
---|
474 | *
|
---|
475 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
476 | *****************************************************************************/
|
---|
477 |
|
---|
478 | BOOL WIN32API OleStrToStrN (LPSTR lpMulti,
|
---|
479 | INT nMulti,
|
---|
480 | LPCWSTR lpWide,
|
---|
481 | INT nWide)
|
---|
482 | {
|
---|
483 | dprintf(("SHELL32: OleStrToStrN(%08xh,%08xh,%08xh,%08xh)\n",
|
---|
484 | lpMulti,
|
---|
485 | nMulti,
|
---|
486 | lpWide,
|
---|
487 | nWide));
|
---|
488 |
|
---|
489 | return WideCharToMultiByte (0,
|
---|
490 | 0,
|
---|
491 | lpWide,
|
---|
492 | nWide,
|
---|
493 | lpMulti,
|
---|
494 | nMulti,
|
---|
495 | NULL,
|
---|
496 | NULL);
|
---|
497 | }
|
---|
498 |
|
---|
499 |
|
---|
500 | /*****************************************************************************
|
---|
501 | * Name : StrToOleStrN
|
---|
502 | * Purpose :
|
---|
503 | * Parameters:
|
---|
504 | * Variables :
|
---|
505 | * Result :
|
---|
506 | * Remark : SHELL32.79
|
---|
507 | * Status : UNTESTED UNKNOWN STUB
|
---|
508 | *
|
---|
509 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
510 | *****************************************************************************/
|
---|
511 |
|
---|
512 | BOOL WIN32API StrToOleStrN (LPWSTR lpWide,
|
---|
513 | INT nWide,
|
---|
514 | LPCSTR lpMulti,
|
---|
515 | INT nMulti)
|
---|
516 | {
|
---|
517 | dprintf(("SHELL32: StrToOleStrN(%08xh,%08xh,%08xh,%08xh)\n",
|
---|
518 | lpWide,
|
---|
519 | nWide,
|
---|
520 | lpMulti,
|
---|
521 | nMulti));
|
---|
522 |
|
---|
523 | return MultiByteToWideChar (0,
|
---|
524 | 0,
|
---|
525 | lpMulti,
|
---|
526 | nMulti,
|
---|
527 | lpWide,
|
---|
528 | nWide);
|
---|
529 | }
|
---|
530 |
|
---|
531 |
|
---|
532 | /*****************************************************************************
|
---|
533 | * Name : RegisterShellHook
|
---|
534 | * Purpose :
|
---|
535 | * Parameters:
|
---|
536 | * Variables :
|
---|
537 | * Result :
|
---|
538 | * Remark : SHELL32.181
|
---|
539 | * Status : UNTESTED UNKNOWN STUB
|
---|
540 | *
|
---|
541 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
542 | *
|
---|
543 | * PARAMS
|
---|
544 | * hwnd [I] window handle
|
---|
545 | * y [I] flag ????
|
---|
546 | *
|
---|
547 | * NOTES
|
---|
548 | * exported by ordinal
|
---|
549 | */
|
---|
550 |
|
---|
551 | void WIN32API RegisterShellHook(HWND hwnd,
|
---|
552 | DWORD y)
|
---|
553 | {
|
---|
554 | dprintf(("SHELL32: RegisterShellHook(%08xh, %08xh) not implemented.\n",
|
---|
555 | hwnd,
|
---|
556 | y));
|
---|
557 | }
|
---|
558 |
|
---|
559 |
|
---|
560 | /*****************************************************************************
|
---|
561 | * Name : RunFileDlg
|
---|
562 | * Purpose :
|
---|
563 | * Parameters:
|
---|
564 | * Variables :
|
---|
565 | * Result :
|
---|
566 | * Remark : SHELL32.61
|
---|
567 | * Status : UNTESTED UNKNOWN STUB
|
---|
568 | *
|
---|
569 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
570 | *****************************************************************************/
|
---|
571 |
|
---|
572 | DWORD WIN32API RunFileDlg (HWND hwndOwner,
|
---|
573 | DWORD dwParam1,
|
---|
574 | DWORD dwParam2,
|
---|
575 | LPSTR lpszTitle,
|
---|
576 | LPSTR lpszPrompt,
|
---|
577 | UINT uFlags)
|
---|
578 | {
|
---|
579 | dprintf(("SHELL32: RunFileDlg(%08xh,%08xh,%08xh,%s,%s,%08xh) not implemented.\n",
|
---|
580 | hwndOwner,
|
---|
581 | dwParam1,
|
---|
582 | dwParam2,
|
---|
583 | lpszTitle,
|
---|
584 | lpszPrompt,
|
---|
585 | uFlags));
|
---|
586 |
|
---|
587 | return 0;
|
---|
588 | }
|
---|
589 |
|
---|
590 |
|
---|
591 | /*****************************************************************************
|
---|
592 | * Name : ExitWindowsDialog
|
---|
593 | * Purpose :
|
---|
594 | * Parameters:
|
---|
595 | * Variables :
|
---|
596 | * Result :
|
---|
597 | * Remark : SHELL32.60
|
---|
598 | * Status : UNTESTED UNKNOWN STUB
|
---|
599 | *
|
---|
600 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
601 | *****************************************************************************/
|
---|
602 |
|
---|
603 | void WIN32API ExitWindowsDialog (HWND hWndOwner)
|
---|
604 | {
|
---|
605 | dprintf(("SHELL32: ExitWindowsDialog(%08xh)\n",
|
---|
606 | hWndOwner));
|
---|
607 |
|
---|
608 | if (MessageBoxA(hWndOwner,
|
---|
609 | "Do you want to exit ODIN?",
|
---|
610 | "Shutdown",
|
---|
611 | MB_YESNO|MB_ICONQUESTION)
|
---|
612 | == IDOK)
|
---|
613 | {
|
---|
614 | SendMessageA (hWndOwner,
|
---|
615 | WM_QUIT,
|
---|
616 | 0,
|
---|
617 | 0);
|
---|
618 | }
|
---|
619 | }
|
---|
620 |
|
---|
621 |
|
---|
622 | /*****************************************************************************
|
---|
623 | * Name : ArrangeWindows
|
---|
624 | * Purpose :
|
---|
625 | * Parameters:
|
---|
626 | * Variables :
|
---|
627 | * Result :
|
---|
628 | * Remark : SHELL32.184
|
---|
629 | * Status : UNTESTED UNKNOWN STUB
|
---|
630 | *
|
---|
631 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
632 | *****************************************************************************/
|
---|
633 |
|
---|
634 | DWORD WIN32API ArrangeWindows (DWORD dwParam1,
|
---|
635 | DWORD dwParam2,
|
---|
636 | DWORD dwParam3,
|
---|
637 | DWORD dwParam4,
|
---|
638 | DWORD dwParam5)
|
---|
639 | {
|
---|
640 | dprintf(("SHELL32: ArrangeWindows(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
641 | dwParam1,
|
---|
642 | dwParam2,
|
---|
643 | dwParam3,
|
---|
644 | dwParam4,
|
---|
645 | dwParam5));
|
---|
646 |
|
---|
647 | return 0;
|
---|
648 | }
|
---|
649 |
|
---|
650 |
|
---|
651 | /*****************************************************************************
|
---|
652 | * Name : SignalFileOpen
|
---|
653 | * Purpose :
|
---|
654 | * Parameters:
|
---|
655 | * Variables :
|
---|
656 | * Result :
|
---|
657 | * Remark : SHELL32.103
|
---|
658 | * Status : UNTESTED UNKNOWN STUB
|
---|
659 | *
|
---|
660 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
661 | *****************************************************************************/
|
---|
662 |
|
---|
663 | DWORD WIN32API SignalFileOpen (DWORD dwParam1)
|
---|
664 | {
|
---|
665 | dprintf(("SHELL32: SignalFileOpen(%08xh) not implemented.\n",
|
---|
666 | dwParam1));
|
---|
667 |
|
---|
668 | return 0;
|
---|
669 | }
|
---|
670 |
|
---|
671 |
|
---|
672 | /*****************************************************************************
|
---|
673 | * Name : DAD_ShowDrawImage
|
---|
674 | * Purpose :
|
---|
675 | * Parameters:
|
---|
676 | * Variables :
|
---|
677 | * Result :
|
---|
678 | * Remark : SHELL32.137
|
---|
679 | * Status : UNTESTED UNKNOWN STUB
|
---|
680 | *
|
---|
681 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
682 | *****************************************************************************/
|
---|
683 |
|
---|
684 | HRESULT WIN32API DAD_ShowDragImage (DWORD u)
|
---|
685 | {
|
---|
686 | dprintf(("SHELL32: DAD_ShowDragImage(%08xh) not implemented.\n",
|
---|
687 | u));
|
---|
688 |
|
---|
689 | return 0;
|
---|
690 | }
|
---|
691 |
|
---|
692 |
|
---|
693 | /*****************************************************************************
|
---|
694 | * Name : ReadCabinetState
|
---|
695 | * Purpose :
|
---|
696 | * Parameters:
|
---|
697 | * Variables :
|
---|
698 | * Result :
|
---|
699 | * Remark : SHELL32.651
|
---|
700 | * Status : UNTESTED UNKNOWN STUB
|
---|
701 | *
|
---|
702 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
703 | *****************************************************************************/
|
---|
704 |
|
---|
705 | HRESULT WIN32API ReadCabinetState(DWORD u,
|
---|
706 | DWORD v)
|
---|
707 | {
|
---|
708 | dprintf(("SHELL32: ReadCabinetState(%08xh, %08xh) not implemented.\n",
|
---|
709 | u,
|
---|
710 | v));
|
---|
711 |
|
---|
712 | return 0;
|
---|
713 | }
|
---|
714 |
|
---|
715 |
|
---|
716 | /*****************************************************************************
|
---|
717 | * Name : WriteCabinetState
|
---|
718 | * Purpose :
|
---|
719 | * Parameters:
|
---|
720 | * Variables :
|
---|
721 | * Result :
|
---|
722 | * Remark : SHELL32.652
|
---|
723 | * Status : UNTESTED UNKNOWN STUB
|
---|
724 | *
|
---|
725 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
726 | *****************************************************************************/
|
---|
727 |
|
---|
728 | HRESULT WIN32API WriteCabinetState(DWORD u)
|
---|
729 | {
|
---|
730 | dprintf(("SHELL32: WriteCabinetState(%08xh) not implemented.\n",
|
---|
731 | u));
|
---|
732 |
|
---|
733 | return 0;
|
---|
734 | }
|
---|
735 |
|
---|
736 |
|
---|
737 | /*****************************************************************************
|
---|
738 | * Name : FileIconInit
|
---|
739 | * Purpose :
|
---|
740 | * Parameters:
|
---|
741 | * Variables :
|
---|
742 | * Result :
|
---|
743 | * Remark : SHELL32.660
|
---|
744 | * Status : UNTESTED UNKNOWN STUB
|
---|
745 | *
|
---|
746 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
747 | *****************************************************************************/
|
---|
748 |
|
---|
749 | BOOL WIN32API FileIconInit(BOOL bFullInit)
|
---|
750 | {
|
---|
751 | dprintf(("SHELL32: FileIconInit(%08xh) not implemented.\n",
|
---|
752 | bFullInit));
|
---|
753 |
|
---|
754 | return 0;
|
---|
755 | }
|
---|
756 |
|
---|
757 |
|
---|
758 | /*****************************************************************************
|
---|
759 | * Name : IsUserAdmin
|
---|
760 | * Purpose :
|
---|
761 | * Parameters:
|
---|
762 | * Variables :
|
---|
763 | * Result :
|
---|
764 | * Remark : SHELL32.680
|
---|
765 | * Status : UNTESTED UNKNOWN STUB
|
---|
766 | *
|
---|
767 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
768 | *****************************************************************************/
|
---|
769 |
|
---|
770 | HRESULT WIN32API IsUserAdmin(void)
|
---|
771 | {
|
---|
772 | dprintf(("SHELL32: IsUserAdmin() not implmented. Yes, user is admin ;-)\n"));
|
---|
773 |
|
---|
774 | return TRUE;
|
---|
775 | }
|
---|
776 |
|
---|
777 |
|
---|
778 | /*****************************************************************************
|
---|
779 | * Name : StrRetToStrN
|
---|
780 | * Purpose : converts a STRRET to a normal string
|
---|
781 | * Parameters: the pidl is for STRRET OFFSET
|
---|
782 | * Variables :
|
---|
783 | * Result :
|
---|
784 | * Remark : SHELL32.96
|
---|
785 | * Status : UNTESTED UNKNOWN STUB
|
---|
786 | *
|
---|
787 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
788 | *****************************************************************************/
|
---|
789 |
|
---|
790 | HRESULT WIN32API StrRetToStrN (LPVOID dest,
|
---|
791 | DWORD len,
|
---|
792 | LPSTRRET src,
|
---|
793 | LPITEMIDLIST pidl)
|
---|
794 | {
|
---|
795 | dprintf(("SHELL32: StrRetToStrN(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
796 | dest,
|
---|
797 | len,
|
---|
798 | src,
|
---|
799 | pidl));
|
---|
800 |
|
---|
801 | switch (src->uType)
|
---|
802 | {
|
---|
803 | case STRRET_WSTR:
|
---|
804 | WideCharToMultiByte(CP_ACP,
|
---|
805 | 0,
|
---|
806 | src->u.pOleStr,
|
---|
807 | -1,
|
---|
808 | (LPSTR)dest,
|
---|
809 | len,
|
---|
810 | NULL,
|
---|
811 | NULL);
|
---|
812 | SHFree(src->u.pOleStr);
|
---|
813 | break;
|
---|
814 |
|
---|
815 | case STRRET_CSTRA:
|
---|
816 | //if (VERSION_OsIsUnicode())
|
---|
817 | // lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);
|
---|
818 | //else
|
---|
819 | strncpy((LPSTR)dest,
|
---|
820 | src->u.cStr,
|
---|
821 | len);
|
---|
822 | break;
|
---|
823 |
|
---|
824 | case STRRET_OFFSETA:
|
---|
825 | if (pidl)
|
---|
826 | {
|
---|
827 | //if(VERSION_OsIsUnicode())
|
---|
828 | // lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
|
---|
829 | //else
|
---|
830 | strncpy((LPSTR)dest,
|
---|
831 | ((LPCSTR)&pidl->mkid)+src->u.uOffset,
|
---|
832 | len);
|
---|
833 | break;
|
---|
834 | }
|
---|
835 |
|
---|
836 | default:
|
---|
837 | dprintf(("SHELL32: StrRetToStrN: unknown type!\n"));
|
---|
838 |
|
---|
839 | if (len)
|
---|
840 | *(LPSTR)dest = '\0';
|
---|
841 |
|
---|
842 | return(FALSE);
|
---|
843 | }
|
---|
844 | return(TRUE);
|
---|
845 | }
|
---|
846 |
|
---|
847 | /*****************************************************************************
|
---|
848 | * Name : StrChrW
|
---|
849 | * Purpose :
|
---|
850 | * Parameters:
|
---|
851 | * Variables :
|
---|
852 | * Result :
|
---|
853 | * Remark : SHELL32.651
|
---|
854 | * Status : UNTESTED UNKNOWN STUB
|
---|
855 | *
|
---|
856 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
857 | *****************************************************************************/
|
---|
858 |
|
---|
859 | LPWSTR WIN32API StrChrW (LPWSTR str,
|
---|
860 | WCHAR x)
|
---|
861 | {
|
---|
862 | dprintf (("SHELL32: StrChrW(%08xh, %08xh)\n",
|
---|
863 | str,
|
---|
864 | x));
|
---|
865 |
|
---|
866 | return ((LPWSTR)wcschr((const wchar_t*)str,
|
---|
867 | x));
|
---|
868 | }
|
---|
869 |
|
---|
870 |
|
---|
871 | /*****************************************************************************
|
---|
872 | * Name : StrChrNIW
|
---|
873 | * Purpose :
|
---|
874 | * Parameters:
|
---|
875 | * Variables :
|
---|
876 | * Result :
|
---|
877 | * Remark : SHELL32.?
|
---|
878 | * Status : UNTESTED UNKNOWN STUB
|
---|
879 | *
|
---|
880 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
881 | *****************************************************************************/
|
---|
882 |
|
---|
883 | INT WIN32API StrCmpNIW (LPWSTR wstr1,
|
---|
884 | LPWSTR wstr2,
|
---|
885 | INT len)
|
---|
886 | {
|
---|
887 | dprintf(("SHELL32: StrCmpNIW(%08xh,%08xh,%08xh) not correctly implemented.\n",
|
---|
888 | wstr1,
|
---|
889 | wstr2,
|
---|
890 | len));
|
---|
891 |
|
---|
892 | return (wcsncmp((const wchar_t*)wstr1,
|
---|
893 | (const wchar_t*)wstr2,
|
---|
894 | len));
|
---|
895 | }
|
---|
896 |
|
---|
897 |
|
---|
898 | /*****************************************************************************
|
---|
899 | * Name : DriveType
|
---|
900 | * Purpose :
|
---|
901 | * Parameters:
|
---|
902 | * Variables :
|
---|
903 | * Result :
|
---|
904 | * Remark : SHELL32.64
|
---|
905 | * Status : UNTESTED UNKNOWN STUB
|
---|
906 | *
|
---|
907 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
908 | *****************************************************************************/
|
---|
909 |
|
---|
910 | HRESULT WIN32API DriveType(DWORD u)
|
---|
911 | {
|
---|
912 | dprintf(("SHELL32: DriveType(%08xh) not implemented.\n",
|
---|
913 | u));
|
---|
914 |
|
---|
915 | return 0;
|
---|
916 | }
|
---|
917 |
|
---|
918 |
|
---|
919 | /*****************************************************************************
|
---|
920 | * Name : StrRChrW
|
---|
921 | * Purpose :
|
---|
922 | * Parameters:
|
---|
923 | * Variables :
|
---|
924 | * Result :
|
---|
925 | * Remark : SHELL32.320, wcsrchr does not work?
|
---|
926 | * Status : UNTESTED UNKNOWN STUB
|
---|
927 | *
|
---|
928 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
929 | *****************************************************************************/
|
---|
930 |
|
---|
931 | LPWSTR WIN32API StrRChrW(LPWSTR lpStart,
|
---|
932 | LPWSTR lpEnd,
|
---|
933 | DWORD wMatch)
|
---|
934 | {
|
---|
935 | LPWSTR wptr=NULL;
|
---|
936 |
|
---|
937 | dprintf(("SHELL32: StrRChrW(%08xh,%08xh,%08xh)\n",
|
---|
938 | lpStart,
|
---|
939 | lpEnd,
|
---|
940 | wMatch));
|
---|
941 |
|
---|
942 | /* if the end not given, search*/
|
---|
943 | if (!lpEnd)
|
---|
944 | {
|
---|
945 | lpEnd=lpStart;
|
---|
946 | while (*lpEnd)
|
---|
947 | lpEnd++;
|
---|
948 | }
|
---|
949 |
|
---|
950 | do
|
---|
951 | {
|
---|
952 | if (*lpStart==(WCHAR)wMatch)
|
---|
953 | wptr = lpStart;
|
---|
954 | lpStart++;
|
---|
955 | }
|
---|
956 | while ( lpStart<=lpEnd );
|
---|
957 | return wptr;
|
---|
958 | }
|
---|
959 |
|
---|
960 |
|
---|
961 | /*****************************************************************************
|
---|
962 | * Name : Control_FillCache_RunDLL
|
---|
963 | * Purpose :
|
---|
964 | * Parameters:
|
---|
965 | * Variables :
|
---|
966 | * Result :
|
---|
967 | * Remark : SHELL32.8
|
---|
968 | * Status : UNTESTED UNKNOWN STUB
|
---|
969 | *
|
---|
970 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
971 | *****************************************************************************/
|
---|
972 |
|
---|
973 | HRESULT WIN32API Control_FillCache_RunDLL(HWND hWnd,
|
---|
974 | HANDLE hModule,
|
---|
975 | DWORD w,
|
---|
976 | DWORD x)
|
---|
977 | {
|
---|
978 | dprintf(("SHELL32: Control_FillCache_RunDLL(%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
979 | hWnd,
|
---|
980 | hModule,
|
---|
981 | w,
|
---|
982 | x));
|
---|
983 |
|
---|
984 | return 0;
|
---|
985 | }
|
---|
986 |
|
---|
987 |
|
---|
988 | /*****************************************************************************
|
---|
989 | * Name : RunDLL_CallEntry16
|
---|
990 | * Purpose :
|
---|
991 | * Parameters:
|
---|
992 | * Variables :
|
---|
993 | * Result :
|
---|
994 | * Remark : SHELL32.122 - the name is propably wrong
|
---|
995 | * Status : UNTESTED UNKNOWN STUB
|
---|
996 | *
|
---|
997 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
998 | *****************************************************************************/
|
---|
999 |
|
---|
1000 | HRESULT WIN32API RunDLL_CallEntry16(DWORD v,
|
---|
1001 | DWORD w,
|
---|
1002 | DWORD x,
|
---|
1003 | DWORD y,
|
---|
1004 | DWORD z)
|
---|
1005 | {
|
---|
1006 | dprintf(("SHELL32: RunDLL_CallEntry16(%08xh,%08xh,%08xh,%08xh,%08xh) not implemented.\n",
|
---|
1007 | v,
|
---|
1008 | w,
|
---|
1009 | x,
|
---|
1010 | y,
|
---|
1011 | z));
|
---|
1012 |
|
---|
1013 | return 0;
|
---|
1014 | }
|
---|
1015 |
|
---|
1016 |
|
---|
1017 | /*****************************************************************************
|
---|
1018 | * Name : SHELL32_654
|
---|
1019 | * Purpose :
|
---|
1020 | * Parameters:
|
---|
1021 | * Variables :
|
---|
1022 | * Result :
|
---|
1023 | * Remark : SHELL32.654
|
---|
1024 | * Status : UNTESTED UNKNOWN STUB
|
---|
1025 | *
|
---|
1026 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1027 | *****************************************************************************/
|
---|
1028 |
|
---|
1029 | HRESULT WIN32API SHELL32_654 (DWORD x,
|
---|
1030 | DWORD y)
|
---|
1031 | {
|
---|
1032 | dprintf(("SHELL32: SHELL32_654(%08xh,%08xh) not implemented.\n",
|
---|
1033 | x,
|
---|
1034 | y));
|
---|
1035 | return 0;
|
---|
1036 | }
|
---|
1037 |
|
---|
1038 |
|
---|
1039 | /*****************************************************************************
|
---|
1040 | * Name : RLBuildListOfPaths
|
---|
1041 | * Purpose :
|
---|
1042 | * Parameters:
|
---|
1043 | * Variables :
|
---|
1044 | * Result :
|
---|
1045 | * Remark : SHELL32.146 - builds a DPA
|
---|
1046 | * Status : UNTESTED UNKNOWN STUB
|
---|
1047 | *
|
---|
1048 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1049 | *****************************************************************************/
|
---|
1050 |
|
---|
1051 | DWORD WIN32API RLBuildListOfPaths ()
|
---|
1052 | {
|
---|
1053 | dprintf(("SHELL32: RLBuildListOfPaths() not implemented.\n"));
|
---|
1054 | return 0;
|
---|
1055 | }
|
---|
1056 |
|
---|
1057 |
|
---|
1058 | /*****************************************************************************
|
---|
1059 | * Name : StrToOleStr
|
---|
1060 | * Purpose :
|
---|
1061 | * Parameters:
|
---|
1062 | * Variables :
|
---|
1063 | * Result :
|
---|
1064 | * Remark : SHELL32.163
|
---|
1065 | * Status : UNTESTED UNKNOWN STUB
|
---|
1066 | *
|
---|
1067 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1068 | *****************************************************************************/
|
---|
1069 |
|
---|
1070 | int WIN32API StrToOleStr (LPWSTR lpWideCharStr,
|
---|
1071 | LPCSTR lpMultiByteString)
|
---|
1072 | {
|
---|
1073 | dprintf(("SHELL32: StrToOleStr(%08xh,%08xh)\n",
|
---|
1074 | lpWideCharStr,
|
---|
1075 | lpMultiByteString));
|
---|
1076 |
|
---|
1077 | return MultiByteToWideChar(0,
|
---|
1078 | 0,
|
---|
1079 | lpMultiByteString,
|
---|
1080 | -1,
|
---|
1081 | lpWideCharStr,
|
---|
1082 | MAX_PATH);
|
---|
1083 | }
|
---|
1084 |
|
---|
1085 |
|
---|
1086 | /*****************************************************************************
|
---|
1087 | * Name : SetAppStartingCursor
|
---|
1088 | * Purpose :
|
---|
1089 | * Parameters:
|
---|
1090 | * Variables :
|
---|
1091 | * Result :
|
---|
1092 | * Remark : SHELL32.99
|
---|
1093 | * Status : UNTESTED UNKNOWN STUB
|
---|
1094 | *
|
---|
1095 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1096 | *****************************************************************************/
|
---|
1097 |
|
---|
1098 | HRESULT WIN32API SetAppStartingCursor(HWND u,
|
---|
1099 | DWORD v)
|
---|
1100 | {
|
---|
1101 | dprintf(("SHELL32: SetAppStartingCursor (SHELL32.99): (%08xh,%08xh) not implemented.\n",
|
---|
1102 | u,
|
---|
1103 | v));
|
---|
1104 |
|
---|
1105 | return 0;
|
---|
1106 | }
|
---|
1107 |
|
---|