1 | /* $Id: shell32.cpp,v 1.5 1999-06-09 21:05:24 phaller Exp $ */
|
---|
2 |
|
---|
3 | /*
|
---|
4 | * Win32 SHELL32 for OS/2
|
---|
5 | *
|
---|
6 | * 1998/06/15 Patrick Haller (haller@zebra.fh-weingarten.de)
|
---|
7 | *
|
---|
8 | * @(#) shell32.c 1.0.0 1998/06/15 PH Merge WINE/SHELLORD.C
|
---|
9 | *
|
---|
10 | *
|
---|
11 | * Copyright 1997 Marcus Meissner
|
---|
12 | * Copyright 1988 Patrick Haller (adapted for win32os2)
|
---|
13 | *
|
---|
14 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*****************************************************************************
|
---|
20 | * Includes *
|
---|
21 | *****************************************************************************/
|
---|
22 |
|
---|
23 | #include <os2win.h>
|
---|
24 | #include <shellapi.h>
|
---|
25 | #include <winreg.h>
|
---|
26 | #include "shell32.h"
|
---|
27 |
|
---|
28 | #include <stdarg.h>
|
---|
29 | //#include <builtin.h>
|
---|
30 | #include <stdio.h>
|
---|
31 | #include <stdlib.h>
|
---|
32 | #include <string.h>
|
---|
33 |
|
---|
34 | #include <misc.h>
|
---|
35 | #include <nameid.h>
|
---|
36 | #include <unicode.h>
|
---|
37 |
|
---|
38 |
|
---|
39 | //static const char* lpstrMsgWndCreated = "OTHERWINDOWCREATED";
|
---|
40 | //static const char* lpstrMsgWndDestroyed = "OTHERWINDOWDESTROYED";
|
---|
41 | //static const char* lpstrMsgShellActivate = "ACTIVATESHELLWINDOW";
|
---|
42 |
|
---|
43 | //static HWND SHELL_hWnd = 0;
|
---|
44 | //static HHOOK SHELL_hHook = 0;
|
---|
45 | //static USHORT uMsgWndCreated = 0;
|
---|
46 | //static USHORT uMsgWndDestroyed = 0;
|
---|
47 | //static USHORT uMsgShellActivate = 0;
|
---|
48 |
|
---|
49 |
|
---|
50 |
|
---|
51 | /*****************************************************************************
|
---|
52 | * Types & Defines *
|
---|
53 | *****************************************************************************/
|
---|
54 |
|
---|
55 |
|
---|
56 | //******************************************************************************
|
---|
57 | //******************************************************************************
|
---|
58 | HINSTANCE WIN32API ShellExecuteA(HWND hwnd,
|
---|
59 | LPCTSTR lpOperation,
|
---|
60 | LPCTSTR lpFile,
|
---|
61 | LPCTSTR lpParameters,
|
---|
62 | LPCTSTR lpDirectory,
|
---|
63 | INT nShowCmd)
|
---|
64 | {
|
---|
65 | dprintf (("SHELL32: ShellExecuteA(%08xh,%s,%s,%s,%s,%08xh) not implemented.\n",
|
---|
66 | hwnd,
|
---|
67 | lpOperation,
|
---|
68 | lpFile,
|
---|
69 | lpParameters,
|
---|
70 | lpDirectory,
|
---|
71 | nShowCmd));
|
---|
72 |
|
---|
73 | return(0); //out of memory
|
---|
74 | }
|
---|
75 | //******************************************************************************
|
---|
76 | //TODO: Make nice dialog window
|
---|
77 | //******************************************************************************
|
---|
78 | int WIN32API ShellAboutA(HWND hwnd,
|
---|
79 | LPCTSTR szApp,
|
---|
80 | LPCTSTR szOtherStuff,
|
---|
81 | HICON hIcon)
|
---|
82 | {
|
---|
83 | dprintf(("SHELL32: ShellAboutA(%08xh,%08xh,%08xh,%08xh) not implemented properly.\n",
|
---|
84 | hwnd,
|
---|
85 | szApp,
|
---|
86 | szOtherStuff,
|
---|
87 | hIcon));
|
---|
88 |
|
---|
89 | /* @@@PH 98/06/07 */
|
---|
90 | if (szOtherStuff == NULL) szOtherStuff = "";
|
---|
91 | if (szApp == NULL) szApp = "";
|
---|
92 |
|
---|
93 | MessageBoxA(NULL,
|
---|
94 | szOtherStuff,
|
---|
95 | szApp,
|
---|
96 | MB_OK); /*PLF Sun 97-11-23 22:58:49*/
|
---|
97 |
|
---|
98 | return(TRUE);
|
---|
99 | }
|
---|
100 |
|
---|
101 |
|
---|
102 | /*****************************************************************************
|
---|
103 | * Name : DWORD ShellAboutW
|
---|
104 | * Purpose : display a simple about box
|
---|
105 | * Parameters: HWND hwnd
|
---|
106 | * LPWSTR szApplication
|
---|
107 | * LPWSTR szMoreInformation
|
---|
108 | * HICON hIcon
|
---|
109 | * Variables :
|
---|
110 | * Result :
|
---|
111 | * Remark :
|
---|
112 | * Status : UNTESTED
|
---|
113 | *
|
---|
114 | * Author : Patrick Haller [Tue, 1999/06/01 09:00]
|
---|
115 | *****************************************************************************/
|
---|
116 |
|
---|
117 | int WIN32API ShellAboutW(HWND hwnd,
|
---|
118 | LPCWSTR szApp,
|
---|
119 | LPCWSTR szOtherStuff,
|
---|
120 | HICON hIcon)
|
---|
121 | {
|
---|
122 | LPSTR lpszApp; /* temporary buffers for A-W conversion */
|
---|
123 | LPSTR lpszOtherStuff;
|
---|
124 | int iResult;
|
---|
125 |
|
---|
126 | dprintf(("SHELL32: ShellAboutW(%08xh,%08xh,%08xh,%08xh).\n",
|
---|
127 | hwnd,
|
---|
128 | szApp,
|
---|
129 | szOtherStuff,
|
---|
130 | hIcon));
|
---|
131 |
|
---|
132 | if (szApp != NULL) /* convert string on demand */
|
---|
133 | lpszApp = UnicodeToAsciiString((LPWSTR)szApp);
|
---|
134 | else
|
---|
135 | lpszApp = NULL;
|
---|
136 |
|
---|
137 | if (szOtherStuff != NULL)
|
---|
138 | lpszOtherStuff = UnicodeToAsciiString((LPWSTR)szOtherStuff);
|
---|
139 | else
|
---|
140 | lpszOtherStuff = NULL;
|
---|
141 |
|
---|
142 | iResult = ShellAboutA(hwnd, /* call ascii variant */
|
---|
143 | lpszApp,
|
---|
144 | lpszOtherStuff,
|
---|
145 | hIcon);
|
---|
146 |
|
---|
147 | if (lpszApp != NULL) /* free strings as created */
|
---|
148 | FreeAsciiString(lpszApp);
|
---|
149 |
|
---|
150 | if (lpszOtherStuff != NULL)
|
---|
151 | FreeAsciiString(lpszOtherStuff);
|
---|
152 |
|
---|
153 | return(iResult);
|
---|
154 | }
|
---|
155 | //******************************************************************************
|
---|
156 | //Borrowed from Wine
|
---|
157 | //******************************************************************************
|
---|
158 | LPWSTR * WIN32API CommandLineToArgvW(LPCWSTR lpCmdLine,
|
---|
159 | int *pNumArgs)
|
---|
160 | {
|
---|
161 | LPWSTR *argv, s, t;
|
---|
162 | int i;
|
---|
163 |
|
---|
164 | dprintf(("SHELL32: CommandLineToArgvW(%s,%08xh)\n",
|
---|
165 | lpCmdLine,
|
---|
166 | pNumArgs));
|
---|
167 |
|
---|
168 | s = (LPWSTR)lpCmdLine;
|
---|
169 | i = 0;
|
---|
170 | while (*s) {
|
---|
171 | /* space */
|
---|
172 | if (*s==0x0020) {
|
---|
173 | i++;
|
---|
174 | s++;
|
---|
175 | while (*s && *s==0x0020)
|
---|
176 | s++;
|
---|
177 | continue;
|
---|
178 | }
|
---|
179 | s++;
|
---|
180 | }
|
---|
181 | argv = (LPWSTR *)LocalAlloc(LPTR, sizeof(LPWSTR)*(i+1));
|
---|
182 | s = t = (LPWSTR)lpCmdLine;
|
---|
183 | i = 0;
|
---|
184 | while(*s) {
|
---|
185 | if (*s==0x0020) {
|
---|
186 | *s=0;
|
---|
187 | argv[i++] = t;
|
---|
188 | *s=0x0020;
|
---|
189 | while (*s && *s==0x0020)
|
---|
190 | s++;
|
---|
191 | if(*s)
|
---|
192 | t=s+1;
|
---|
193 | else t=s;
|
---|
194 | continue;
|
---|
195 | }
|
---|
196 | s++;
|
---|
197 | }
|
---|
198 | if(*t)
|
---|
199 | argv[i++] = t;
|
---|
200 |
|
---|
201 | argv[i]=NULL;
|
---|
202 | *pNumArgs = i;
|
---|
203 | return argv;
|
---|
204 | }
|
---|
205 | //******************************************************************************
|
---|
206 | //******************************************************************************
|
---|
207 | HICON WIN32API ExtractIconA(HINSTANCE hInst,
|
---|
208 | LPCSTR lpszExeFileName,
|
---|
209 | UINT nIconIndex)
|
---|
210 | {
|
---|
211 | dprintf(("SHELL32: ExtractIconA(%08xh,%s,%08xh) not implemented.\n",
|
---|
212 | hInst,
|
---|
213 | lpszExeFileName,
|
---|
214 | nIconIndex));
|
---|
215 |
|
---|
216 | return(NULL);
|
---|
217 | }
|
---|
218 | //******************************************************************************
|
---|
219 | //******************************************************************************
|
---|
220 | HICON WIN32API ExtractIconW(HINSTANCE hInst,
|
---|
221 | LPCWSTR lpszExeFileName,
|
---|
222 | UINT nIconIndex)
|
---|
223 | {
|
---|
224 | HICON hicon = NULL;
|
---|
225 | char *astring = UnicodeToAsciiString((LPWSTR)lpszExeFileName);
|
---|
226 |
|
---|
227 | dprintf(("SHELL32: ExtractIconW(%08xh,%s,%08xh) not implemented.\n",
|
---|
228 | hInst,
|
---|
229 | lpszExeFileName,
|
---|
230 | nIconIndex));
|
---|
231 |
|
---|
232 |
|
---|
233 | FreeAsciiString(astring);
|
---|
234 | return(hicon);
|
---|
235 | }
|
---|
236 | /*****************************************************************************
|
---|
237 | * Name : UINT WIN32API ExtractIconExA
|
---|
238 | * Purpose :
|
---|
239 | * Parameters:
|
---|
240 | * Variables :
|
---|
241 | * Result :
|
---|
242 | * Remark :
|
---|
243 | * Status : UNTESTED STUB
|
---|
244 | *
|
---|
245 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
246 | *****************************************************************************/
|
---|
247 |
|
---|
248 | DWORD WIN32API ExtractIconExA(LPCSTR lpszFile,
|
---|
249 | int nIconIndex,
|
---|
250 | HICON *phiconLarge,
|
---|
251 | HICON *phiconSmall,
|
---|
252 | UINT nIcons)
|
---|
253 | {
|
---|
254 | dprintf(("SHELL32: ExtractIconExA(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
|
---|
255 | lpszFile,
|
---|
256 | nIconIndex,
|
---|
257 | phiconLarge,
|
---|
258 | phiconSmall,
|
---|
259 | nIcons));
|
---|
260 |
|
---|
261 | return (0);
|
---|
262 | }
|
---|
263 |
|
---|
264 |
|
---|
265 | /*****************************************************************************
|
---|
266 | * Name : UINT WIN32API ExtractIconExW
|
---|
267 | * Purpose :
|
---|
268 | * Parameters:
|
---|
269 | * Variables :
|
---|
270 | * Result :
|
---|
271 | * Remark :
|
---|
272 | * Status : UNTESTED STUB
|
---|
273 | *
|
---|
274 | * Author : Patrick Haller [Sat, 1998/07/11 11:55]
|
---|
275 | *****************************************************************************/
|
---|
276 |
|
---|
277 | DWORD WIN32API ExtractIconExW(LPCWSTR lpszFile,
|
---|
278 | int nIconIndex,
|
---|
279 | HICON *phiconLarge,
|
---|
280 | HICON *phiconSmall,
|
---|
281 | UINT nIcons)
|
---|
282 | {
|
---|
283 | dprintf(("SHELL32: ExtractIconExW(%s,%08xh,%08xh,%08xh,%u) not implemented.\n",
|
---|
284 | lpszFile,
|
---|
285 | nIconIndex,
|
---|
286 | phiconLarge,
|
---|
287 | phiconSmall,
|
---|
288 | nIcons));
|
---|
289 |
|
---|
290 | return (0);
|
---|
291 | }
|
---|
292 |
|
---|
293 |
|
---|
294 | //******************************************************************************
|
---|
295 | HINSTANCE WIN32API FindExecutableA(LPCSTR lpszFile,
|
---|
296 | LPCSTR lpszDir,
|
---|
297 | LPTSTR lpszResult)
|
---|
298 | {
|
---|
299 | dprintf(("SHELL32: FindExecutableA (%s,%s,%s) not implemented.\n",
|
---|
300 | lpszFile,
|
---|
301 | lpszDir,
|
---|
302 | lpszResult));
|
---|
303 |
|
---|
304 | return(NULL);
|
---|
305 | }
|
---|
306 | //******************************************************************************
|
---|
307 | //******************************************************************************
|
---|
308 | HINSTANCE WIN32API FindExecutableW(LPCWSTR lpszFile,
|
---|
309 | LPCWSTR lpszDir,
|
---|
310 | LPWSTR lpszResult)
|
---|
311 | {
|
---|
312 | dprintf(("SHELL32: FindExecutableW (%s,%s,%s) not implemented.\n",
|
---|
313 | lpszFile,
|
---|
314 | lpszDir,
|
---|
315 | lpszResult));
|
---|
316 |
|
---|
317 | return(NULL);
|
---|
318 | }
|
---|
319 | //******************************************************************************
|
---|
320 |
|
---|
321 |
|
---|
322 | /*************************************************************************
|
---|
323 | * Shell_NotifyIcon [SHELL32.240]
|
---|
324 | * FIXME
|
---|
325 | * This function is supposed to deal with the systray.
|
---|
326 | * Any ideas on how this is to be implimented?
|
---|
327 | */
|
---|
328 | BOOL WIN32API Shell_NotifyIconA(DWORD dwMessage,
|
---|
329 | PNOTIFYICONDATAA pnid )
|
---|
330 | {
|
---|
331 | dprintf(("SHELL32: Shell_NotifyIconA(%08xh,%08xh) not implemented.\n",
|
---|
332 | dwMessage,
|
---|
333 | pnid));
|
---|
334 |
|
---|
335 | return FALSE;
|
---|
336 | }
|
---|
337 |
|
---|
338 |
|
---|
339 | /*************************************************************************
|
---|
340 | * Shell_NotifyIcon [SHELL32.240]
|
---|
341 | * FIXME
|
---|
342 | * This function is supposed to deal with the systray.
|
---|
343 | * Any ideas on how this is to be implimented?
|
---|
344 | */
|
---|
345 | BOOL WIN32API Shell_NotifyIconW(DWORD dwMessage,
|
---|
346 | PNOTIFYICONDATAW pnid )
|
---|
347 | {
|
---|
348 | dprintf(("SHELL32: Shell_NotifyIconW(%08xh,%08xh) not implemented.\n",
|
---|
349 | dwMessage,
|
---|
350 | pnid));
|
---|
351 |
|
---|
352 | return FALSE;
|
---|
353 | }
|
---|
354 |
|
---|
355 |
|
---|
356 | /*****************************************************************************
|
---|
357 | *
|
---|
358 | * Code merged from WINE
|
---|
359 | *
|
---|
360 | * Patrick Haller 98/06/15
|
---|
361 | *
|
---|
362 | *****************************************************************************/
|
---|
363 |
|
---|
364 |
|
---|
365 | /*************************************************************************
|
---|
366 | * SHELL32_2 [SHELL32.2]
|
---|
367 | */
|
---|
368 | DWORD WIN32API SHELL32_2(HWND hwnd,
|
---|
369 | DWORD x2,
|
---|
370 | DWORD x3,
|
---|
371 | DWORD x4,
|
---|
372 | DWORD x5,
|
---|
373 | DWORD x6)
|
---|
374 | {
|
---|
375 | dprintf(("SHELL32: .2 (0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx) not implemented.\n",
|
---|
376 | hwnd,
|
---|
377 | x2,
|
---|
378 | x3,
|
---|
379 | x4,
|
---|
380 | x5,
|
---|
381 | x6));
|
---|
382 | return 0;
|
---|
383 | }
|
---|
384 |
|
---|
385 |
|
---|
386 | /*************************************************************************
|
---|
387 | * SHELL32_16 [SHELL32.16]
|
---|
388 | * find_lastitem_in_itemidlist()
|
---|
389 | */
|
---|
390 | LPSHITEMID WIN32API SHELL32_16(LPITEMIDLIST iil)
|
---|
391 | {
|
---|
392 | LPSHITEMID lastsii,
|
---|
393 | sii;
|
---|
394 |
|
---|
395 | dprintf(("SHELL32: .16 (%08xh)\n",
|
---|
396 | iil));
|
---|
397 |
|
---|
398 | if (!iil)
|
---|
399 | return NULL;
|
---|
400 |
|
---|
401 | sii = &(iil->mkid);
|
---|
402 | lastsii = sii;
|
---|
403 |
|
---|
404 | while (sii->cb)
|
---|
405 | {
|
---|
406 | lastsii = sii;
|
---|
407 | sii = (LPSHITEMID)(((char*)sii)+sii->cb);
|
---|
408 | }
|
---|
409 |
|
---|
410 | return lastsii;
|
---|
411 | }
|
---|
412 |
|
---|
413 |
|
---|
414 | /*************************************************************************
|
---|
415 | * SHELL32_29 [SHELL32.29]
|
---|
416 | * is_rootdir(const char*path)
|
---|
417 | */
|
---|
418 | BOOL WIN32API SHELL32_29(LPCSTR x)
|
---|
419 | {
|
---|
420 | dprintf(("SHELL32: .29 (%s)\n",
|
---|
421 | x));
|
---|
422 |
|
---|
423 |
|
---|
424 | if (!lstrcmpA(x+1,":\\")) /* "X:\" */
|
---|
425 | return 1;
|
---|
426 |
|
---|
427 | if (!lstrcmpA(x,"\\")) /* "\" */
|
---|
428 | return 1;
|
---|
429 |
|
---|
430 | if (x[0]=='\\' && x[1]=='\\')
|
---|
431 | { /* UNC "\\<xx>\" */
|
---|
432 | int foundbackslash = 0;
|
---|
433 |
|
---|
434 | x=x+2;
|
---|
435 | while (*x)
|
---|
436 | {
|
---|
437 | if (*x++=='\\')
|
---|
438 | foundbackslash++;
|
---|
439 | }
|
---|
440 |
|
---|
441 | if (foundbackslash<=1) /* max 1 \ more ... */
|
---|
442 | return 1;
|
---|
443 | }
|
---|
444 | return 0;
|
---|
445 | }
|
---|
446 |
|
---|
447 |
|
---|
448 | /*************************************************************************
|
---|
449 | * SHELL32_30 [SHELL32.30]
|
---|
450 | * get_rootdir(char*path,int drive)
|
---|
451 | */
|
---|
452 | LPSTR WIN32API SHELL32_30(LPSTR root,
|
---|
453 | BYTE drive)
|
---|
454 | {
|
---|
455 | dprintf(("SHELL32: .30 (%s, %u)\n",
|
---|
456 | root,
|
---|
457 | drive));
|
---|
458 |
|
---|
459 |
|
---|
460 | strcpy(root,
|
---|
461 | "A:\\");
|
---|
462 | root[0]+=drive;
|
---|
463 |
|
---|
464 | return root;
|
---|
465 | }
|
---|
466 |
|
---|
467 |
|
---|
468 | /*************************************************************************
|
---|
469 | * SHELL32_31 [SHELL32.31]
|
---|
470 | * returns pointer to last . in last pathcomponent or at \0.
|
---|
471 | */
|
---|
472 | LPSTR WIN32API SHELL32_31(LPSTR path)
|
---|
473 | {
|
---|
474 | LPSTR lastpoint = NULL;
|
---|
475 |
|
---|
476 | dprintf(("SHELL32: .31 (%s)\n",
|
---|
477 | path));
|
---|
478 |
|
---|
479 |
|
---|
480 | while (*path)
|
---|
481 | {
|
---|
482 | if (*path=='\\'||*path==' ')
|
---|
483 | lastpoint=NULL;
|
---|
484 |
|
---|
485 | if (*path=='.')
|
---|
486 | lastpoint=path;
|
---|
487 |
|
---|
488 | path++;
|
---|
489 | }
|
---|
490 |
|
---|
491 | return lastpoint ? lastpoint : path;
|
---|
492 | }
|
---|
493 |
|
---|
494 |
|
---|
495 | /*************************************************************************
|
---|
496 | * SHELL32_32 [SHELL32.32]
|
---|
497 | * append \ if there is none
|
---|
498 | */
|
---|
499 | LPSTR WIN32API SHELL32_32(LPSTR path)
|
---|
500 | {
|
---|
501 | int len;
|
---|
502 |
|
---|
503 | dprintf(("SHELL32: .31 (%s)\n",
|
---|
504 | path));
|
---|
505 |
|
---|
506 |
|
---|
507 | len = lstrlenA(path);
|
---|
508 |
|
---|
509 | if (len && path[len-1]!='\\')
|
---|
510 | {
|
---|
511 | path[len+0]='\\';
|
---|
512 | path[len+1]='\0';
|
---|
513 | return path+len+1;
|
---|
514 | }
|
---|
515 | else
|
---|
516 | return path+len;
|
---|
517 | }
|
---|
518 |
|
---|
519 |
|
---|
520 | /*************************************************************************
|
---|
521 | * SHELL32_33 [SHELL32.33]
|
---|
522 | * remove spaces from beginning and end of passed string
|
---|
523 | */
|
---|
524 | LPSTR WIN32API SHELL32_33(LPSTR str)
|
---|
525 | {
|
---|
526 | LPSTR x = str;
|
---|
527 |
|
---|
528 | dprintf(("SHELL32: .33 (%s)\n",
|
---|
529 | str));
|
---|
530 |
|
---|
531 |
|
---|
532 | while (*x==' ')
|
---|
533 | x++;
|
---|
534 |
|
---|
535 | if (x!=str)
|
---|
536 | lstrcpyA(str,
|
---|
537 | x);
|
---|
538 |
|
---|
539 | if (!*str)
|
---|
540 | return str;
|
---|
541 |
|
---|
542 | x=str+strlen(str)-1;
|
---|
543 |
|
---|
544 | while (*x==' ')
|
---|
545 | x--;
|
---|
546 |
|
---|
547 | if (*x==' ')
|
---|
548 | *x='\0';
|
---|
549 |
|
---|
550 | return x;
|
---|
551 | }
|
---|
552 |
|
---|
553 |
|
---|
554 | /*************************************************************************
|
---|
555 | * SHELL32_34 [SHELL32.34]
|
---|
556 | * basename(char *fn);
|
---|
557 | */
|
---|
558 | LPSTR WIN32API SHELL32_34(LPSTR fn)
|
---|
559 | {
|
---|
560 | LPSTR basefn;
|
---|
561 |
|
---|
562 | dprintf(("SHELL32: .34 (%s)\n",
|
---|
563 | fn));
|
---|
564 |
|
---|
565 |
|
---|
566 | basefn = fn;
|
---|
567 | while (fn[0])
|
---|
568 | {
|
---|
569 | if (( (fn[0]=='\\') ||
|
---|
570 | (fn[0]==':')) && fn[1] && fn[1]!='\\')
|
---|
571 | basefn = fn+1;
|
---|
572 |
|
---|
573 | fn++;
|
---|
574 | }
|
---|
575 |
|
---|
576 | return basefn;
|
---|
577 | }
|
---|
578 |
|
---|
579 | /*************************************************************************
|
---|
580 | * SHELL32_35 [SHELL32.35]
|
---|
581 | * bool getpath(char *pathname); truncates passed argument to a valid path
|
---|
582 | * returns if the string was modified or not.
|
---|
583 | * "\foo\xx\foo"-> "\foo\xx"
|
---|
584 | * "\" -> "\"
|
---|
585 | * "a:\foo" -> "a:\"
|
---|
586 | */
|
---|
587 | DWORD WIN32API SHELL32_35(LPSTR fn)
|
---|
588 | {
|
---|
589 | LPSTR x,cutplace;
|
---|
590 |
|
---|
591 | dprintf(("SHELL32: .35 (%s)\n",
|
---|
592 | fn));
|
---|
593 |
|
---|
594 |
|
---|
595 | if (!fn[0])
|
---|
596 | return 0;
|
---|
597 | x=fn;
|
---|
598 | cutplace = fn;
|
---|
599 | while (*x) {
|
---|
600 | if (*x=='\\') {
|
---|
601 | cutplace=x++;
|
---|
602 | continue;
|
---|
603 | }
|
---|
604 | if (*x==':') {
|
---|
605 | x++;
|
---|
606 | if (*x=='\\')
|
---|
607 | cutplace=++x;
|
---|
608 | continue; /* already x++ed */
|
---|
609 | }
|
---|
610 | x++;
|
---|
611 | }
|
---|
612 | if (!*cutplace)
|
---|
613 | return 0;
|
---|
614 | if (cutplace==fn) {
|
---|
615 | if (fn[0]=='\\') {
|
---|
616 | if (!fn[1])
|
---|
617 | return 0;
|
---|
618 | fn[0]='\0';
|
---|
619 | return 1;
|
---|
620 | }
|
---|
621 | }
|
---|
622 | *cutplace='\0';
|
---|
623 | return 1;
|
---|
624 | }
|
---|
625 |
|
---|
626 | /*************************************************************************
|
---|
627 | * SHELL32_37 [SHELL32.37]
|
---|
628 | * concat_paths(char*target,const char*add);
|
---|
629 | * concats "target\\add" and writes them to target
|
---|
630 | */
|
---|
631 | LPSTR WIN32API SHELL32_37(LPSTR target,
|
---|
632 | LPSTR x1,
|
---|
633 | LPSTR x2)
|
---|
634 | {
|
---|
635 | char buf[260];
|
---|
636 |
|
---|
637 | dprintf(("SHELL32: .37 (%s, %s, %s)\n",
|
---|
638 | target,
|
---|
639 | x1,
|
---|
640 | x2));
|
---|
641 |
|
---|
642 |
|
---|
643 | if (!x2 || !x2[0])
|
---|
644 | {
|
---|
645 | lstrcpyA(target,x1);
|
---|
646 |
|
---|
647 | return target;
|
---|
648 | }
|
---|
649 |
|
---|
650 | lstrcpyA(buf,x1);
|
---|
651 | SHELL32_32(buf); /* append \ if not there */
|
---|
652 | lstrcatA(buf,x2);
|
---|
653 | lstrcpyA(target,buf);
|
---|
654 |
|
---|
655 | return target;
|
---|
656 | }
|
---|
657 |
|
---|
658 | /*************************************************************************
|
---|
659 | * SHELL32_36 [SHELL32.36]
|
---|
660 | * concat_paths(char*target,const char*add);
|
---|
661 | * concats "target\\add" and writes them to target
|
---|
662 | */
|
---|
663 | LPSTR WIN32API SHELL32_36(LPSTR x1,
|
---|
664 | LPSTR x2)
|
---|
665 | {
|
---|
666 | dprintf(("SHELL32: .36 (%s, %s)\n",
|
---|
667 | x1,
|
---|
668 | x2));
|
---|
669 |
|
---|
670 |
|
---|
671 | while (x2[0]=='\\')
|
---|
672 | x2++;
|
---|
673 |
|
---|
674 | return SHELL32_37(x1,
|
---|
675 | x1,
|
---|
676 | x2);
|
---|
677 | }
|
---|
678 |
|
---|
679 | /*************************************************************************
|
---|
680 | * SHELL32_39 [SHELL32.39]
|
---|
681 | * isUNC(const char*path);
|
---|
682 | */
|
---|
683 | BOOL WIN32API SHELL32_39(LPCSTR path)
|
---|
684 | {
|
---|
685 | dprintf (("SHELL32: .39 (%s)\n",
|
---|
686 | path));
|
---|
687 |
|
---|
688 |
|
---|
689 | if ((path[0]=='\\') &&
|
---|
690 | (path[1]=='\\'))
|
---|
691 | return TRUE;
|
---|
692 |
|
---|
693 | return FALSE;
|
---|
694 | }
|
---|
695 |
|
---|
696 |
|
---|
697 | /*************************************************************************
|
---|
698 | * SHELL32_45 [SHELL32.45]
|
---|
699 | * file_exists(char *fn);
|
---|
700 | */
|
---|
701 | BOOL WIN32API SHELL32_45(LPSTR fn)
|
---|
702 | {
|
---|
703 | dprintf(("SHELL32: .45 (%s)\n",
|
---|
704 | fn));
|
---|
705 |
|
---|
706 |
|
---|
707 | if (GetFileAttributesA(fn)==-1)
|
---|
708 | return FALSE;
|
---|
709 | else
|
---|
710 | return TRUE;
|
---|
711 | }
|
---|
712 |
|
---|
713 | /*************************************************************************
|
---|
714 | * SHELL32_52 [SHELL32.52]
|
---|
715 | * look for next arg in string. handle "quoted" strings
|
---|
716 | * returns pointer to argument *AFTER* the space. Or to the \0.
|
---|
717 | */
|
---|
718 | LPSTR WIN32API SHELL32_52(LPSTR cmdline)
|
---|
719 | {
|
---|
720 | BOOL qflag = FALSE;
|
---|
721 |
|
---|
722 | dprintf (("SHELL32: .52 (%s)\n",
|
---|
723 | cmdline));
|
---|
724 |
|
---|
725 |
|
---|
726 | while (*cmdline)
|
---|
727 | {
|
---|
728 | if ((*cmdline==' ') && !qflag)
|
---|
729 | return cmdline+1;
|
---|
730 |
|
---|
731 | if (*cmdline=='"')
|
---|
732 | qflag=!qflag;
|
---|
733 |
|
---|
734 | cmdline++;
|
---|
735 | }
|
---|
736 | return cmdline;
|
---|
737 | }
|
---|
738 |
|
---|
739 |
|
---|
740 | /*************************************************************************
|
---|
741 | * SHELL32_56 [SHELL32.56]
|
---|
742 | * unquote string (remove ")
|
---|
743 | */
|
---|
744 | VOID WIN32API SHELL32_56(LPSTR str)
|
---|
745 | {
|
---|
746 | DWORD len = lstrlenA(str);
|
---|
747 |
|
---|
748 | dprintf (("SHELL32: .56 (%s)\n",
|
---|
749 | str));
|
---|
750 |
|
---|
751 |
|
---|
752 | if (*str!='"')
|
---|
753 | return;
|
---|
754 |
|
---|
755 | if (str[len-1]!='"')
|
---|
756 | return;
|
---|
757 |
|
---|
758 | str[len-1]='\0';
|
---|
759 | lstrcpyA(str,
|
---|
760 | str+1);
|
---|
761 | return;
|
---|
762 | }
|
---|
763 |
|
---|
764 |
|
---|
765 | /*************************************************************************
|
---|
766 | * SHELL32_58 [SHELL32.58]
|
---|
767 | */
|
---|
768 | DWORD WIN32API SHELL32_58(LPCSTR src,
|
---|
769 | DWORD x2,
|
---|
770 | LPSTR target,
|
---|
771 | DWORD pathlen)
|
---|
772 | {
|
---|
773 | dprintf (("SHELL32: .58 (%s, %08xh, %08xh, %08xh) not implemented\n",
|
---|
774 | src,
|
---|
775 | x2,
|
---|
776 | target,
|
---|
777 | pathlen));
|
---|
778 |
|
---|
779 | return 0;
|
---|
780 | }
|
---|
781 |
|
---|
782 |
|
---|
783 | /*************************************************************************
|
---|
784 | * SHELL32_62 [SHELL32.62]
|
---|
785 | */
|
---|
786 | DWORD WIN32API SHELL32_62(DWORD x,
|
---|
787 | DWORD y,
|
---|
788 | DWORD z,
|
---|
789 | DWORD a)
|
---|
790 | {
|
---|
791 | dprintf(("SHELL32: .62 (%08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
792 | x,
|
---|
793 | y,
|
---|
794 | z,
|
---|
795 | a));
|
---|
796 |
|
---|
797 | return 0xffffffff;
|
---|
798 | }
|
---|
799 |
|
---|
800 |
|
---|
801 | /*************************************************************************
|
---|
802 | * SHELL32_63 [SHELL32.63]
|
---|
803 | */
|
---|
804 | DWORD WIN32API SHELL32_63(HWND howner,
|
---|
805 | LPSTR targetbuf,
|
---|
806 | DWORD len,
|
---|
807 | DWORD x,
|
---|
808 | LPCSTR suffix,
|
---|
809 | LPCSTR y,
|
---|
810 | LPCSTR cmd)
|
---|
811 | {
|
---|
812 | dprintf (("SHELL32: .63 (%08xh, %08x, %08xh, %08xh, %08xh, %08xh, %s) not implemented.\n",
|
---|
813 | howner,
|
---|
814 | targetbuf,
|
---|
815 | len,
|
---|
816 | x,
|
---|
817 | suffix,
|
---|
818 | y,
|
---|
819 | cmd));
|
---|
820 |
|
---|
821 | /* puts up a Open Dialog and requests input into targetbuf */
|
---|
822 | /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
|
---|
823 | lstrcpyA(targetbuf,"x:\\s3.exe");
|
---|
824 | return 1;
|
---|
825 | }
|
---|
826 |
|
---|
827 |
|
---|
828 | /*************************************************************************
|
---|
829 | * SHELL32_68 [SHELL32.68]
|
---|
830 | */
|
---|
831 | DWORD WIN32API SHELL32_68(DWORD x,
|
---|
832 | DWORD y,
|
---|
833 | DWORD z)
|
---|
834 | {
|
---|
835 | dprintf(("SHELL32: .68 (%08xh, %08xh, %08xh) not implemented.\n",
|
---|
836 | x,
|
---|
837 | y,
|
---|
838 | z));
|
---|
839 |
|
---|
840 | return 0;
|
---|
841 | }
|
---|
842 |
|
---|
843 |
|
---|
844 | /*************************************************************************
|
---|
845 | * SHELL32_71 [SHELL32.71]
|
---|
846 | * returns internal shell values in the passed pointers
|
---|
847 | */
|
---|
848 | BOOL WIN32API SHELL32_71(LPDWORD x,
|
---|
849 | LPDWORD y)
|
---|
850 | {
|
---|
851 | dprintf(("SHELL32: .71 (%08xh, %08xh) not implemented.\n",
|
---|
852 | x,
|
---|
853 | y));
|
---|
854 |
|
---|
855 | return TRUE;
|
---|
856 | }
|
---|
857 |
|
---|
858 |
|
---|
859 | /*************************************************************************
|
---|
860 | * SHELL32_72 [SHELL32.72]
|
---|
861 | * dunno. something with icons
|
---|
862 | */
|
---|
863 | void WIN32API SHELL32_72(LPSTR x,
|
---|
864 | DWORD y,
|
---|
865 | DWORD z)
|
---|
866 | {
|
---|
867 | dprintf (("SHELL32: .27 (%08xh, %08xh, %08xh) not implemented.\n",
|
---|
868 | x,
|
---|
869 | y,
|
---|
870 | z));
|
---|
871 | }
|
---|
872 |
|
---|
873 |
|
---|
874 | /*************************************************************************
|
---|
875 | * SHELL32_89 [SHELL32.89]
|
---|
876 | */
|
---|
877 | DWORD WIN32API SHELL32_89(DWORD x1,
|
---|
878 | DWORD x2,
|
---|
879 | DWORD x3)
|
---|
880 | {
|
---|
881 | dprintf(("SHELL32: .89 (%08xh, %08xh, %08xh) not implemented.\n",
|
---|
882 | x1,
|
---|
883 | x2,
|
---|
884 | x3));
|
---|
885 |
|
---|
886 | return 0;
|
---|
887 | }
|
---|
888 |
|
---|
889 |
|
---|
890 | /*************************************************************************
|
---|
891 | * SHELL32_119 [SHELL32.119]
|
---|
892 | * unknown
|
---|
893 | */
|
---|
894 | void WIN32API SHELL32_119(LPVOID x)
|
---|
895 | {
|
---|
896 | dprintf(("SHELL32: .119 (%08xh) not implemented.\n",
|
---|
897 | x));
|
---|
898 | }
|
---|
899 |
|
---|
900 |
|
---|
901 | /*************************************************************************
|
---|
902 | * SHELL32_175 [SHELL32.175]
|
---|
903 | * unknown
|
---|
904 | */
|
---|
905 | void WIN32API SHELL32_175(DWORD x1,
|
---|
906 | DWORD x2,
|
---|
907 | DWORD x3,
|
---|
908 | DWORD x4)
|
---|
909 | {
|
---|
910 | dprintf (("SHELL32: .175 (%08x, %08xh, %08xh, %08xh not implemented.\n",
|
---|
911 | x1,
|
---|
912 | x2,
|
---|
913 | x3,
|
---|
914 | x4));
|
---|
915 | }
|
---|
916 |
|
---|
917 |
|
---|
918 | /*************************************************************************
|
---|
919 | * SHELL32_181 [SHELL32.181]
|
---|
920 | * unknown
|
---|
921 | */
|
---|
922 | void WIN32API SHELL32_181(DWORD x,
|
---|
923 | DWORD y)
|
---|
924 | {
|
---|
925 | dprintf(("SHELL32: .181 (%08xh, %08xh) not implemented.\n",
|
---|
926 | x,
|
---|
927 | y));
|
---|
928 | }
|
---|
929 |
|
---|
930 |
|
---|
931 | /*************************************************************************
|
---|
932 | * SHELL32_75 [SHELL32.75]
|
---|
933 | * unknown
|
---|
934 | */
|
---|
935 | BOOL WIN32API SHELL32_75(LPDWORD x,
|
---|
936 | LPDWORD y)
|
---|
937 | {
|
---|
938 | dprintf(("SHELL32: .75 (%08xh, %08xh) not implemented.\n",
|
---|
939 | x,
|
---|
940 | y));
|
---|
941 |
|
---|
942 | return TRUE;
|
---|
943 | }
|
---|
944 |
|
---|
945 |
|
---|
946 | /*************************************************************************
|
---|
947 | * SHELL32_77 [SHELL32.77]
|
---|
948 | */
|
---|
949 | DWORD WIN32API SHELL32_77(DWORD x,
|
---|
950 | DWORD y,
|
---|
951 | DWORD z)
|
---|
952 | {
|
---|
953 | dprintf(("SHELL32: .77 (%08xh, %08xh, %08xh) not implemented.\n",
|
---|
954 | x,
|
---|
955 | y,
|
---|
956 | z));
|
---|
957 |
|
---|
958 | return 0;
|
---|
959 | }
|
---|
960 |
|
---|
961 |
|
---|
962 | /*************************************************************************
|
---|
963 | * SHELL32_79 [SHELL32.79]
|
---|
964 | * create_directory_and_notify(...)
|
---|
965 | */
|
---|
966 | DWORD WIN32API SHELL32_79(LPCSTR dir,
|
---|
967 | LPVOID xvoid)
|
---|
968 | {
|
---|
969 | dprintf(("SHELL32: .79 (%s, %08xh)\n",
|
---|
970 | dir,
|
---|
971 | xvoid));
|
---|
972 |
|
---|
973 | if (!CreateDirectoryA(dir,
|
---|
974 | (PSECURITY_ATTRIBUTES)xvoid))
|
---|
975 | return FALSE;
|
---|
976 |
|
---|
977 | /* @@@PH: SHChangeNotify(8,1,dir,0); */
|
---|
978 | return TRUE;
|
---|
979 | }
|
---|
980 |
|
---|
981 |
|
---|
982 | /*************************************************************************
|
---|
983 | * SHELL32_100 [SHELL32.100]
|
---|
984 | * walks through policy table, queries <app> key, <type> value, returns
|
---|
985 | * queried (DWORD) value.
|
---|
986 | * {0x00001,Explorer,NoRun}
|
---|
987 | * {0x00002,Explorer,NoClose}
|
---|
988 | * {0x00004,Explorer,NoSaveSettings}
|
---|
989 | * {0x00008,Explorer,NoFileMenu}
|
---|
990 | * {0x00010,Explorer,NoSetFolders}
|
---|
991 | * {0x00020,Explorer,NoSetTaskbar}
|
---|
992 | * {0x00040,Explorer,NoDesktop}
|
---|
993 | * {0x00080,Explorer,NoFind}
|
---|
994 | * {0x00100,Explorer,NoDrives}
|
---|
995 | * {0x00200,Explorer,NoDriveAutoRun}
|
---|
996 | * {0x00400,Explorer,NoDriveTypeAutoRun}
|
---|
997 | * {0x00800,Explorer,NoNetHood}
|
---|
998 | * {0x01000,Explorer,NoStartBanner}
|
---|
999 | * {0x02000,Explorer,RestrictRun}
|
---|
1000 | * {0x04000,Explorer,NoPrinterTabs}
|
---|
1001 | * {0x08000,Explorer,NoDeletePrinter}
|
---|
1002 | * {0x10000,Explorer,NoAddPrinter}
|
---|
1003 | * {0x20000,Explorer,NoStartMenuSubFolders}
|
---|
1004 | * {0x40000,Explorer,MyDocsOnNet}
|
---|
1005 | * {0x80000,WinOldApp,NoRealMode}
|
---|
1006 | */
|
---|
1007 | DWORD WIN32API SHELL32_100(DWORD pol)
|
---|
1008 | {
|
---|
1009 | HKEY xhkey;
|
---|
1010 |
|
---|
1011 | dprintf (("SHELL32: .100 (%08xh) not implemented.\n",
|
---|
1012 | pol));
|
---|
1013 |
|
---|
1014 | if (RegOpenKeyA((HKEY)HKEY_CURRENT_USER,
|
---|
1015 | "Software\\Microsoft\\Windows\\CurrentVersion\\Policies",
|
---|
1016 | &xhkey))
|
---|
1017 | return 0;
|
---|
1018 |
|
---|
1019 | /* FIXME: do nothing for now, just return 0 (== "allowed") */
|
---|
1020 | RegCloseKey(xhkey);
|
---|
1021 |
|
---|
1022 | return 0;
|
---|
1023 | }
|
---|
1024 |
|
---|
1025 |
|
---|
1026 | /*************************************************************************
|
---|
1027 | * SHELL32_152 [SHELL32.152]
|
---|
1028 | * itemlist_length
|
---|
1029 | */
|
---|
1030 | DWORD WIN32API SHELL32_152(LPITEMIDLIST iil)
|
---|
1031 | {
|
---|
1032 | LPSHITEMID si;
|
---|
1033 | DWORD len;
|
---|
1034 |
|
---|
1035 | dprintf(("SHELL32: .152 (%08xh)\n",
|
---|
1036 | iil));
|
---|
1037 |
|
---|
1038 |
|
---|
1039 | si = &(iil->mkid);
|
---|
1040 | len = 2;
|
---|
1041 |
|
---|
1042 | while (si->cb)
|
---|
1043 | {
|
---|
1044 | len += si->cb;
|
---|
1045 | si = (LPSHITEMID)(((char*)si)+si->cb);
|
---|
1046 | }
|
---|
1047 |
|
---|
1048 | return len;
|
---|
1049 | }
|
---|
1050 |
|
---|
1051 |
|
---|
1052 | /*************************************************************************
|
---|
1053 | * SHELL32_158 [SHELL32.158]
|
---|
1054 | */
|
---|
1055 | LPSTR WIN32API SHELL32_158(LPSTR path,
|
---|
1056 | DWORD y,
|
---|
1057 | DWORD z)
|
---|
1058 | {
|
---|
1059 | dprintf(("SHELL32: .158 (%s, %08xh, %08xh)\n",
|
---|
1060 | path,
|
---|
1061 | y,
|
---|
1062 | z));
|
---|
1063 |
|
---|
1064 | path = SHELL32_31(path);
|
---|
1065 |
|
---|
1066 | return *path ? (path+1) : path;
|
---|
1067 | }
|
---|
1068 |
|
---|
1069 |
|
---|
1070 | /*************************************************************************
|
---|
1071 | * SHELL32_165 [SHELL32.165]
|
---|
1072 | * create_path_and_notify(...)
|
---|
1073 | */
|
---|
1074 | DWORD WIN32API SHELL32_165(DWORD x,
|
---|
1075 | LPCSTR path)
|
---|
1076 | {
|
---|
1077 | dprintf (("SHELL32 .165 (%08x, %08xh) not implemented.\n",
|
---|
1078 | x,
|
---|
1079 | path));
|
---|
1080 |
|
---|
1081 | if (SHELL32_79(path,
|
---|
1082 | (LPVOID)x))
|
---|
1083 | return 0;
|
---|
1084 |
|
---|
1085 | return 0;
|
---|
1086 | }
|
---|
1087 |
|
---|
1088 |
|
---|
1089 | /*************************************************************************
|
---|
1090 | * SHELL32_195 [SHELL32.195]
|
---|
1091 | * free_ptr() - frees memory using IMalloc
|
---|
1092 | */
|
---|
1093 | DWORD WIN32API SHELL32_195(LPVOID x)
|
---|
1094 | {
|
---|
1095 | dprintf (("SHELL32: .195 (%08xh) (LocalFree)\n",
|
---|
1096 | x));
|
---|
1097 |
|
---|
1098 | return (DWORD)LocalFree((HLOCAL)x);
|
---|
1099 | }
|
---|
1100 |
|
---|
1101 |
|
---|
1102 | /*************************************************************************
|
---|
1103 | * SHELL32_196 [SHELL32.196]
|
---|
1104 | * void *task_alloc(DWORD len), uses SHMalloc allocator
|
---|
1105 | */
|
---|
1106 | LPVOID WIN32API SHELL32_196(DWORD len)
|
---|
1107 | {
|
---|
1108 | dprintf(("SHELL32: .196 (%08xh) (LocalAlloc)\n",
|
---|
1109 | len));
|
---|
1110 |
|
---|
1111 | return (LPVOID)LocalAlloc(len,
|
---|
1112 | LMEM_ZEROINIT); /* FIXME */
|
---|
1113 | }
|
---|
1114 |
|
---|
1115 |
|
---|
1116 | /*************************************************************************
|
---|
1117 | * SHELL32_18 [SHELL32.18]
|
---|
1118 | * copy_itemidlist()
|
---|
1119 | */
|
---|
1120 | LPITEMIDLIST WIN32API SHELL32_18(LPITEMIDLIST iil)
|
---|
1121 | {
|
---|
1122 | DWORD len;
|
---|
1123 | LPITEMIDLIST newiil;
|
---|
1124 |
|
---|
1125 | dprintf(("SHELL32: .18 (%08xh)\n",
|
---|
1126 | iil));
|
---|
1127 |
|
---|
1128 |
|
---|
1129 | len = SHELL32_152(iil);
|
---|
1130 | newiil = (LPITEMIDLIST)SHELL32_196(len);
|
---|
1131 | memcpy(newiil,
|
---|
1132 | iil,
|
---|
1133 | len);
|
---|
1134 |
|
---|
1135 | return newiil;
|
---|
1136 | }
|
---|
1137 |
|
---|
1138 |
|
---|
1139 | /*************************************************************************
|
---|
1140 | * SHELL32_25 [SHELL32.25]
|
---|
1141 | * merge_itemidlist()
|
---|
1142 | */
|
---|
1143 | LPITEMIDLIST WIN32API SHELL32_25(LPITEMIDLIST iil1,
|
---|
1144 | LPITEMIDLIST iil2)
|
---|
1145 | {
|
---|
1146 | DWORD len1,len2;
|
---|
1147 | LPITEMIDLIST newiil;
|
---|
1148 |
|
---|
1149 | dprintf(("SHELL32: .25 (%08xh, %08xh)\n",
|
---|
1150 | iil1,
|
---|
1151 | iil2));
|
---|
1152 |
|
---|
1153 |
|
---|
1154 | len1 = SHELL32_152(iil1)-2;
|
---|
1155 | len2 = SHELL32_152(iil2);
|
---|
1156 | newiil = (LPITEMIDLIST)SHELL32_196(len1+len2);
|
---|
1157 |
|
---|
1158 | memcpy(newiil,
|
---|
1159 | iil1,
|
---|
1160 | len1);
|
---|
1161 |
|
---|
1162 | memcpy(((char*)newiil)+len1,
|
---|
1163 | iil2,
|
---|
1164 | len2);
|
---|
1165 |
|
---|
1166 | return newiil;
|
---|
1167 | }
|
---|
1168 |
|
---|
1169 |
|
---|
1170 | /*************************************************************************
|
---|
1171 | * SHELL32_155 [SHELL32.155]
|
---|
1172 | * free_check_ptr - frees memory (if not NULL) allocated by SHMalloc allocator
|
---|
1173 | */
|
---|
1174 | DWORD WIN32API SHELL32_155(LPVOID x)
|
---|
1175 | {
|
---|
1176 | dprintf(("SHELL32: .155 (%08xh)\n",
|
---|
1177 | x));
|
---|
1178 |
|
---|
1179 | if (!x)
|
---|
1180 | return 0;
|
---|
1181 |
|
---|
1182 | return SHELL32_195(x);
|
---|
1183 | }
|
---|
1184 |
|
---|
1185 |
|
---|
1186 | /*************************************************************************
|
---|
1187 | * SHELL32_85 [SHELL32.85]
|
---|
1188 | * unknown
|
---|
1189 | */
|
---|
1190 | DWORD WIN32API SHELL32_85(DWORD x1,
|
---|
1191 | DWORD x2,
|
---|
1192 | DWORD x3,
|
---|
1193 | DWORD x4)
|
---|
1194 | {
|
---|
1195 | dprintf(("SHELL32: .85 (%08x, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
1196 | x1,
|
---|
1197 | x2,
|
---|
1198 | x3,
|
---|
1199 | x4));
|
---|
1200 |
|
---|
1201 | return 0;
|
---|
1202 | }
|
---|
1203 |
|
---|
1204 |
|
---|
1205 | /*****************************************************************************
|
---|
1206 | * Name : .4
|
---|
1207 | * Purpose :
|
---|
1208 | * Parameters:
|
---|
1209 | * Variables :
|
---|
1210 | * Result :
|
---|
1211 | * Remark : unknown
|
---|
1212 | * Status : UNTESTED UNKNOWN STUB
|
---|
1213 | *
|
---|
1214 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1215 | *****************************************************************************/
|
---|
1216 |
|
---|
1217 | DWORD WIN32API SHELL32_4(DWORD x1)
|
---|
1218 | {
|
---|
1219 | dprintf(("SHELL32: .4 (%08xh) not implemented.\n",
|
---|
1220 | x1));
|
---|
1221 |
|
---|
1222 | return (0);
|
---|
1223 | }
|
---|
1224 |
|
---|
1225 |
|
---|
1226 | /*****************************************************************************
|
---|
1227 | * Name : .59
|
---|
1228 | * Purpose :
|
---|
1229 | * Parameters:
|
---|
1230 | * Variables :
|
---|
1231 | * Result :
|
---|
1232 | * Remark : unknown
|
---|
1233 | * Status : UNTESTED UNKNOWN STUB
|
---|
1234 | *
|
---|
1235 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1236 | *****************************************************************************/
|
---|
1237 |
|
---|
1238 | DWORD WIN32API SHELL32_59(void)
|
---|
1239 | {
|
---|
1240 | dprintf(("SHELL32: .59 () not implemented.\n"));
|
---|
1241 |
|
---|
1242 | return (0);
|
---|
1243 | }
|
---|
1244 |
|
---|
1245 |
|
---|
1246 | /*****************************************************************************
|
---|
1247 | * Name : .162
|
---|
1248 | * Purpose :
|
---|
1249 | * Parameters:
|
---|
1250 | * Variables :
|
---|
1251 | * Result :
|
---|
1252 | * Remark : unknown
|
---|
1253 | * Status : UNTESTED UNKNOWN STUB
|
---|
1254 | *
|
---|
1255 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1256 | *****************************************************************************/
|
---|
1257 |
|
---|
1258 | DWORD WIN32API SHELL32_162(DWORD x1)
|
---|
1259 | {
|
---|
1260 | dprintf(("SHELL32: .162 (%08xh) not implemented.\n",
|
---|
1261 | x1));
|
---|
1262 |
|
---|
1263 | return (0);
|
---|
1264 | }
|
---|
1265 |
|
---|
1266 |
|
---|
1267 | /*****************************************************************************
|
---|
1268 | * Name : .145
|
---|
1269 | * Purpose :
|
---|
1270 | * Parameters:
|
---|
1271 | * Variables :
|
---|
1272 | * Result :
|
---|
1273 | * Remark : unknown
|
---|
1274 | * Status : UNTESTED UNKNOWN STUB
|
---|
1275 | *
|
---|
1276 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1277 | *****************************************************************************/
|
---|
1278 |
|
---|
1279 | DWORD WIN32API SHELL32_145(DWORD x1,
|
---|
1280 | DWORD x2)
|
---|
1281 | {
|
---|
1282 | dprintf(("SHELL32: .145 (%08xh, %08xh) not implemented.\n",
|
---|
1283 | x1,
|
---|
1284 | x2));
|
---|
1285 |
|
---|
1286 | return (0);
|
---|
1287 | }
|
---|
1288 |
|
---|
1289 |
|
---|
1290 | /*****************************************************************************
|
---|
1291 | * Name : .43
|
---|
1292 | * Purpose :
|
---|
1293 | * Parameters:
|
---|
1294 | * Variables :
|
---|
1295 | * Result :
|
---|
1296 | * Remark : unknown
|
---|
1297 | * Status : UNTESTED UNKNOWN STUB
|
---|
1298 | *
|
---|
1299 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1300 | *****************************************************************************/
|
---|
1301 |
|
---|
1302 | DWORD WIN32API SHELL32_43(DWORD x1)
|
---|
1303 | {
|
---|
1304 | dprintf(("SHELL32: .43 (%08xh) not implemented.\n",
|
---|
1305 | x1));
|
---|
1306 |
|
---|
1307 | return (0);
|
---|
1308 | }
|
---|
1309 |
|
---|
1310 |
|
---|
1311 | /*****************************************************************************
|
---|
1312 | * Name : .51
|
---|
1313 | * Purpose :
|
---|
1314 | * Parameters:
|
---|
1315 | * Variables :
|
---|
1316 | * Result :
|
---|
1317 | * Remark : unknown
|
---|
1318 | * Status : UNTESTED UNKNOWN STUB
|
---|
1319 | *
|
---|
1320 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1321 | *****************************************************************************/
|
---|
1322 |
|
---|
1323 | DWORD WIN32API SHELL32_51(DWORD x1,
|
---|
1324 | DWORD x2,
|
---|
1325 | DWORD x3)
|
---|
1326 | {
|
---|
1327 | dprintf(("SHELL32: .51 (%08xh, %08xh, %08xh) not implemented.\n",
|
---|
1328 | x1,
|
---|
1329 | x2,
|
---|
1330 | x3));
|
---|
1331 |
|
---|
1332 | return (0);
|
---|
1333 | }
|
---|
1334 |
|
---|
1335 |
|
---|
1336 | /*****************************************************************************
|
---|
1337 | * Name : .55
|
---|
1338 | * Purpose :
|
---|
1339 | * Parameters:
|
---|
1340 | * Variables :
|
---|
1341 | * Result :
|
---|
1342 | * Remark : unknown
|
---|
1343 | * Status : UNTESTED UNKNOWN STUB
|
---|
1344 | *
|
---|
1345 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1346 | *****************************************************************************/
|
---|
1347 |
|
---|
1348 | DWORD WIN32API SHELL32_55(DWORD x1)
|
---|
1349 | {
|
---|
1350 | dprintf(("SHELL32: .55 (%08xh) not implemented.\n",
|
---|
1351 | x1));
|
---|
1352 |
|
---|
1353 | return (0);
|
---|
1354 | }
|
---|
1355 |
|
---|
1356 |
|
---|
1357 | /*****************************************************************************
|
---|
1358 | * Name : .102
|
---|
1359 | * Purpose :
|
---|
1360 | * Parameters:
|
---|
1361 | * Variables :
|
---|
1362 | * Result :
|
---|
1363 | * Remark : unknown
|
---|
1364 | * Status : UNTESTED UNKNOWN STUB
|
---|
1365 | *
|
---|
1366 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1367 | *****************************************************************************/
|
---|
1368 |
|
---|
1369 | DWORD WIN32API SHELL32_102(DWORD x1,
|
---|
1370 | DWORD x2,
|
---|
1371 | DWORD x3,
|
---|
1372 | DWORD x4,
|
---|
1373 | DWORD x5)
|
---|
1374 | {
|
---|
1375 | dprintf(("SHELL32: .102 (%08xh, %08xh, %08xh, %08xh, %08xh) not implemented.\n",
|
---|
1376 | x1,
|
---|
1377 | x2,
|
---|
1378 | x3,
|
---|
1379 | x4,
|
---|
1380 | x5));
|
---|
1381 |
|
---|
1382 | return (0);
|
---|
1383 | }
|
---|
1384 |
|
---|
1385 |
|
---|
1386 | /*****************************************************************************
|
---|
1387 | * Name : BOOL ShellExecuteEx
|
---|
1388 | * Purpose :
|
---|
1389 | * Parameters:
|
---|
1390 | * Variables :
|
---|
1391 | * Result :
|
---|
1392 | * Remark :
|
---|
1393 | * Status : UNTESTED STUB
|
---|
1394 | *
|
---|
1395 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1396 | *****************************************************************************/
|
---|
1397 |
|
---|
1398 | BOOL WIN32API ShellExecuteEx(LPSHELLEXECUTEINFOA lpExecInfo)
|
---|
1399 | {
|
---|
1400 | dprintf(("SHELL32: ShellExecuteEx (%08xh) not implemented.\n",
|
---|
1401 | lpExecInfo));
|
---|
1402 |
|
---|
1403 | return (0);
|
---|
1404 | }
|
---|
1405 |
|
---|
1406 |
|
---|
1407 |
|
---|
1408 | /*****************************************************************************
|
---|
1409 | * Name : BOOL ShellExecuteExA
|
---|
1410 | * Purpose :
|
---|
1411 | * Parameters:
|
---|
1412 | * Variables :
|
---|
1413 | * Result :
|
---|
1414 | * Remark :
|
---|
1415 | * Status : UNTESTED STUB
|
---|
1416 | *
|
---|
1417 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1418 | *****************************************************************************/
|
---|
1419 |
|
---|
1420 | BOOL WIN32API ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo)
|
---|
1421 | {
|
---|
1422 | dprintf(("SHELL32: ShellExecuteExA (%08xh) not implemented.\n",
|
---|
1423 | lpExecInfo));
|
---|
1424 |
|
---|
1425 | return (0);
|
---|
1426 | }
|
---|
1427 |
|
---|
1428 |
|
---|
1429 | /*****************************************************************************
|
---|
1430 | * Name : BOOL ShellExecuteExW
|
---|
1431 | * Purpose :
|
---|
1432 | * Parameters:
|
---|
1433 | * Variables :
|
---|
1434 | * Result :
|
---|
1435 | * Remark :
|
---|
1436 | * Status : UNTESTED STUB
|
---|
1437 | *
|
---|
1438 | * Author : Patrick Haller [Tue, 1998/06/15 03:00]
|
---|
1439 | *****************************************************************************/
|
---|
1440 |
|
---|
1441 | BOOL WIN32API ShellExecuteExW(LPSHELLEXECUTEINFOW lpExecInfo)
|
---|
1442 | {
|
---|
1443 | dprintf(("SHELL32: ShellExecuteExW (%08xh) not implemented.\n",
|
---|
1444 | lpExecInfo));
|
---|
1445 |
|
---|
1446 | return (0);
|
---|
1447 | }
|
---|
1448 |
|
---|
1449 |
|
---|
1450 | /*****************************************************************************
|
---|
1451 | * Name : DWORD ShellMessageBoxW
|
---|
1452 | * Purpose : display a messagebox, retrieve message text from resources
|
---|
1453 | * Parameters: HMODULE hmod
|
---|
1454 | * HWND hwnd
|
---|
1455 | * DWORD idText
|
---|
1456 | * DWORD idTitle
|
---|
1457 | * DWORD uType
|
---|
1458 | * LPCVOID arglist
|
---|
1459 | * Variables :
|
---|
1460 | * Result :
|
---|
1461 | * Remark : SHELL32.182
|
---|
1462 | * Status : UNTESTED STUB
|
---|
1463 | *
|
---|
1464 | * Author : Patrick Haller [Tue, 1999/06/01 09:00]
|
---|
1465 | *****************************************************************************/
|
---|
1466 |
|
---|
1467 | DWORD WIN32API ShellMessageBoxW(HMODULE hmod,
|
---|
1468 | HWND hwnd,
|
---|
1469 | DWORD idText,
|
---|
1470 | DWORD idTitle,
|
---|
1471 | DWORD uType,
|
---|
1472 | LPCVOID arglist)
|
---|
1473 | {
|
---|
1474 | WCHAR szText[100],
|
---|
1475 | szTitle[100],
|
---|
1476 | szTemp[256];
|
---|
1477 | LPWSTR pszText = &szText[0],
|
---|
1478 | pszTitle = &szTitle[0];
|
---|
1479 | LPVOID args = &arglist;
|
---|
1480 |
|
---|
1481 | dprintf(("SHELL32: ShellMessageBoxW(%08lx,%08lx,%08lx,%08lx,%08lx,%p)\n",
|
---|
1482 | hmod,
|
---|
1483 | hwnd,
|
---|
1484 | idText,
|
---|
1485 | idTitle,
|
---|
1486 | uType,
|
---|
1487 | arglist));
|
---|
1488 |
|
---|
1489 | if (!HIWORD (idTitle))
|
---|
1490 | LoadStringW(hmod,
|
---|
1491 | idTitle,
|
---|
1492 | pszTitle,
|
---|
1493 | 100);
|
---|
1494 | else
|
---|
1495 | pszTitle = (LPWSTR)idTitle;
|
---|
1496 |
|
---|
1497 | if (! HIWORD (idText))
|
---|
1498 | LoadStringW(hmod,idText,pszText,100);
|
---|
1499 | else
|
---|
1500 | pszText = (LPWSTR)idText;
|
---|
1501 |
|
---|
1502 | FormatMessageW(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
---|
1503 | szText,
|
---|
1504 | 0,
|
---|
1505 | 0,
|
---|
1506 | szTemp,
|
---|
1507 | 256,
|
---|
1508 | (LPDWORD)args);
|
---|
1509 |
|
---|
1510 | return MessageBoxW(hwnd,
|
---|
1511 | szTemp,
|
---|
1512 | szTitle,
|
---|
1513 | uType);
|
---|
1514 | }
|
---|
1515 |
|
---|
1516 |
|
---|
1517 | /*****************************************************************************
|
---|
1518 | * Name : DWORD ShellMessageBoxA
|
---|
1519 | * Purpose : display a messagebox, retrieve message text from resources
|
---|
1520 | * Parameters: HMODULE hmod
|
---|
1521 | * HWND hwnd
|
---|
1522 | * DWORD idText
|
---|
1523 | * DWORD idTitle
|
---|
1524 | * DWORD uType
|
---|
1525 | * LPCVOID arglist
|
---|
1526 | * Variables :
|
---|
1527 | * Result :
|
---|
1528 | * Remark : SHELL32.183
|
---|
1529 | * Status : UNTESTED STUB
|
---|
1530 | *
|
---|
1531 | * Author : Patrick Haller [Tue, 1999/06/01 09:00]
|
---|
1532 | *****************************************************************************/
|
---|
1533 |
|
---|
1534 | DWORD WIN32API ShellMessageBoxA(HMODULE hmod,
|
---|
1535 | HWND hwnd,
|
---|
1536 | DWORD idText,
|
---|
1537 | DWORD idTitle,
|
---|
1538 | DWORD uType,
|
---|
1539 | LPCVOID arglist)
|
---|
1540 | {
|
---|
1541 | char szText[100],
|
---|
1542 | szTitle[100],
|
---|
1543 | szTemp[256];
|
---|
1544 | LPSTR pszText = &szText[0],
|
---|
1545 | pszTitle = &szTitle[0];
|
---|
1546 | LPVOID args = &arglist;
|
---|
1547 |
|
---|
1548 | dprintf(("SHELL32: ShellMessageBoxA (%08lx,%08lx,%08lx,%08lx,%08lx,%p)\n",
|
---|
1549 | hmod,
|
---|
1550 | hwnd,
|
---|
1551 | idText,
|
---|
1552 | idTitle,
|
---|
1553 | uType,
|
---|
1554 | arglist));
|
---|
1555 |
|
---|
1556 | if (!HIWORD (idTitle))
|
---|
1557 | LoadStringA(hmod,idTitle,pszTitle,100);
|
---|
1558 | else
|
---|
1559 | pszTitle = (LPSTR)idTitle;
|
---|
1560 |
|
---|
1561 | if (! HIWORD (idText))
|
---|
1562 | LoadStringA(hmod,idText,pszText,100);
|
---|
1563 | else
|
---|
1564 | pszText = (LPSTR)idText;
|
---|
1565 |
|
---|
1566 | FormatMessageA(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ARGUMENT_ARRAY,
|
---|
1567 | pszText,
|
---|
1568 | 0,
|
---|
1569 | 0,
|
---|
1570 | szTemp,
|
---|
1571 | 256,
|
---|
1572 | (LPDWORD)args);
|
---|
1573 |
|
---|
1574 | return MessageBoxA(hwnd,
|
---|
1575 | szTemp,
|
---|
1576 | pszTitle,
|
---|
1577 | uType);
|
---|
1578 | }
|
---|
1579 |
|
---|
1580 |
|
---|