4 * Copyright 1998 Marcus Meissner
5 * Copyright 1998 Juergen Schmied (jsch) * <juergen.schmied@metronet.de>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
24 WINE_DEFAULT_DEBUG_CHANNEL(shell
);
26 const char * const SHELL_Authors
[] = { "Copyright 1993-2009 WINE team", "Copyright 1998-2009 ReactOS Team", 0 };
29 /*************************************************************************
30 * CommandLineToArgvW [SHELL32.@]
32 * We must interpret the quotes in the command line to rebuild the argv
34 * - arguments are separated by spaces or tabs
35 * - quotes serve as optional argument delimiters
37 * - escaped quotes must be converted back to '"'
39 * - an odd number of '\'s followed by '"' correspond to half that number
40 * of '\' followed by a '"' (extension of the above)
43 * - an even number of '\'s followed by a '"' correspond to half that number
44 * of '\', plus a regular quote serving as an argument delimiter (which
45 * means it does not appear in the result)
46 * 'a\\"b c"' -> 'a\b c'
47 * 'a\\\\"b c"' -> 'a\\b c'
48 * - '\' that are not followed by a '"' are copied literally
58 LPWSTR
* WINAPI
CommandLineToArgvW(LPCWSTR lpCmdline
, int* numargs
)
69 /* Return the path to the executable */
72 argv
= (LPWSTR
*)LocalAlloc(LMEM_FIXED
, size
);
75 len
= GetModuleFileNameW(0, (LPWSTR
)(argv
+1), (size
-sizeof(LPWSTR
))/sizeof(WCHAR
));
81 if (len
< size
) break;
83 argv
= (LPWSTR
*)LocalReAlloc(argv
, size
, 0);
85 argv
[0]=(LPWSTR
)(argv
+1);
92 /* to get a writable copy */
99 if (*cs
==0 || ((*cs
==0x0009 || *cs
==0x0020) && !in_quotes
))
103 /* skip the remaining spaces */
104 while (*cs
==0x0009 || *cs
==0x0020) {
112 else if (*cs
==0x005c)
114 /* '\', count them */
117 else if ((*cs
==0x0022) && ((bcount
& 1)==0))
120 in_quotes
=!in_quotes
;
125 /* a regular character */
130 /* Allocate in a single lump, the string array, and the strings that go with it.
131 * This way the caller can make a single GlobalFree call to free both, as per MSDN.
133 argv
= (LPWSTR
*)LocalAlloc(LMEM_FIXED
, argc
*sizeof(LPWSTR
)+(wcslen(lpCmdline
)+1)*sizeof(WCHAR
));
136 cmdline
=(LPWSTR
)(argv
+argc
);
137 wcscpy(cmdline
, lpCmdline
);
145 if ((*s
==0x0009 || *s
==0x0020) && !in_quotes
)
147 /* Close the argument and copy it */
151 /* skip the remaining spaces */
154 } while (*s
==0x0009 || *s
==0x0020);
156 /* Start with a new argument */
171 /* Preceded by an even number of '\', this is half that
172 * number of '\', plus a quote which we erase.
175 in_quotes
=!in_quotes
;
180 /* Preceded by an odd number of '\', this is half that
181 * number of '\' followed by a '"'
191 /* a regular character */
207 static DWORD
shgfi_get_exe_type(LPCWSTR szFullPath
)
212 IMAGE_DOS_HEADER mz_header
;
217 status
= GetBinaryTypeW (szFullPath
, &BinaryType
);
220 if (BinaryType
== SCS_DOS_BINARY
|| BinaryType
== SCS_PIF_BINARY
)
223 hfile
= CreateFileW( szFullPath
, GENERIC_READ
, FILE_SHARE_READ
,
224 NULL
, OPEN_EXISTING
, 0, 0 );
225 if ( hfile
== INVALID_HANDLE_VALUE
)
229 * The next section is adapted from MODULE_GetBinaryType, as we need
230 * to examine the image header to get OS and version information. We
231 * know from calling GetBinaryTypeA that the image is valid and either
232 * an NE or PE, so much error handling can be omitted.
233 * Seek to the start of the file and read the header information.
236 SetFilePointer( hfile
, 0, NULL
, SEEK_SET
);
237 ReadFile( hfile
, &mz_header
, sizeof(mz_header
), &len
, NULL
);
239 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
240 ReadFile( hfile
, magic
, sizeof(magic
), &len
, NULL
);
241 if ( *(DWORD
*)magic
== IMAGE_NT_SIGNATURE
)
243 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
244 ReadFile( hfile
, &nt
, sizeof(nt
), &len
, NULL
);
245 CloseHandle( hfile
);
246 /* DLL files are not executable and should return 0 */
247 if (nt
.FileHeader
.Characteristics
& IMAGE_FILE_DLL
)
249 if (nt
.OptionalHeader
.Subsystem
== IMAGE_SUBSYSTEM_WINDOWS_GUI
)
251 return IMAGE_NT_SIGNATURE
|
252 (nt
.OptionalHeader
.MajorSubsystemVersion
<< 24) |
253 (nt
.OptionalHeader
.MinorSubsystemVersion
<< 16);
255 return IMAGE_NT_SIGNATURE
;
257 else if ( *(WORD
*)magic
== IMAGE_OS2_SIGNATURE
)
260 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
261 ReadFile( hfile
, &ne
, sizeof(ne
), &len
, NULL
);
262 CloseHandle( hfile
);
263 if (ne
.ne_exetyp
== 2)
264 return IMAGE_OS2_SIGNATURE
| (ne
.ne_expver
<< 16);
267 CloseHandle( hfile
);
271 /*************************************************************************
272 * SHELL_IsShortcut [internal]
274 * Decide if an item id list points to a shell shortcut
276 BOOL
SHELL_IsShortcut(LPCITEMIDLIST pidlLast
)
278 char szTemp
[MAX_PATH
];
282 if (_ILGetExtension(pidlLast
, szTemp
, MAX_PATH
) &&
283 HCR_MapTypeToValueA(szTemp
, szTemp
, MAX_PATH
, TRUE
))
285 if (ERROR_SUCCESS
== RegOpenKeyExA(HKEY_CLASSES_ROOT
, szTemp
, 0, KEY_QUERY_VALUE
, &keyCls
))
287 if (ERROR_SUCCESS
== RegQueryValueExA(keyCls
, "IsShortcut", NULL
, NULL
, NULL
, NULL
))
297 #define SHGFI_KNOWN_FLAGS \
298 (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
299 SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
300 SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
301 SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
302 SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
304 /*************************************************************************
305 * SHGetFileInfoW [SHELL32.@]
308 DWORD_PTR WINAPI
SHGetFileInfoW(LPCWSTR path
,DWORD dwFileAttributes
,
309 SHFILEINFOW
*psfi
, UINT sizeofpsfi
, UINT flags
)
311 WCHAR szLocation
[MAX_PATH
], szFullPath
[MAX_PATH
];
313 DWORD_PTR ret
= TRUE
;
314 DWORD dwAttributes
= 0;
315 CComPtr
<IShellFolder
> psfParent
;
316 CComPtr
<IExtractIconW
> pei
;
317 LPITEMIDLIST pidlLast
= NULL
, pidl
= NULL
;
319 BOOL IconNotYetLoaded
=TRUE
;
322 TRACE("%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
323 (flags
& SHGFI_PIDL
)? "pidl" : debugstr_w(path
), dwFileAttributes
,
324 psfi
, psfi
->dwAttributes
, sizeofpsfi
, flags
);
326 if ( (flags
& SHGFI_USEFILEATTRIBUTES
) &&
327 (flags
& (SHGFI_ATTRIBUTES
|SHGFI_EXETYPE
|SHGFI_PIDL
)))
332 /* windows initializes these values regardless of the flags */
335 psfi
->szDisplayName
[0] = '\0';
336 psfi
->szTypeName
[0] = '\0';
340 if (!(flags
& SHGFI_PIDL
))
342 /* SHGetFileInfo should work with absolute and relative paths */
343 if (PathIsRelativeW(path
))
345 GetCurrentDirectoryW(MAX_PATH
, szLocation
);
346 PathCombineW(szFullPath
, szLocation
, path
);
350 lstrcpynW(szFullPath
, path
, MAX_PATH
);
354 if (flags
& SHGFI_EXETYPE
)
356 if (flags
!= SHGFI_EXETYPE
)
358 return shgfi_get_exe_type(szFullPath
);
362 * psfi is NULL normally to query EXE type. If it is NULL, none of the
363 * below makes sense anyway. Windows allows this and just returns FALSE
369 * translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES
371 * The pidl functions fail on not existing file names
374 if (flags
& SHGFI_PIDL
)
376 pidl
= ILClone((LPCITEMIDLIST
)path
);
378 else if (!(flags
& SHGFI_USEFILEATTRIBUTES
))
380 hr
= SHILCreateFromPathW(szFullPath
, &pidl
, &dwAttributes
);
383 if ((flags
& SHGFI_PIDL
) || !(flags
& SHGFI_USEFILEATTRIBUTES
))
385 /* get the parent shellfolder */
388 hr
= SHBindToParent( pidl
, IID_IShellFolder
, (LPVOID
*)&psfParent
,
389 (LPCITEMIDLIST
*)&pidlLast
);
391 pidlLast
= ILClone(pidlLast
);
396 ERR("pidl is null!\n");
401 /* get the attributes of the child */
402 if (SUCCEEDED(hr
) && (flags
& SHGFI_ATTRIBUTES
))
404 if (!(flags
& SHGFI_ATTR_SPECIFIED
))
406 psfi
->dwAttributes
= 0xffffffff;
408 if (psfParent
!= NULL
)
409 psfParent
->GetAttributesOf(1, (LPCITEMIDLIST
*)&pidlLast
,
410 &(psfi
->dwAttributes
) );
413 /* get the displayname */
414 if (SUCCEEDED(hr
) && (flags
& SHGFI_DISPLAYNAME
))
416 if (flags
& SHGFI_USEFILEATTRIBUTES
)
418 wcscpy (psfi
->szDisplayName
, PathFindFileNameW(szFullPath
));
423 hr
= psfParent
->GetDisplayNameOf(pidlLast
,
424 SHGDN_INFOLDER
, &str
);
425 StrRetToStrNW (psfi
->szDisplayName
, MAX_PATH
, &str
, pidlLast
);
429 /* get the type name */
430 if (SUCCEEDED(hr
) && (flags
& SHGFI_TYPENAME
))
432 static const WCHAR szFile
[] = { 'F','i','l','e',0 };
433 static const WCHAR szDashFile
[] = { '-','f','i','l','e',0 };
435 if (!(flags
& SHGFI_USEFILEATTRIBUTES
))
439 _ILGetFileType(pidlLast
, ftype
, 80);
440 MultiByteToWideChar(CP_ACP
, 0, ftype
, -1, psfi
->szTypeName
, 80 );
444 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
445 wcscat (psfi
->szTypeName
, szFile
);
450 wcscpy(sTemp
,PathFindExtensionW(szFullPath
));
451 if (!( HCR_MapTypeToValueW(sTemp
, sTemp
, 64, TRUE
) &&
452 HCR_MapTypeToValueW(sTemp
, psfi
->szTypeName
, 80, FALSE
)))
454 lstrcpynW (psfi
->szTypeName
, sTemp
, 64);
455 wcscat (psfi
->szTypeName
, szDashFile
);
462 if (flags
& SHGFI_OPENICON
)
463 uGilFlags
|= GIL_OPENICON
;
465 if (flags
& SHGFI_LINKOVERLAY
)
466 uGilFlags
|= GIL_FORSHORTCUT
;
467 else if ((flags
&SHGFI_ADDOVERLAYS
) ||
468 (flags
&(SHGFI_ICON
|SHGFI_SMALLICON
))==SHGFI_ICON
)
470 if (SHELL_IsShortcut(pidlLast
))
471 uGilFlags
|= GIL_FORSHORTCUT
;
474 if (flags
& SHGFI_OVERLAYINDEX
)
475 FIXME("SHGFI_OVERLAYINDEX unhandled\n");
477 if (flags
& SHGFI_SELECTED
)
478 FIXME("set icon to selected, stub\n");
480 if (flags
& SHGFI_SHELLICONSIZE
)
481 FIXME("set icon to shell size, stub\n");
483 /* get the iconlocation */
484 if (SUCCEEDED(hr
) && (flags
& SHGFI_ICONLOCATION
))
488 if (flags
& SHGFI_USEFILEATTRIBUTES
)
490 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
492 wcscpy(psfi
->szDisplayName
, swShell32Name
);
493 psfi
->iIcon
= -IDI_SHELL_FOLDER
;
498 static const WCHAR p1W
[] = {'%','1',0};
499 WCHAR sTemp
[MAX_PATH
];
501 szExt
= PathFindExtensionW(szFullPath
);
502 TRACE("szExt=%s\n", debugstr_w(szExt
));
504 HCR_MapTypeToValueW(szExt
, sTemp
, MAX_PATH
, TRUE
) &&
505 HCR_GetDefaultIconW(sTemp
, sTemp
, MAX_PATH
, &psfi
->iIcon
))
507 if (lstrcmpW(p1W
, sTemp
))
508 wcscpy(psfi
->szDisplayName
, sTemp
);
511 /* the icon is in the file */
512 wcscpy(psfi
->szDisplayName
, szFullPath
);
521 hr
= psfParent
->GetUIObjectOf(0, 1,
522 (LPCITEMIDLIST
*)&pidlLast
, IID_IExtractIconW
,
523 &uDummy
, (LPVOID
*)&pei
);
526 hr
= pei
->GetIconLocation(uGilFlags
,
527 szLocation
, MAX_PATH
, &iIndex
, &uFlags
);
529 if (uFlags
& GIL_NOTFILENAME
)
533 wcscpy (psfi
->szDisplayName
, szLocation
);
534 psfi
->iIcon
= iIndex
;
540 /* get icon index (or load icon)*/
541 if (SUCCEEDED(hr
) && (flags
& (SHGFI_ICON
| SHGFI_SYSICONINDEX
)))
543 if (flags
& SHGFI_USEFILEATTRIBUTES
&& !(flags
& SHGFI_PIDL
))
545 WCHAR sTemp
[MAX_PATH
];
549 lstrcpynW(sTemp
, szFullPath
, MAX_PATH
);
551 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
552 psfi
->iIcon
= SIC_GetIconIndex(swShell32Name
, -IDI_SHELL_FOLDER
, 0);
555 static const WCHAR p1W
[] = {'%','1',0};
558 szExt
= PathFindExtensionW(sTemp
);
560 HCR_MapTypeToValueW(szExt
, sTemp
, MAX_PATH
, TRUE
) &&
561 HCR_GetDefaultIconW(sTemp
, sTemp
, MAX_PATH
, &icon_idx
))
563 if (!lstrcmpW(p1W
,sTemp
)) /* icon is in the file */
564 wcscpy(sTemp
, szFullPath
);
566 if (flags
& SHGFI_SYSICONINDEX
)
568 psfi
->iIcon
= SIC_GetIconIndex(sTemp
,icon_idx
,0);
569 if (psfi
->iIcon
== -1)
575 if (flags
& SHGFI_SMALLICON
)
576 ret
= PrivateExtractIconsW( sTemp
,icon_idx
,
577 GetSystemMetrics( SM_CXSMICON
),
578 GetSystemMetrics( SM_CYSMICON
),
579 &psfi
->hIcon
, 0, 1, 0);
581 ret
= PrivateExtractIconsW( sTemp
, icon_idx
,
582 GetSystemMetrics( SM_CXICON
),
583 GetSystemMetrics( SM_CYICON
),
584 &psfi
->hIcon
, 0, 1, 0);
585 if (ret
!= 0 && ret
!= 0xFFFFFFFF)
587 IconNotYetLoaded
=FALSE
;
588 psfi
->iIcon
= icon_idx
;
596 if (!(PidlToSicIndex(psfParent
, pidlLast
, !(flags
& SHGFI_SMALLICON
),
597 uGilFlags
, &(psfi
->iIcon
))))
602 if (ret
&& (flags
& SHGFI_SYSICONINDEX
))
604 if (flags
& SHGFI_SMALLICON
)
605 ret
= (DWORD_PTR
) ShellSmallIconList
;
607 ret
= (DWORD_PTR
) ShellBigIconList
;
612 if (SUCCEEDED(hr
) && (flags
& SHGFI_ICON
) && IconNotYetLoaded
)
614 if (flags
& SHGFI_SMALLICON
)
615 psfi
->hIcon
= ImageList_GetIcon( ShellSmallIconList
, psfi
->iIcon
, ILD_NORMAL
);
617 psfi
->hIcon
= ImageList_GetIcon( ShellBigIconList
, psfi
->iIcon
, ILD_NORMAL
);
620 if (flags
& ~SHGFI_KNOWN_FLAGS
)
621 FIXME("unknown flags %08x\n", flags
& ~SHGFI_KNOWN_FLAGS
);
629 TRACE ("icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
630 psfi
->hIcon
, psfi
->iIcon
, psfi
->dwAttributes
,
631 debugstr_w(psfi
->szDisplayName
), debugstr_w(psfi
->szTypeName
), ret
);
637 /*************************************************************************
638 * SHGetFileInfoA [SHELL32.@]
641 * MSVBVM60.__vbaNew2 expects this function to return a value in range
642 * 1 .. 0x7fff when the function succeeds and flags does not contain
643 * SHGFI_EXETYPE or SHGFI_SYSICONINDEX (see bug 7701)
645 DWORD_PTR WINAPI
SHGetFileInfoA(LPCSTR path
,DWORD dwFileAttributes
,
646 SHFILEINFOA
*psfi
, UINT sizeofpsfi
,
650 LPWSTR temppath
= NULL
;
653 SHFILEINFOW temppsfi
;
655 if (flags
& SHGFI_PIDL
)
657 /* path contains a pidl */
658 pathW
= (LPCWSTR
)path
;
662 len
= MultiByteToWideChar(CP_ACP
, 0, path
, -1, NULL
, 0);
663 temppath
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
*sizeof(WCHAR
));
664 MultiByteToWideChar(CP_ACP
, 0, path
, -1, temppath
, len
);
668 if (psfi
&& (flags
& SHGFI_ATTR_SPECIFIED
))
669 temppsfi
.dwAttributes
=psfi
->dwAttributes
;
672 ret
= SHGetFileInfoW(pathW
, dwFileAttributes
, NULL
, sizeof(temppsfi
), flags
);
674 ret
= SHGetFileInfoW(pathW
, dwFileAttributes
, &temppsfi
, sizeof(temppsfi
), flags
);
678 if(flags
& SHGFI_ICON
)
679 psfi
->hIcon
=temppsfi
.hIcon
;
680 if(flags
& (SHGFI_SYSICONINDEX
|SHGFI_ICON
|SHGFI_ICONLOCATION
))
681 psfi
->iIcon
=temppsfi
.iIcon
;
682 if(flags
& SHGFI_ATTRIBUTES
)
683 psfi
->dwAttributes
=temppsfi
.dwAttributes
;
684 if(flags
& (SHGFI_DISPLAYNAME
|SHGFI_ICONLOCATION
))
686 WideCharToMultiByte(CP_ACP
, 0, temppsfi
.szDisplayName
, -1,
687 psfi
->szDisplayName
, sizeof(psfi
->szDisplayName
), NULL
, NULL
);
689 if(flags
& SHGFI_TYPENAME
)
691 WideCharToMultiByte(CP_ACP
, 0, temppsfi
.szTypeName
, -1,
692 psfi
->szTypeName
, sizeof(psfi
->szTypeName
), NULL
, NULL
);
696 HeapFree(GetProcessHeap(), 0, temppath
);
701 /*************************************************************************
702 * DuplicateIcon [SHELL32.@]
704 EXTERN_C HICON WINAPI
DuplicateIcon( HINSTANCE hInstance
, HICON hIcon
)
709 TRACE("%p %p\n", hInstance
, hIcon
);
711 if (GetIconInfo(hIcon
, &IconInfo
))
713 hDupIcon
= CreateIconIndirect(&IconInfo
);
715 /* clean up hbmMask and hbmColor */
716 DeleteObject(IconInfo
.hbmMask
);
717 DeleteObject(IconInfo
.hbmColor
);
723 /*************************************************************************
724 * ExtractIconA [SHELL32.@]
726 HICON WINAPI
ExtractIconA(HINSTANCE hInstance
, LPCSTR lpszFile
, UINT nIconIndex
)
729 INT len
= MultiByteToWideChar(CP_ACP
, 0, lpszFile
, -1, NULL
, 0);
730 LPWSTR lpwstrFile
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
732 TRACE("%p %s %d\n", hInstance
, lpszFile
, nIconIndex
);
734 MultiByteToWideChar(CP_ACP
, 0, lpszFile
, -1, lpwstrFile
, len
);
735 ret
= ExtractIconW(hInstance
, lpwstrFile
, nIconIndex
);
736 HeapFree(GetProcessHeap(), 0, lpwstrFile
);
741 /*************************************************************************
742 * ExtractIconW [SHELL32.@]
744 HICON WINAPI
ExtractIconW(HINSTANCE hInstance
, LPCWSTR lpszFile
, UINT nIconIndex
)
748 UINT cx
= GetSystemMetrics(SM_CXICON
), cy
= GetSystemMetrics(SM_CYICON
);
750 TRACE("%p %s %d\n", hInstance
, debugstr_w(lpszFile
), nIconIndex
);
752 if (nIconIndex
== 0xFFFFFFFF)
754 ret
= PrivateExtractIconsW(lpszFile
, 0, cx
, cy
, NULL
, NULL
, 0, LR_DEFAULTCOLOR
);
755 if (ret
!= 0xFFFFFFFF && ret
)
756 return (HICON
)(UINT_PTR
)ret
;
760 ret
= PrivateExtractIconsW(lpszFile
, nIconIndex
, cx
, cy
, &hIcon
, NULL
, 1, LR_DEFAULTCOLOR
);
762 if (ret
== 0xFFFFFFFF)
764 else if (ret
> 0 && hIcon
)
770 /*************************************************************************
771 * Printer_LoadIconsW [SHELL32.205]
773 EXTERN_C VOID WINAPI
Printer_LoadIconsW(LPCWSTR wsPrinterName
, HICON
* pLargeIcon
, HICON
* pSmallIcon
)
775 INT iconindex
=IDI_SHELL_PRINTERS_FOLDER
;
777 TRACE("(%s, %p, %p)\n", debugstr_w(wsPrinterName
), pLargeIcon
, pSmallIcon
);
779 /* We should check if wsPrinterName is
780 1. the Default Printer or not
782 3. a Local Printer or a Network-Printer
783 and use different Icons
785 if((wsPrinterName
!= NULL
) && (wsPrinterName
[0] != 0))
787 FIXME("(select Icon by PrinterName %s not implemented)\n", debugstr_w(wsPrinterName
));
790 if(pLargeIcon
!= NULL
)
791 *pLargeIcon
= (HICON
)LoadImageW(shell32_hInstance
,
792 (LPCWSTR
) MAKEINTRESOURCE(iconindex
), IMAGE_ICON
,
793 0, 0, LR_DEFAULTCOLOR
|LR_DEFAULTSIZE
);
795 if(pSmallIcon
!= NULL
)
796 *pSmallIcon
= (HICON
)LoadImageW(shell32_hInstance
,
797 (LPCWSTR
) MAKEINTRESOURCE(iconindex
), IMAGE_ICON
,
798 16, 16, LR_DEFAULTCOLOR
);
801 /*************************************************************************
802 * Printers_RegisterWindowW [SHELL32.213]
803 * used by "printui.dll":
804 * find the Window of the given Type for the specific Printer and
805 * return the already existent hwnd or open a new window
807 EXTERN_C BOOL WINAPI
Printers_RegisterWindowW(LPCWSTR wsPrinter
, DWORD dwType
,
808 HANDLE
* phClassPidl
, HWND
* phwnd
)
810 FIXME("(%s, %x, %p (%p), %p (%p)) stub!\n", debugstr_w(wsPrinter
), dwType
,
811 phClassPidl
, (phClassPidl
!= NULL
) ? *(phClassPidl
) : NULL
,
812 phwnd
, (phwnd
!= NULL
) ? *(phwnd
) : NULL
);
817 /*************************************************************************
818 * Printers_UnregisterWindow [SHELL32.214]
820 EXTERN_C VOID WINAPI
Printers_UnregisterWindow(HANDLE hClassPidl
, HWND hwnd
)
822 FIXME("(%p, %p) stub!\n", hClassPidl
, hwnd
);
825 /*************************************************************************/
830 LPCWSTR szOtherStuff
;
834 #define DROP_FIELD_TOP (-15)
835 #define DROP_FIELD_HEIGHT 15
837 /*************************************************************************
838 * SHAppBarMessage [SHELL32.@]
840 UINT_PTR WINAPI
SHAppBarMessage(DWORD msg
, PAPPBARDATA data
)
842 int width
=data
->rc
.right
- data
->rc
.left
;
843 int height
=data
->rc
.bottom
- data
->rc
.top
;
846 TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n",
847 msg
, data
->cbSize
, data
->hWnd
, data
->uCallbackMessage
, data
->uEdge
,
848 wine_dbgstr_rect(&data
->rc
), data
->lParam
);
853 return ABS_ALWAYSONTOP
| ABS_AUTOHIDE
;
854 case ABM_GETTASKBARPOS
:
855 GetWindowRect(data
->hWnd
, &rec
);
859 SetActiveWindow(data
->hWnd
);
861 case ABM_GETAUTOHIDEBAR
:
862 return 0; /* pretend there is no autohide bar */
864 /* cbSize, hWnd, and uCallbackMessage are used. All other ignored */
865 SetWindowPos(data
->hWnd
,HWND_TOP
,0,0,0,0,SWP_SHOWWINDOW
|SWP_NOMOVE
|SWP_NOSIZE
);
868 GetWindowRect(data
->hWnd
, &(data
->rc
));
871 FIXME("ABM_REMOVE broken\n");
872 /* FIXME: this is wrong; should it be DestroyWindow instead? */
873 /*CloseHandle(data->hWnd);*/
875 case ABM_SETAUTOHIDEBAR
:
876 SetWindowPos(data
->hWnd
,HWND_TOP
,rec
.left
+1000,rec
.top
,
877 width
,height
,SWP_SHOWWINDOW
);
880 data
->uEdge
=(ABE_RIGHT
| ABE_LEFT
);
881 SetWindowPos(data
->hWnd
,HWND_TOP
,data
->rc
.left
,data
->rc
.top
,
882 width
,height
,SWP_SHOWWINDOW
);
884 case ABM_WINDOWPOSCHANGED
:
890 /*************************************************************************
891 * SHHelpShortcuts_RunDLLA [SHELL32.@]
894 EXTERN_C DWORD WINAPI
SHHelpShortcuts_RunDLLA(DWORD dwArg1
, DWORD dwArg2
, DWORD dwArg3
, DWORD dwArg4
)
896 FIXME("(%x, %x, %x, %x) stub!\n", dwArg1
, dwArg2
, dwArg3
, dwArg4
);
900 /*************************************************************************
901 * SHHelpShortcuts_RunDLLA [SHELL32.@]
904 EXTERN_C DWORD WINAPI
SHHelpShortcuts_RunDLLW(DWORD dwArg1
, DWORD dwArg2
, DWORD dwArg3
, DWORD dwArg4
)
906 FIXME("(%x, %x, %x, %x) stub!\n", dwArg1
, dwArg2
, dwArg3
, dwArg4
);
910 /*************************************************************************
911 * SHLoadInProc [SHELL32.@]
912 * Create an instance of specified object class from within
913 * the shell process and release it immediately
915 EXTERN_C HRESULT WINAPI
SHLoadInProc (REFCLSID rclsid
)
917 CComPtr
<IUnknown
> ptr
;
919 TRACE("%s\n", debugstr_guid(&rclsid
));
921 CoCreateInstance(rclsid
, NULL
, CLSCTX_INPROC_SERVER
, IID_IUnknown
, (void **)&ptr
);
924 return DISP_E_MEMBERNOTFOUND
;
927 static VOID
SetRegTextData(HWND hWnd
, HKEY hKey
, LPCWSTR Value
, UINT uID
)
933 if( RegQueryValueExW(hKey
, Value
, NULL
, &dwType
, NULL
, &dwBufferSize
) == ERROR_SUCCESS
)
937 lpBuffer
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, dwBufferSize
);
941 if( RegQueryValueExW(hKey
, Value
, NULL
, &dwType
, (LPBYTE
)lpBuffer
, &dwBufferSize
) == ERROR_SUCCESS
)
943 SetDlgItemTextW(hWnd
, uID
, lpBuffer
);
946 HeapFree(GetProcessHeap(), 0, lpBuffer
);
952 INT_PTR CALLBACK
AboutAuthorsDlgProc( HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
958 const char* const *pstr
= SHELL_Authors
;
960 // Add the authors to the list
961 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, WM_SETREDRAW
, FALSE
, 0 );
967 /* authors list is in utf-8 format */
968 MultiByteToWideChar( CP_UTF8
, 0, *pstr
, -1, name
, sizeof(name
)/sizeof(WCHAR
) );
969 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, LB_ADDSTRING
, (WPARAM
)-1, (LPARAM
)name
);
973 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, WM_SETREDRAW
, TRUE
, 0 );
981 /*************************************************************************
982 * AboutDlgProc (internal)
984 INT_PTR CALLBACK
AboutDlgProc( HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
986 static DWORD cxLogoBmp
;
987 static DWORD cyLogoBmp
;
988 static HBITMAP hLogoBmp
;
989 static HWND hWndAuthors
;
995 ABOUT_INFO
*info
= (ABOUT_INFO
*)lParam
;
999 const WCHAR szRegKey
[] = L
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
1001 MEMORYSTATUSEX MemStat
;
1002 WCHAR szAppTitle
[512];
1003 WCHAR szAppTitleTemplate
[512];
1004 WCHAR szAuthorsText
[20];
1006 // Preload the ROS bitmap
1007 hLogoBmp
= (HBITMAP
)LoadImage(shell32_hInstance
, MAKEINTRESOURCE(IDB_SHELL_ABOUT_LOGO_24BPP
), IMAGE_BITMAP
, 0, 0, LR_DEFAULTCOLOR
);
1013 GetObject( hLogoBmp
, sizeof(BITMAP
), &bmpLogo
);
1015 cxLogoBmp
= bmpLogo
.bmWidth
;
1016 cyLogoBmp
= bmpLogo
.bmHeight
;
1019 // Set App-specific stuff (icon, app name, szOtherStuff string)
1020 SendDlgItemMessageW(hWnd
, IDC_SHELL_ABOUT_ICON
, STM_SETICON
, (WPARAM
)info
->hIcon
, 0);
1022 GetWindowTextW( hWnd
, szAppTitleTemplate
, sizeof(szAppTitleTemplate
) / sizeof(WCHAR
) );
1023 swprintf( szAppTitle
, szAppTitleTemplate
, info
->szApp
);
1024 SetWindowTextW( hWnd
, szAppTitle
);
1026 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_APPNAME
, info
->szApp
);
1027 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_OTHERSTUFF
, info
->szOtherStuff
);
1029 // Set the registered user and organization name
1030 if(RegOpenKeyExW( HKEY_LOCAL_MACHINE
, szRegKey
, 0, KEY_QUERY_VALUE
, &hRegKey
) == ERROR_SUCCESS
)
1032 SetRegTextData( hWnd
, hRegKey
, L
"RegisteredOwner", IDC_SHELL_ABOUT_REG_USERNAME
);
1033 SetRegTextData( hWnd
, hRegKey
, L
"RegisteredOrganization", IDC_SHELL_ABOUT_REG_ORGNAME
);
1035 RegCloseKey( hRegKey
);
1038 // Set the value for the installed physical memory
1039 MemStat
.dwLength
= sizeof(MemStat
);
1040 if( GlobalMemoryStatusEx(&MemStat
) )
1044 if (MemStat
.ullTotalPhys
> 1024 * 1024 * 1024)
1047 WCHAR szDecimalSeparator
[4];
1050 // We're dealing with GBs or more
1051 MemStat
.ullTotalPhys
/= 1024 * 1024;
1053 if (MemStat
.ullTotalPhys
> 1024 * 1024)
1055 // We're dealing with TBs or more
1056 MemStat
.ullTotalPhys
/= 1024;
1058 if (MemStat
.ullTotalPhys
> 1024 * 1024)
1060 // We're dealing with PBs or more
1061 MemStat
.ullTotalPhys
/= 1024;
1063 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1064 wcscpy( szUnits
, L
"PB" );
1068 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1069 wcscpy( szUnits
, L
"TB" );
1074 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1075 wcscpy( szUnits
, L
"GB" );
1078 // We need the decimal point of the current locale to display the RAM size correctly
1079 if( GetLocaleInfoW(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, szDecimalSeparator
, sizeof(szDecimalSeparator
) / sizeof(WCHAR
)) > 0)
1084 uIntegral
= (UINT
)dTotalPhys
;
1085 uDecimals
= (UCHAR
)((UINT
)(dTotalPhys
* 100) - uIntegral
* 100);
1087 // Display the RAM size with 2 decimals
1088 swprintf(szBuf
, L
"%u%s%02u %s", uIntegral
, szDecimalSeparator
, uDecimals
, szUnits
);
1093 // We're dealing with MBs, don't show any decimals
1094 swprintf( szBuf
, L
"%u MB", (UINT
)MemStat
.ullTotalPhys
/ 1024 / 1024 );
1097 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_PHYSMEM
, szBuf
);
1100 // Add the Authors dialog
1101 hWndAuthors
= CreateDialogW( shell32_hInstance
, MAKEINTRESOURCEW(IDD_SHELL_ABOUT_AUTHORS
), hWnd
, AboutAuthorsDlgProc
);
1102 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_AUTHORS
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1103 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_AUTHORS
, szAuthorsText
);
1117 hdc
= BeginPaint(hWnd
, &ps
);
1118 hdcMem
= CreateCompatibleDC(hdc
);
1122 SelectObject(hdcMem
, hLogoBmp
);
1123 BitBlt(hdc
, 0, 0, cxLogoBmp
, cyLogoBmp
, hdcMem
, 0, 0, SRCCOPY
);
1128 EndPaint(hWnd
, &ps
);
1139 EndDialog(hWnd
, TRUE
);
1142 case IDC_SHELL_ABOUT_AUTHORS
:
1144 static BOOL bShowingAuthors
= FALSE
;
1145 WCHAR szAuthorsText
[20];
1149 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_AUTHORS
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1150 ShowWindow( hWndAuthors
, SW_HIDE
);
1154 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_BACK
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1155 ShowWindow( hWndAuthors
, SW_SHOW
);
1158 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_AUTHORS
, szAuthorsText
);
1159 bShowingAuthors
= !bShowingAuthors
;
1166 EndDialog(hWnd
, TRUE
);
1174 /*************************************************************************
1175 * ShellAboutA [SHELL32.288]
1177 BOOL WINAPI
ShellAboutA( HWND hWnd
, LPCSTR szApp
, LPCSTR szOtherStuff
, HICON hIcon
)
1180 LPWSTR appW
= NULL
, otherW
= NULL
;
1185 len
= MultiByteToWideChar(CP_ACP
, 0, szApp
, -1, NULL
, 0);
1186 appW
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
1187 MultiByteToWideChar(CP_ACP
, 0, szApp
, -1, appW
, len
);
1191 len
= MultiByteToWideChar(CP_ACP
, 0, szOtherStuff
, -1, NULL
, 0);
1192 otherW
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
1193 MultiByteToWideChar(CP_ACP
, 0, szOtherStuff
, -1, otherW
, len
);
1196 ret
= ShellAboutW(hWnd
, appW
, otherW
, hIcon
);
1198 HeapFree(GetProcessHeap(), 0, otherW
);
1199 HeapFree(GetProcessHeap(), 0, appW
);
1204 /*************************************************************************
1205 * ShellAboutW [SHELL32.289]
1207 BOOL WINAPI
ShellAboutW( HWND hWnd
, LPCWSTR szApp
, LPCWSTR szOtherStuff
,
1212 DLGTEMPLATE
*DlgTemplate
;
1217 // DialogBoxIndirectParamW will be called with the hInstance of the calling application, so we have to preload the dialog template
1218 if(!(hRes
= FindResourceW(shell32_hInstance
, MAKEINTRESOURCEW(IDD_SHELL_ABOUT
), (LPWSTR
)RT_DIALOG
)))
1220 if(!(DlgTemplate
= (DLGTEMPLATE
*)LoadResource(shell32_hInstance
, hRes
)))
1224 info
.szOtherStuff
= szOtherStuff
;
1225 info
.hIcon
= hIcon
? hIcon
: LoadIconW( 0, (LPWSTR
)IDI_WINLOGO
);
1227 bRet
= DialogBoxIndirectParamW((HINSTANCE
)GetWindowLongPtrW( hWnd
, GWLP_HINSTANCE
),
1228 DlgTemplate
, hWnd
, AboutDlgProc
, (LPARAM
)&info
);
1232 /*************************************************************************
1233 * FreeIconList (SHELL32.@)
1235 EXTERN_C
void WINAPI
FreeIconList( DWORD dw
)
1237 FIXME("%x: stub\n",dw
);
1240 /*************************************************************************
1241 * SHLoadNonloadedIconOverlayIdentifiers (SHELL32.@)
1243 EXTERN_C HRESULT WINAPI
SHLoadNonloadedIconOverlayIdentifiers( VOID
)
1249 class CShell32Module
: public CComModule
1255 BEGIN_OBJECT_MAP(ObjectMap
)
1256 OBJECT_ENTRY(CLSID_ShellFSFolder
, CFSFolder
)
1257 OBJECT_ENTRY(CLSID_MyComputer
, CDrivesFolder
)
1258 OBJECT_ENTRY(CLSID_ShellDesktop
, CDesktopFolder
)
1259 OBJECT_ENTRY(CLSID_ShellItem
, ShellItem
)
1260 OBJECT_ENTRY(CLSID_ShellLink
, ShellLink
)
1261 OBJECT_ENTRY(CLSID_DragDropHelper
, IDropTargetHelperImpl
)
1262 OBJECT_ENTRY(CLSID_ControlPanel
, CControlPanelFolder
)
1263 OBJECT_ENTRY(CLSID_AutoComplete
, CAutoComplete
)
1264 OBJECT_ENTRY(CLSID_MyDocuments
, CMyDocsFolder
)
1265 OBJECT_ENTRY(CLSID_NetworkPlaces
, CNetFolder
)
1266 OBJECT_ENTRY(CLSID_FontsFolderShortcut
, CFontsFolder
)
1267 OBJECT_ENTRY(CLSID_Printers
, CPrinterFolder
)
1268 OBJECT_ENTRY(CLSID_AdminFolderShortcut
, CAdminToolsFolder
)
1269 OBJECT_ENTRY(CLSID_RecycleBin
, CBitBucket
)
1270 OBJECT_ENTRY(CLSID_OpenWithMenu
, COpenWithMenu
)
1271 OBJECT_ENTRY(CLSID_NewMenu
, CNewMenu
)
1272 OBJECT_ENTRY(CLSID_StartMenu
, CStartMenuCallback
)
1273 OBJECT_ENTRY(CLSID_MenuBandSite
, CMenuBandSite
)
1276 CShell32Module gModule
;
1280 static const struct {
1282 LPFNCREATEINSTANCE lpfnCI;
1283 } InterfaceTable[] = {
1284 {CLSID_ShellFSFolder, &IFSFolder_Constructor},
1285 {CLSID_MyComputer, &ISF_MyComputer_Constructor},
1286 {CLSID_ShellDesktop, &ISF_Desktop_Constructor},
1287 {CLSID_ShellItem, &IShellItem_Constructor},
1288 {CLSID_ShellLink, &IShellLink_Constructor},
1289 {CLSID_DragDropHelper, &IDropTargetHelper_Constructor},
1290 {CLSID_ControlPanel, &IControlPanel_Constructor},
1291 {CLSID_AutoComplete, &IAutoComplete_Constructor},
1292 {CLSID_MyDocuments, &ISF_MyDocuments_Constructor},
1293 {CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor},
1294 {CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor},
1295 {CLSID_Printers, &ISF_Printers_Constructor},
1296 {CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor},
1297 {CLSID_RecycleBin, &RecycleBin_Constructor},
1298 {CLSID_OpenWithMenu, &SHEOW_Constructor},
1299 {CLSID_NewMenu, &INewItem_Constructor},
1300 {CLSID_StartMenu, &StartMenu_Constructor},
1301 {CLSID_MenuBandSite, &MenuBandSite_Constructor},
1305 /***********************************************************************
1306 * DllGetVersion [SHELL32.@]
1308 * Retrieves version information of the 'SHELL32.DLL'
1311 * pdvi [O] pointer to version information structure.
1315 * Failure: E_INVALIDARG
1318 * Returns version of a shell32.dll from IE4.01 SP1.
1321 STDAPI
DllGetVersion(DLLVERSIONINFO
*pdvi
)
1323 /* FIXME: shouldn't these values come from the version resource? */
1324 if (pdvi
->cbSize
== sizeof(DLLVERSIONINFO
) ||
1325 pdvi
->cbSize
== sizeof(DLLVERSIONINFO2
))
1327 pdvi
->dwMajorVersion
= WINE_FILEVERSION_MAJOR
;
1328 pdvi
->dwMinorVersion
= WINE_FILEVERSION_MINOR
;
1329 pdvi
->dwBuildNumber
= WINE_FILEVERSION_BUILD
;
1330 pdvi
->dwPlatformID
= WINE_FILEVERSION_PLATFORMID
;
1331 if (pdvi
->cbSize
== sizeof(DLLVERSIONINFO2
))
1333 DLLVERSIONINFO2
*pdvi2
= (DLLVERSIONINFO2
*)pdvi
;
1336 pdvi2
->ullVersion
= MAKEDLLVERULL(WINE_FILEVERSION_MAJOR
,
1337 WINE_FILEVERSION_MINOR
,
1338 WINE_FILEVERSION_BUILD
,
1339 WINE_FILEVERSION_PLATFORMID
);
1341 TRACE("%u.%u.%u.%u\n",
1342 pdvi
->dwMajorVersion
, pdvi
->dwMinorVersion
,
1343 pdvi
->dwBuildNumber
, pdvi
->dwPlatformID
);
1348 WARN("wrong DLLVERSIONINFO size from app\n");
1349 return E_INVALIDARG
;
1353 /*************************************************************************
1354 * global variables of the shell32.dll
1355 * all are once per process
1358 HINSTANCE shell32_hInstance
;
1359 HIMAGELIST ShellSmallIconList
= 0;
1360 HIMAGELIST ShellBigIconList
= 0;
1362 void *operator new (size_t, void *buf
)
1367 /*************************************************************************
1371 * calling oleinitialize here breaks sone apps.
1373 STDAPI_(BOOL
) DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID fImpLoad
)
1375 TRACE("%p 0x%x %p\n", hInstance
, dwReason
, fImpLoad
);
1376 if (dwReason
== DLL_PROCESS_ATTACH
)
1378 /* HACK - the global constructors don't run, so I placement new them here */
1379 new (&gModule
) CShell32Module
;
1380 new (&_AtlWinModule
) CAtlWinModule
;
1381 new (&_AtlBaseModule
) CAtlBaseModule
;
1382 new (&_AtlComModule
) CAtlComModule
;
1384 shell32_hInstance
= hInstance
;
1385 gModule
.Init(ObjectMap
, hInstance
, NULL
);
1387 DisableThreadLibraryCalls (hInstance
);
1389 /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
1390 GetModuleFileNameW(hInstance
, swShell32Name
, MAX_PATH
);
1391 swShell32Name
[MAX_PATH
- 1] = '\0';
1393 InitCommonControlsEx(NULL
);
1396 InitChangeNotifications();
1399 else if (dwReason
== DLL_PROCESS_DETACH
)
1401 shell32_hInstance
= NULL
;
1403 FreeChangeNotifications();
1409 /***********************************************************************
1410 * DllCanUnloadNow (SHELL32.@)
1412 STDAPI
DllCanUnloadNow()
1414 return gModule
.DllCanUnloadNow();
1417 /*************************************************************************
1418 * DllGetClassObject [SHELL32.@]
1419 * SHDllGetClassObject [SHELL32.128]
1421 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
1425 TRACE("CLSID:%s,IID:%s\n", shdebugstr_guid(&rclsid
), shdebugstr_guid(&riid
));
1427 hResult
= gModule
.DllGetClassObject(rclsid
, riid
, ppv
);
1428 TRACE("-- pointer to class factory: %p\n", *ppv
);
1432 /***********************************************************************
1433 * DllRegisterServer (BROWSEUI.@)
1435 STDAPI
DllRegisterServer()
1437 return gModule
.DllRegisterServer(FALSE
);
1440 /***********************************************************************
1441 * DllUnregisterServer (BROWSEUI.@)
1443 STDAPI
DllUnregisterServer()
1445 return gModule
.DllUnregisterServer(FALSE
);
1448 /*************************************************************************
1449 * DllInstall [SHELL32.@]
1453 * BOOL bInstall - TRUE for install, FALSE for uninstall
1454 * LPCWSTR pszCmdLine - command line (unused by shell32?)
1457 HRESULT WINAPI
DllInstall(BOOL bInstall
, LPCWSTR cmdline
)
1459 FIXME("%s %s: stub\n", bInstall
? "TRUE":"FALSE", debugstr_w(cmdline
));
1460 return S_OK
; /* indicate success */