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
23 #include "shfldr_fs.h"
24 #include "shfldr_mycomp.h"
25 #include "shfldr_desktop.h"
26 #include "shellitem.h"
27 #include "shelllink.h"
28 #include "dragdrophelper.h"
29 #include "shfldr_cpanel.h"
30 #include "autocomplete.h"
31 #include "shfldr_mydocuments.h"
32 #include "shfldr_netplaces.h"
33 #include "shfldr_fonts.h"
34 #include "shfldr_printers.h"
35 #include "shfldr_admintools.h"
36 #include "shfldr_recyclebin.h"
37 #include "she_ocmenu.h"
38 #include "shv_item_new.h"
39 #include "startmenu.h"
41 WINE_DEFAULT_DEBUG_CHANNEL(shell
);
43 const char * const SHELL_Authors
[] = { "Copyright 1993-2009 WINE team", "Copyright 1998-2009 ReactOS Team", 0 };
46 /*************************************************************************
47 * CommandLineToArgvW [SHELL32.@]
49 * We must interpret the quotes in the command line to rebuild the argv
51 * - arguments are separated by spaces or tabs
52 * - quotes serve as optional argument delimiters
54 * - escaped quotes must be converted back to '"'
56 * - an odd number of '\'s followed by '"' correspond to half that number
57 * of '\' followed by a '"' (extension of the above)
60 * - an even number of '\'s followed by a '"' correspond to half that number
61 * of '\', plus a regular quote serving as an argument delimiter (which
62 * means it does not appear in the result)
63 * 'a\\"b c"' -> 'a\b c'
64 * 'a\\\\"b c"' -> 'a\\b c'
65 * - '\' that are not followed by a '"' are copied literally
75 LPWSTR
* WINAPI
CommandLineToArgvW(LPCWSTR lpCmdline
, int* numargs
)
86 /* Return the path to the executable */
89 argv
= (LPWSTR
*)LocalAlloc(LMEM_FIXED
, size
);
92 len
= GetModuleFileNameW(0, (LPWSTR
)(argv
+1), (size
-sizeof(LPWSTR
))/sizeof(WCHAR
));
98 if (len
< size
) break;
100 argv
= (LPWSTR
*)LocalReAlloc(argv
, size
, 0);
102 argv
[0]=(LPWSTR
)(argv
+1);
109 /* to get a writable copy */
116 if (*cs
==0 || ((*cs
==0x0009 || *cs
==0x0020) && !in_quotes
))
120 /* skip the remaining spaces */
121 while (*cs
==0x0009 || *cs
==0x0020) {
129 else if (*cs
==0x005c)
131 /* '\', count them */
134 else if ((*cs
==0x0022) && ((bcount
& 1)==0))
137 in_quotes
=!in_quotes
;
142 /* a regular character */
147 /* Allocate in a single lump, the string array, and the strings that go with it.
148 * This way the caller can make a single GlobalFree call to free both, as per MSDN.
150 argv
= (LPWSTR
*)LocalAlloc(LMEM_FIXED
, argc
*sizeof(LPWSTR
)+(wcslen(lpCmdline
)+1)*sizeof(WCHAR
));
153 cmdline
=(LPWSTR
)(argv
+argc
);
154 wcscpy(cmdline
, lpCmdline
);
162 if ((*s
==0x0009 || *s
==0x0020) && !in_quotes
)
164 /* Close the argument and copy it */
168 /* skip the remaining spaces */
171 } while (*s
==0x0009 || *s
==0x0020);
173 /* Start with a new argument */
188 /* Preceded by an even number of '\', this is half that
189 * number of '\', plus a quote which we erase.
192 in_quotes
=!in_quotes
;
197 /* Preceded by an odd number of '\', this is half that
198 * number of '\' followed by a '"'
208 /* a regular character */
224 static DWORD
shgfi_get_exe_type(LPCWSTR szFullPath
)
229 IMAGE_DOS_HEADER mz_header
;
234 status
= GetBinaryTypeW (szFullPath
, &BinaryType
);
237 if (BinaryType
== SCS_DOS_BINARY
|| BinaryType
== SCS_PIF_BINARY
)
240 hfile
= CreateFileW( szFullPath
, GENERIC_READ
, FILE_SHARE_READ
,
241 NULL
, OPEN_EXISTING
, 0, 0 );
242 if ( hfile
== INVALID_HANDLE_VALUE
)
246 * The next section is adapted from MODULE_GetBinaryType, as we need
247 * to examine the image header to get OS and version information. We
248 * know from calling GetBinaryTypeA that the image is valid and either
249 * an NE or PE, so much error handling can be omitted.
250 * Seek to the start of the file and read the header information.
253 SetFilePointer( hfile
, 0, NULL
, SEEK_SET
);
254 ReadFile( hfile
, &mz_header
, sizeof(mz_header
), &len
, NULL
);
256 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
257 ReadFile( hfile
, magic
, sizeof(magic
), &len
, NULL
);
258 if ( *(DWORD
*)magic
== IMAGE_NT_SIGNATURE
)
260 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
261 ReadFile( hfile
, &nt
, sizeof(nt
), &len
, NULL
);
262 CloseHandle( hfile
);
263 /* DLL files are not executable and should return 0 */
264 if (nt
.FileHeader
.Characteristics
& IMAGE_FILE_DLL
)
266 if (nt
.OptionalHeader
.Subsystem
== IMAGE_SUBSYSTEM_WINDOWS_GUI
)
268 return IMAGE_NT_SIGNATURE
|
269 (nt
.OptionalHeader
.MajorSubsystemVersion
<< 24) |
270 (nt
.OptionalHeader
.MinorSubsystemVersion
<< 16);
272 return IMAGE_NT_SIGNATURE
;
274 else if ( *(WORD
*)magic
== IMAGE_OS2_SIGNATURE
)
277 SetFilePointer( hfile
, mz_header
.e_lfanew
, NULL
, SEEK_SET
);
278 ReadFile( hfile
, &ne
, sizeof(ne
), &len
, NULL
);
279 CloseHandle( hfile
);
280 if (ne
.ne_exetyp
== 2)
281 return IMAGE_OS2_SIGNATURE
| (ne
.ne_expver
<< 16);
284 CloseHandle( hfile
);
288 /*************************************************************************
289 * SHELL_IsShortcut [internal]
291 * Decide if an item id list points to a shell shortcut
293 BOOL
SHELL_IsShortcut(LPCITEMIDLIST pidlLast
)
295 char szTemp
[MAX_PATH
];
299 if (_ILGetExtension(pidlLast
, szTemp
, MAX_PATH
) &&
300 HCR_MapTypeToValueA(szTemp
, szTemp
, MAX_PATH
, TRUE
))
302 if (ERROR_SUCCESS
== RegOpenKeyExA(HKEY_CLASSES_ROOT
, szTemp
, 0, KEY_QUERY_VALUE
, &keyCls
))
304 if (ERROR_SUCCESS
== RegQueryValueExA(keyCls
, "IsShortcut", NULL
, NULL
, NULL
, NULL
))
314 #define SHGFI_KNOWN_FLAGS \
315 (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
316 SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
317 SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
318 SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
319 SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
321 /*************************************************************************
322 * SHGetFileInfoW [SHELL32.@]
325 DWORD_PTR WINAPI
SHGetFileInfoW(LPCWSTR path
,DWORD dwFileAttributes
,
326 SHFILEINFOW
*psfi
, UINT sizeofpsfi
, UINT flags
)
328 WCHAR szLocation
[MAX_PATH
], szFullPath
[MAX_PATH
];
330 DWORD_PTR ret
= TRUE
;
331 DWORD dwAttributes
= 0;
332 CComPtr
<IShellFolder
> psfParent
;
333 CComPtr
<IExtractIconW
> pei
;
334 LPITEMIDLIST pidlLast
= NULL
, pidl
= NULL
;
336 BOOL IconNotYetLoaded
=TRUE
;
339 TRACE("%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
340 (flags
& SHGFI_PIDL
)? "pidl" : debugstr_w(path
), dwFileAttributes
,
341 psfi
, psfi
->dwAttributes
, sizeofpsfi
, flags
);
343 if ( (flags
& SHGFI_USEFILEATTRIBUTES
) &&
344 (flags
& (SHGFI_ATTRIBUTES
|SHGFI_EXETYPE
|SHGFI_PIDL
)))
349 /* windows initializes these values regardless of the flags */
352 psfi
->szDisplayName
[0] = '\0';
353 psfi
->szTypeName
[0] = '\0';
357 if (!(flags
& SHGFI_PIDL
))
359 /* SHGetFileInfo should work with absolute and relative paths */
360 if (PathIsRelativeW(path
))
362 GetCurrentDirectoryW(MAX_PATH
, szLocation
);
363 PathCombineW(szFullPath
, szLocation
, path
);
367 lstrcpynW(szFullPath
, path
, MAX_PATH
);
371 if (flags
& SHGFI_EXETYPE
)
373 if (flags
!= SHGFI_EXETYPE
)
375 return shgfi_get_exe_type(szFullPath
);
379 * psfi is NULL normally to query EXE type. If it is NULL, none of the
380 * below makes sense anyway. Windows allows this and just returns FALSE
386 * translate the path into a pidl only when SHGFI_USEFILEATTRIBUTES
388 * The pidl functions fail on not existing file names
391 if (flags
& SHGFI_PIDL
)
393 pidl
= ILClone((LPCITEMIDLIST
)path
);
395 else if (!(flags
& SHGFI_USEFILEATTRIBUTES
))
397 hr
= SHILCreateFromPathW(szFullPath
, &pidl
, &dwAttributes
);
400 if ((flags
& SHGFI_PIDL
) || !(flags
& SHGFI_USEFILEATTRIBUTES
))
402 /* get the parent shellfolder */
405 hr
= SHBindToParent( pidl
, IID_IShellFolder
, (LPVOID
*)&psfParent
,
406 (LPCITEMIDLIST
*)&pidlLast
);
408 pidlLast
= ILClone(pidlLast
);
413 ERR("pidl is null!\n");
418 /* get the attributes of the child */
419 if (SUCCEEDED(hr
) && (flags
& SHGFI_ATTRIBUTES
))
421 if (!(flags
& SHGFI_ATTR_SPECIFIED
))
423 psfi
->dwAttributes
= 0xffffffff;
425 if (psfParent
!= NULL
)
426 psfParent
->GetAttributesOf(1, (LPCITEMIDLIST
*)&pidlLast
,
427 &(psfi
->dwAttributes
) );
430 /* get the displayname */
431 if (SUCCEEDED(hr
) && (flags
& SHGFI_DISPLAYNAME
))
433 if (flags
& SHGFI_USEFILEATTRIBUTES
)
435 wcscpy (psfi
->szDisplayName
, PathFindFileNameW(szFullPath
));
440 hr
= psfParent
->GetDisplayNameOf(pidlLast
,
441 SHGDN_INFOLDER
, &str
);
442 StrRetToStrNW (psfi
->szDisplayName
, MAX_PATH
, &str
, pidlLast
);
446 /* get the type name */
447 if (SUCCEEDED(hr
) && (flags
& SHGFI_TYPENAME
))
449 static const WCHAR szFile
[] = { 'F','i','l','e',0 };
450 static const WCHAR szDashFile
[] = { '-','f','i','l','e',0 };
452 if (!(flags
& SHGFI_USEFILEATTRIBUTES
))
456 _ILGetFileType(pidlLast
, ftype
, 80);
457 MultiByteToWideChar(CP_ACP
, 0, ftype
, -1, psfi
->szTypeName
, 80 );
461 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
462 wcscat (psfi
->szTypeName
, szFile
);
467 wcscpy(sTemp
,PathFindExtensionW(szFullPath
));
468 if (!( HCR_MapTypeToValueW(sTemp
, sTemp
, 64, TRUE
) &&
469 HCR_MapTypeToValueW(sTemp
, psfi
->szTypeName
, 80, FALSE
)))
471 lstrcpynW (psfi
->szTypeName
, sTemp
, 64);
472 wcscat (psfi
->szTypeName
, szDashFile
);
479 if (flags
& SHGFI_OPENICON
)
480 uGilFlags
|= GIL_OPENICON
;
482 if (flags
& SHGFI_LINKOVERLAY
)
483 uGilFlags
|= GIL_FORSHORTCUT
;
484 else if ((flags
&SHGFI_ADDOVERLAYS
) ||
485 (flags
&(SHGFI_ICON
|SHGFI_SMALLICON
))==SHGFI_ICON
)
487 if (SHELL_IsShortcut(pidlLast
))
488 uGilFlags
|= GIL_FORSHORTCUT
;
491 if (flags
& SHGFI_OVERLAYINDEX
)
492 FIXME("SHGFI_OVERLAYINDEX unhandled\n");
494 if (flags
& SHGFI_SELECTED
)
495 FIXME("set icon to selected, stub\n");
497 if (flags
& SHGFI_SHELLICONSIZE
)
498 FIXME("set icon to shell size, stub\n");
500 /* get the iconlocation */
501 if (SUCCEEDED(hr
) && (flags
& SHGFI_ICONLOCATION
))
505 if (flags
& SHGFI_USEFILEATTRIBUTES
)
507 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
509 wcscpy(psfi
->szDisplayName
, swShell32Name
);
510 psfi
->iIcon
= -IDI_SHELL_FOLDER
;
515 static const WCHAR p1W
[] = {'%','1',0};
516 WCHAR sTemp
[MAX_PATH
];
518 szExt
= PathFindExtensionW(szFullPath
);
519 TRACE("szExt=%s\n", debugstr_w(szExt
));
521 HCR_MapTypeToValueW(szExt
, sTemp
, MAX_PATH
, TRUE
) &&
522 HCR_GetDefaultIconW(sTemp
, sTemp
, MAX_PATH
, &psfi
->iIcon
))
524 if (lstrcmpW(p1W
, sTemp
))
525 wcscpy(psfi
->szDisplayName
, sTemp
);
528 /* the icon is in the file */
529 wcscpy(psfi
->szDisplayName
, szFullPath
);
538 hr
= psfParent
->GetUIObjectOf(0, 1,
539 (LPCITEMIDLIST
*)&pidlLast
, IID_IExtractIconW
,
540 &uDummy
, (LPVOID
*)&pei
);
543 hr
= pei
->GetIconLocation(uGilFlags
,
544 szLocation
, MAX_PATH
, &iIndex
, &uFlags
);
546 if (uFlags
& GIL_NOTFILENAME
)
550 wcscpy (psfi
->szDisplayName
, szLocation
);
551 psfi
->iIcon
= iIndex
;
557 /* get icon index (or load icon)*/
558 if (SUCCEEDED(hr
) && (flags
& (SHGFI_ICON
| SHGFI_SYSICONINDEX
)))
560 if (flags
& SHGFI_USEFILEATTRIBUTES
&& !(flags
& SHGFI_PIDL
))
562 WCHAR sTemp
[MAX_PATH
];
566 lstrcpynW(sTemp
, szFullPath
, MAX_PATH
);
568 if (dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY
)
569 psfi
->iIcon
= SIC_GetIconIndex(swShell32Name
, -IDI_SHELL_FOLDER
, 0);
572 static const WCHAR p1W
[] = {'%','1',0};
575 szExt
= PathFindExtensionW(sTemp
);
577 HCR_MapTypeToValueW(szExt
, sTemp
, MAX_PATH
, TRUE
) &&
578 HCR_GetDefaultIconW(sTemp
, sTemp
, MAX_PATH
, &icon_idx
))
580 if (!lstrcmpW(p1W
,sTemp
)) /* icon is in the file */
581 wcscpy(sTemp
, szFullPath
);
583 if (flags
& SHGFI_SYSICONINDEX
)
585 psfi
->iIcon
= SIC_GetIconIndex(sTemp
,icon_idx
,0);
586 if (psfi
->iIcon
== -1)
592 if (flags
& SHGFI_SMALLICON
)
593 ret
= PrivateExtractIconsW( sTemp
,icon_idx
,
594 GetSystemMetrics( SM_CXSMICON
),
595 GetSystemMetrics( SM_CYSMICON
),
596 &psfi
->hIcon
, 0, 1, 0);
598 ret
= PrivateExtractIconsW( sTemp
, icon_idx
,
599 GetSystemMetrics( SM_CXICON
),
600 GetSystemMetrics( SM_CYICON
),
601 &psfi
->hIcon
, 0, 1, 0);
602 if (ret
!= 0 && ret
!= 0xFFFFFFFF)
604 IconNotYetLoaded
=FALSE
;
605 psfi
->iIcon
= icon_idx
;
613 if (!(PidlToSicIndex(psfParent
, pidlLast
, !(flags
& SHGFI_SMALLICON
),
614 uGilFlags
, &(psfi
->iIcon
))))
619 if (ret
&& (flags
& SHGFI_SYSICONINDEX
))
621 if (flags
& SHGFI_SMALLICON
)
622 ret
= (DWORD_PTR
) ShellSmallIconList
;
624 ret
= (DWORD_PTR
) ShellBigIconList
;
629 if (SUCCEEDED(hr
) && (flags
& SHGFI_ICON
) && IconNotYetLoaded
)
631 if (flags
& SHGFI_SMALLICON
)
632 psfi
->hIcon
= ImageList_GetIcon( ShellSmallIconList
, psfi
->iIcon
, ILD_NORMAL
);
634 psfi
->hIcon
= ImageList_GetIcon( ShellBigIconList
, psfi
->iIcon
, ILD_NORMAL
);
637 if (flags
& ~SHGFI_KNOWN_FLAGS
)
638 FIXME("unknown flags %08x\n", flags
& ~SHGFI_KNOWN_FLAGS
);
646 TRACE ("icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
647 psfi
->hIcon
, psfi
->iIcon
, psfi
->dwAttributes
,
648 debugstr_w(psfi
->szDisplayName
), debugstr_w(psfi
->szTypeName
), ret
);
654 /*************************************************************************
655 * SHGetFileInfoA [SHELL32.@]
658 * MSVBVM60.__vbaNew2 expects this function to return a value in range
659 * 1 .. 0x7fff when the function succeeds and flags does not contain
660 * SHGFI_EXETYPE or SHGFI_SYSICONINDEX (see bug 7701)
662 DWORD_PTR WINAPI
SHGetFileInfoA(LPCSTR path
,DWORD dwFileAttributes
,
663 SHFILEINFOA
*psfi
, UINT sizeofpsfi
,
667 LPWSTR temppath
= NULL
;
670 SHFILEINFOW temppsfi
;
672 if (flags
& SHGFI_PIDL
)
674 /* path contains a pidl */
675 pathW
= (LPCWSTR
)path
;
679 len
= MultiByteToWideChar(CP_ACP
, 0, path
, -1, NULL
, 0);
680 temppath
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
*sizeof(WCHAR
));
681 MultiByteToWideChar(CP_ACP
, 0, path
, -1, temppath
, len
);
685 if (psfi
&& (flags
& SHGFI_ATTR_SPECIFIED
))
686 temppsfi
.dwAttributes
=psfi
->dwAttributes
;
689 ret
= SHGetFileInfoW(pathW
, dwFileAttributes
, NULL
, sizeof(temppsfi
), flags
);
691 ret
= SHGetFileInfoW(pathW
, dwFileAttributes
, &temppsfi
, sizeof(temppsfi
), flags
);
695 if(flags
& SHGFI_ICON
)
696 psfi
->hIcon
=temppsfi
.hIcon
;
697 if(flags
& (SHGFI_SYSICONINDEX
|SHGFI_ICON
|SHGFI_ICONLOCATION
))
698 psfi
->iIcon
=temppsfi
.iIcon
;
699 if(flags
& SHGFI_ATTRIBUTES
)
700 psfi
->dwAttributes
=temppsfi
.dwAttributes
;
701 if(flags
& (SHGFI_DISPLAYNAME
|SHGFI_ICONLOCATION
))
703 WideCharToMultiByte(CP_ACP
, 0, temppsfi
.szDisplayName
, -1,
704 psfi
->szDisplayName
, sizeof(psfi
->szDisplayName
), NULL
, NULL
);
706 if(flags
& SHGFI_TYPENAME
)
708 WideCharToMultiByte(CP_ACP
, 0, temppsfi
.szTypeName
, -1,
709 psfi
->szTypeName
, sizeof(psfi
->szTypeName
), NULL
, NULL
);
713 HeapFree(GetProcessHeap(), 0, temppath
);
718 /*************************************************************************
719 * DuplicateIcon [SHELL32.@]
721 EXTERN_C HICON WINAPI
DuplicateIcon( HINSTANCE hInstance
, HICON hIcon
)
726 TRACE("%p %p\n", hInstance
, hIcon
);
728 if (GetIconInfo(hIcon
, &IconInfo
))
730 hDupIcon
= CreateIconIndirect(&IconInfo
);
732 /* clean up hbmMask and hbmColor */
733 DeleteObject(IconInfo
.hbmMask
);
734 DeleteObject(IconInfo
.hbmColor
);
740 /*************************************************************************
741 * ExtractIconA [SHELL32.@]
743 HICON WINAPI
ExtractIconA(HINSTANCE hInstance
, LPCSTR lpszFile
, UINT nIconIndex
)
746 INT len
= MultiByteToWideChar(CP_ACP
, 0, lpszFile
, -1, NULL
, 0);
747 LPWSTR lpwstrFile
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
749 TRACE("%p %s %d\n", hInstance
, lpszFile
, nIconIndex
);
751 MultiByteToWideChar(CP_ACP
, 0, lpszFile
, -1, lpwstrFile
, len
);
752 ret
= ExtractIconW(hInstance
, lpwstrFile
, nIconIndex
);
753 HeapFree(GetProcessHeap(), 0, lpwstrFile
);
758 /*************************************************************************
759 * ExtractIconW [SHELL32.@]
761 HICON WINAPI
ExtractIconW(HINSTANCE hInstance
, LPCWSTR lpszFile
, UINT nIconIndex
)
765 UINT cx
= GetSystemMetrics(SM_CXICON
), cy
= GetSystemMetrics(SM_CYICON
);
767 TRACE("%p %s %d\n", hInstance
, debugstr_w(lpszFile
), nIconIndex
);
769 if (nIconIndex
== 0xFFFFFFFF)
771 ret
= PrivateExtractIconsW(lpszFile
, 0, cx
, cy
, NULL
, NULL
, 0, LR_DEFAULTCOLOR
);
772 if (ret
!= 0xFFFFFFFF && ret
)
773 return (HICON
)(UINT_PTR
)ret
;
777 ret
= PrivateExtractIconsW(lpszFile
, nIconIndex
, cx
, cy
, &hIcon
, NULL
, 1, LR_DEFAULTCOLOR
);
779 if (ret
== 0xFFFFFFFF)
781 else if (ret
> 0 && hIcon
)
787 /*************************************************************************
788 * Printer_LoadIconsW [SHELL32.205]
790 EXTERN_C VOID WINAPI
Printer_LoadIconsW(LPCWSTR wsPrinterName
, HICON
* pLargeIcon
, HICON
* pSmallIcon
)
792 INT iconindex
=IDI_SHELL_PRINTERS_FOLDER
;
794 TRACE("(%s, %p, %p)\n", debugstr_w(wsPrinterName
), pLargeIcon
, pSmallIcon
);
796 /* We should check if wsPrinterName is
797 1. the Default Printer or not
799 3. a Local Printer or a Network-Printer
800 and use different Icons
802 if((wsPrinterName
!= NULL
) && (wsPrinterName
[0] != 0))
804 FIXME("(select Icon by PrinterName %s not implemented)\n", debugstr_w(wsPrinterName
));
807 if(pLargeIcon
!= NULL
)
808 *pLargeIcon
= (HICON
)LoadImageW(shell32_hInstance
,
809 (LPCWSTR
) MAKEINTRESOURCE(iconindex
), IMAGE_ICON
,
810 0, 0, LR_DEFAULTCOLOR
|LR_DEFAULTSIZE
);
812 if(pSmallIcon
!= NULL
)
813 *pSmallIcon
= (HICON
)LoadImageW(shell32_hInstance
,
814 (LPCWSTR
) MAKEINTRESOURCE(iconindex
), IMAGE_ICON
,
815 16, 16, LR_DEFAULTCOLOR
);
818 /*************************************************************************
819 * Printers_RegisterWindowW [SHELL32.213]
820 * used by "printui.dll":
821 * find the Window of the given Type for the specific Printer and
822 * return the already existent hwnd or open a new window
824 EXTERN_C BOOL WINAPI
Printers_RegisterWindowW(LPCWSTR wsPrinter
, DWORD dwType
,
825 HANDLE
* phClassPidl
, HWND
* phwnd
)
827 FIXME("(%s, %x, %p (%p), %p (%p)) stub!\n", debugstr_w(wsPrinter
), dwType
,
828 phClassPidl
, (phClassPidl
!= NULL
) ? *(phClassPidl
) : NULL
,
829 phwnd
, (phwnd
!= NULL
) ? *(phwnd
) : NULL
);
834 /*************************************************************************
835 * Printers_UnregisterWindow [SHELL32.214]
837 EXTERN_C VOID WINAPI
Printers_UnregisterWindow(HANDLE hClassPidl
, HWND hwnd
)
839 FIXME("(%p, %p) stub!\n", hClassPidl
, hwnd
);
842 /*************************************************************************/
847 LPCWSTR szOtherStuff
;
851 #define DROP_FIELD_TOP (-15)
852 #define DROP_FIELD_HEIGHT 15
854 /*************************************************************************
855 * SHAppBarMessage [SHELL32.@]
857 UINT_PTR WINAPI
SHAppBarMessage(DWORD msg
, PAPPBARDATA data
)
859 int width
=data
->rc
.right
- data
->rc
.left
;
860 int height
=data
->rc
.bottom
- data
->rc
.top
;
863 TRACE("msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n",
864 msg
, data
->cbSize
, data
->hWnd
, data
->uCallbackMessage
, data
->uEdge
,
865 wine_dbgstr_rect(&data
->rc
), data
->lParam
);
870 return ABS_ALWAYSONTOP
| ABS_AUTOHIDE
;
871 case ABM_GETTASKBARPOS
:
872 GetWindowRect(data
->hWnd
, &rec
);
876 SetActiveWindow(data
->hWnd
);
878 case ABM_GETAUTOHIDEBAR
:
879 return 0; /* pretend there is no autohide bar */
881 /* cbSize, hWnd, and uCallbackMessage are used. All other ignored */
882 SetWindowPos(data
->hWnd
,HWND_TOP
,0,0,0,0,SWP_SHOWWINDOW
|SWP_NOMOVE
|SWP_NOSIZE
);
885 GetWindowRect(data
->hWnd
, &(data
->rc
));
888 FIXME("ABM_REMOVE broken\n");
889 /* FIXME: this is wrong; should it be DestroyWindow instead? */
890 /*CloseHandle(data->hWnd);*/
892 case ABM_SETAUTOHIDEBAR
:
893 SetWindowPos(data
->hWnd
,HWND_TOP
,rec
.left
+1000,rec
.top
,
894 width
,height
,SWP_SHOWWINDOW
);
897 data
->uEdge
=(ABE_RIGHT
| ABE_LEFT
);
898 SetWindowPos(data
->hWnd
,HWND_TOP
,data
->rc
.left
,data
->rc
.top
,
899 width
,height
,SWP_SHOWWINDOW
);
901 case ABM_WINDOWPOSCHANGED
:
907 /*************************************************************************
908 * SHHelpShortcuts_RunDLLA [SHELL32.@]
911 EXTERN_C DWORD WINAPI
SHHelpShortcuts_RunDLLA(DWORD dwArg1
, DWORD dwArg2
, DWORD dwArg3
, DWORD dwArg4
)
913 FIXME("(%x, %x, %x, %x) stub!\n", dwArg1
, dwArg2
, dwArg3
, dwArg4
);
917 /*************************************************************************
918 * SHHelpShortcuts_RunDLLA [SHELL32.@]
921 EXTERN_C DWORD WINAPI
SHHelpShortcuts_RunDLLW(DWORD dwArg1
, DWORD dwArg2
, DWORD dwArg3
, DWORD dwArg4
)
923 FIXME("(%x, %x, %x, %x) stub!\n", dwArg1
, dwArg2
, dwArg3
, dwArg4
);
927 /*************************************************************************
928 * SHLoadInProc [SHELL32.@]
929 * Create an instance of specified object class from within
930 * the shell process and release it immediately
932 EXTERN_C HRESULT WINAPI
SHLoadInProc (REFCLSID rclsid
)
934 CComPtr
<IUnknown
> ptr
;
936 TRACE("%s\n", debugstr_guid(&rclsid
));
938 CoCreateInstance(rclsid
, NULL
, CLSCTX_INPROC_SERVER
, IID_IUnknown
, (void **)&ptr
);
941 return DISP_E_MEMBERNOTFOUND
;
944 static VOID
SetRegTextData(HWND hWnd
, HKEY hKey
, LPCWSTR Value
, UINT uID
)
950 if( RegQueryValueExW(hKey
, Value
, NULL
, &dwType
, NULL
, &dwBufferSize
) == ERROR_SUCCESS
)
954 lpBuffer
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, dwBufferSize
);
958 if( RegQueryValueExW(hKey
, Value
, NULL
, &dwType
, (LPBYTE
)lpBuffer
, &dwBufferSize
) == ERROR_SUCCESS
)
960 SetDlgItemTextW(hWnd
, uID
, lpBuffer
);
963 HeapFree(GetProcessHeap(), 0, lpBuffer
);
969 INT_PTR CALLBACK
AboutAuthorsDlgProc( HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
975 const char* const *pstr
= SHELL_Authors
;
977 // Add the authors to the list
978 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, WM_SETREDRAW
, FALSE
, 0 );
984 /* authors list is in utf-8 format */
985 MultiByteToWideChar( CP_UTF8
, 0, *pstr
, -1, name
, sizeof(name
)/sizeof(WCHAR
) );
986 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, LB_ADDSTRING
, (WPARAM
)-1, (LPARAM
)name
);
990 SendDlgItemMessageW( hWnd
, IDC_SHELL_ABOUT_AUTHORS_LISTBOX
, WM_SETREDRAW
, TRUE
, 0 );
998 /*************************************************************************
999 * AboutDlgProc (internal)
1001 INT_PTR CALLBACK
AboutDlgProc( HWND hWnd
, UINT msg
, WPARAM wParam
, LPARAM lParam
)
1003 static DWORD cxLogoBmp
;
1004 static DWORD cyLogoBmp
;
1005 static HBITMAP hLogoBmp
;
1006 static HWND hWndAuthors
;
1012 ABOUT_INFO
*info
= (ABOUT_INFO
*)lParam
;
1016 const WCHAR szRegKey
[] = L
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion";
1018 MEMORYSTATUSEX MemStat
;
1019 WCHAR szAppTitle
[512];
1020 WCHAR szAppTitleTemplate
[512];
1021 WCHAR szAuthorsText
[20];
1023 // Preload the ROS bitmap
1024 hLogoBmp
= (HBITMAP
)LoadImage(shell32_hInstance
, MAKEINTRESOURCE(IDB_SHELL_ABOUT_LOGO_24BPP
), IMAGE_BITMAP
, 0, 0, LR_DEFAULTCOLOR
);
1030 GetObject( hLogoBmp
, sizeof(BITMAP
), &bmpLogo
);
1032 cxLogoBmp
= bmpLogo
.bmWidth
;
1033 cyLogoBmp
= bmpLogo
.bmHeight
;
1036 // Set App-specific stuff (icon, app name, szOtherStuff string)
1037 SendDlgItemMessageW(hWnd
, IDC_SHELL_ABOUT_ICON
, STM_SETICON
, (WPARAM
)info
->hIcon
, 0);
1039 GetWindowTextW( hWnd
, szAppTitleTemplate
, sizeof(szAppTitleTemplate
) / sizeof(WCHAR
) );
1040 swprintf( szAppTitle
, szAppTitleTemplate
, info
->szApp
);
1041 SetWindowTextW( hWnd
, szAppTitle
);
1043 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_APPNAME
, info
->szApp
);
1044 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_OTHERSTUFF
, info
->szOtherStuff
);
1046 // Set the registered user and organization name
1047 if(RegOpenKeyExW( HKEY_LOCAL_MACHINE
, szRegKey
, 0, KEY_QUERY_VALUE
, &hRegKey
) == ERROR_SUCCESS
)
1049 SetRegTextData( hWnd
, hRegKey
, L
"RegisteredOwner", IDC_SHELL_ABOUT_REG_USERNAME
);
1050 SetRegTextData( hWnd
, hRegKey
, L
"RegisteredOrganization", IDC_SHELL_ABOUT_REG_ORGNAME
);
1052 RegCloseKey( hRegKey
);
1055 // Set the value for the installed physical memory
1056 MemStat
.dwLength
= sizeof(MemStat
);
1057 if( GlobalMemoryStatusEx(&MemStat
) )
1061 if (MemStat
.ullTotalPhys
> 1024 * 1024 * 1024)
1064 WCHAR szDecimalSeparator
[4];
1067 // We're dealing with GBs or more
1068 MemStat
.ullTotalPhys
/= 1024 * 1024;
1070 if (MemStat
.ullTotalPhys
> 1024 * 1024)
1072 // We're dealing with TBs or more
1073 MemStat
.ullTotalPhys
/= 1024;
1075 if (MemStat
.ullTotalPhys
> 1024 * 1024)
1077 // We're dealing with PBs or more
1078 MemStat
.ullTotalPhys
/= 1024;
1080 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1081 wcscpy( szUnits
, L
"PB" );
1085 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1086 wcscpy( szUnits
, L
"TB" );
1091 dTotalPhys
= (double)MemStat
.ullTotalPhys
/ 1024;
1092 wcscpy( szUnits
, L
"GB" );
1095 // We need the decimal point of the current locale to display the RAM size correctly
1096 if( GetLocaleInfoW(LOCALE_USER_DEFAULT
, LOCALE_SDECIMAL
, szDecimalSeparator
, sizeof(szDecimalSeparator
) / sizeof(WCHAR
)) > 0)
1101 uIntegral
= (UINT
)dTotalPhys
;
1102 uDecimals
= (UCHAR
)((UINT
)(dTotalPhys
* 100) - uIntegral
* 100);
1104 // Display the RAM size with 2 decimals
1105 swprintf(szBuf
, L
"%u%s%02u %s", uIntegral
, szDecimalSeparator
, uDecimals
, szUnits
);
1110 // We're dealing with MBs, don't show any decimals
1111 swprintf( szBuf
, L
"%u MB", (UINT
)MemStat
.ullTotalPhys
/ 1024 / 1024 );
1114 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_PHYSMEM
, szBuf
);
1117 // Add the Authors dialog
1118 hWndAuthors
= CreateDialogW( shell32_hInstance
, MAKEINTRESOURCEW(IDD_SHELL_ABOUT_AUTHORS
), hWnd
, AboutAuthorsDlgProc
);
1119 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_AUTHORS
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1120 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_AUTHORS
, szAuthorsText
);
1134 hdc
= BeginPaint(hWnd
, &ps
);
1135 hdcMem
= CreateCompatibleDC(hdc
);
1139 SelectObject(hdcMem
, hLogoBmp
);
1140 BitBlt(hdc
, 0, 0, cxLogoBmp
, cyLogoBmp
, hdcMem
, 0, 0, SRCCOPY
);
1145 EndPaint(hWnd
, &ps
);
1156 EndDialog(hWnd
, TRUE
);
1159 case IDC_SHELL_ABOUT_AUTHORS
:
1161 static BOOL bShowingAuthors
= FALSE
;
1162 WCHAR szAuthorsText
[20];
1166 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_AUTHORS
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1167 ShowWindow( hWndAuthors
, SW_HIDE
);
1171 LoadStringW( shell32_hInstance
, IDS_SHELL_ABOUT_BACK
, szAuthorsText
, sizeof(szAuthorsText
) / sizeof(WCHAR
) );
1172 ShowWindow( hWndAuthors
, SW_SHOW
);
1175 SetDlgItemTextW( hWnd
, IDC_SHELL_ABOUT_AUTHORS
, szAuthorsText
);
1176 bShowingAuthors
= !bShowingAuthors
;
1183 EndDialog(hWnd
, TRUE
);
1191 /*************************************************************************
1192 * ShellAboutA [SHELL32.288]
1194 BOOL WINAPI
ShellAboutA( HWND hWnd
, LPCSTR szApp
, LPCSTR szOtherStuff
, HICON hIcon
)
1197 LPWSTR appW
= NULL
, otherW
= NULL
;
1202 len
= MultiByteToWideChar(CP_ACP
, 0, szApp
, -1, NULL
, 0);
1203 appW
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
1204 MultiByteToWideChar(CP_ACP
, 0, szApp
, -1, appW
, len
);
1208 len
= MultiByteToWideChar(CP_ACP
, 0, szOtherStuff
, -1, NULL
, 0);
1209 otherW
= (LPWSTR
)HeapAlloc(GetProcessHeap(), 0, len
* sizeof(WCHAR
));
1210 MultiByteToWideChar(CP_ACP
, 0, szOtherStuff
, -1, otherW
, len
);
1213 ret
= ShellAboutW(hWnd
, appW
, otherW
, hIcon
);
1215 HeapFree(GetProcessHeap(), 0, otherW
);
1216 HeapFree(GetProcessHeap(), 0, appW
);
1221 /*************************************************************************
1222 * ShellAboutW [SHELL32.289]
1224 BOOL WINAPI
ShellAboutW( HWND hWnd
, LPCWSTR szApp
, LPCWSTR szOtherStuff
,
1229 DLGTEMPLATE
*DlgTemplate
;
1234 // DialogBoxIndirectParamW will be called with the hInstance of the calling application, so we have to preload the dialog template
1235 if(!(hRes
= FindResourceW(shell32_hInstance
, MAKEINTRESOURCEW(IDD_SHELL_ABOUT
), (LPWSTR
)RT_DIALOG
)))
1237 if(!(DlgTemplate
= (DLGTEMPLATE
*)LoadResource(shell32_hInstance
, hRes
)))
1241 info
.szOtherStuff
= szOtherStuff
;
1242 info
.hIcon
= hIcon
? hIcon
: LoadIconW( 0, (LPWSTR
)IDI_WINLOGO
);
1244 bRet
= DialogBoxIndirectParamW((HINSTANCE
)GetWindowLongPtrW( hWnd
, GWLP_HINSTANCE
),
1245 DlgTemplate
, hWnd
, AboutDlgProc
, (LPARAM
)&info
);
1249 /*************************************************************************
1250 * FreeIconList (SHELL32.@)
1252 EXTERN_C
void WINAPI
FreeIconList( DWORD dw
)
1254 FIXME("%x: stub\n",dw
);
1257 /*************************************************************************
1258 * SHLoadNonloadedIconOverlayIdentifiers (SHELL32.@)
1260 EXTERN_C HRESULT WINAPI
SHLoadNonloadedIconOverlayIdentifiers( VOID
)
1266 class CShell32Module
: public CComModule
1272 BEGIN_OBJECT_MAP(ObjectMap
)
1273 OBJECT_ENTRY(CLSID_ShellFSFolder
, CFSFolder
)
1274 OBJECT_ENTRY(CLSID_MyComputer
, CDrivesFolder
)
1275 OBJECT_ENTRY(CLSID_ShellDesktop
, CDesktopFolder
)
1276 OBJECT_ENTRY(CLSID_ShellItem
, ShellItem
)
1277 OBJECT_ENTRY(CLSID_ShellLink
, ShellLink
)
1278 OBJECT_ENTRY(CLSID_DragDropHelper
, IDropTargetHelperImpl
)
1279 OBJECT_ENTRY(CLSID_ControlPanel
, CControlPanelFolder
)
1280 OBJECT_ENTRY(CLSID_AutoComplete
, CAutoComplete
)
1281 OBJECT_ENTRY(CLSID_MyDocuments
, CMyDocsFolder
)
1282 OBJECT_ENTRY(CLSID_NetworkPlaces
, CNetFolder
)
1283 OBJECT_ENTRY(CLSID_FontsFolderShortcut
, CFontsFolder
)
1284 OBJECT_ENTRY(CLSID_Printers
, CPrinterFolder
)
1285 OBJECT_ENTRY(CLSID_AdminFolderShortcut
, CAdminToolsFolder
)
1286 OBJECT_ENTRY(CLSID_RecycleBin
, CBitBucket
)
1287 OBJECT_ENTRY(CLSID_OpenWithMenu
, COpenWithMenu
)
1288 OBJECT_ENTRY(CLSID_NewMenu
, CNewMenu
)
1289 OBJECT_ENTRY(CLSID_StartMenu
, CStartMenuCallback
)
1290 OBJECT_ENTRY(CLSID_MenuBandSite
, CMenuBandSite
)
1293 CShell32Module gModule
;
1297 static const struct {
1299 LPFNCREATEINSTANCE lpfnCI;
1300 } InterfaceTable[] = {
1301 {CLSID_ShellFSFolder, &IFSFolder_Constructor},
1302 {CLSID_MyComputer, &ISF_MyComputer_Constructor},
1303 {CLSID_ShellDesktop, &ISF_Desktop_Constructor},
1304 {CLSID_ShellItem, &IShellItem_Constructor},
1305 {CLSID_ShellLink, &IShellLink_Constructor},
1306 {CLSID_DragDropHelper, &IDropTargetHelper_Constructor},
1307 {CLSID_ControlPanel, &IControlPanel_Constructor},
1308 {CLSID_AutoComplete, &IAutoComplete_Constructor},
1309 {CLSID_MyDocuments, &ISF_MyDocuments_Constructor},
1310 {CLSID_NetworkPlaces, &ISF_NetworkPlaces_Constructor},
1311 {CLSID_FontsFolderShortcut, &ISF_Fonts_Constructor},
1312 {CLSID_Printers, &ISF_Printers_Constructor},
1313 {CLSID_AdminFolderShortcut, &ISF_AdminTools_Constructor},
1314 {CLSID_RecycleBin, &RecycleBin_Constructor},
1315 {CLSID_OpenWithMenu, &SHEOW_Constructor},
1316 {CLSID_NewMenu, &INewItem_Constructor},
1317 {CLSID_StartMenu, &StartMenu_Constructor},
1318 {CLSID_MenuBandSite, &MenuBandSite_Constructor},
1322 /***********************************************************************
1323 * DllGetVersion [SHELL32.@]
1325 * Retrieves version information of the 'SHELL32.DLL'
1328 * pdvi [O] pointer to version information structure.
1332 * Failure: E_INVALIDARG
1335 * Returns version of a shell32.dll from IE4.01 SP1.
1338 STDAPI
DllGetVersion(DLLVERSIONINFO
*pdvi
)
1340 /* FIXME: shouldn't these values come from the version resource? */
1341 if (pdvi
->cbSize
== sizeof(DLLVERSIONINFO
) ||
1342 pdvi
->cbSize
== sizeof(DLLVERSIONINFO2
))
1344 pdvi
->dwMajorVersion
= WINE_FILEVERSION_MAJOR
;
1345 pdvi
->dwMinorVersion
= WINE_FILEVERSION_MINOR
;
1346 pdvi
->dwBuildNumber
= WINE_FILEVERSION_BUILD
;
1347 pdvi
->dwPlatformID
= WINE_FILEVERSION_PLATFORMID
;
1348 if (pdvi
->cbSize
== sizeof(DLLVERSIONINFO2
))
1350 DLLVERSIONINFO2
*pdvi2
= (DLLVERSIONINFO2
*)pdvi
;
1353 pdvi2
->ullVersion
= MAKEDLLVERULL(WINE_FILEVERSION_MAJOR
,
1354 WINE_FILEVERSION_MINOR
,
1355 WINE_FILEVERSION_BUILD
,
1356 WINE_FILEVERSION_PLATFORMID
);
1358 TRACE("%u.%u.%u.%u\n",
1359 pdvi
->dwMajorVersion
, pdvi
->dwMinorVersion
,
1360 pdvi
->dwBuildNumber
, pdvi
->dwPlatformID
);
1365 WARN("wrong DLLVERSIONINFO size from app\n");
1366 return E_INVALIDARG
;
1370 /*************************************************************************
1371 * global variables of the shell32.dll
1372 * all are once per process
1375 HINSTANCE shell32_hInstance
;
1376 HIMAGELIST ShellSmallIconList
= 0;
1377 HIMAGELIST ShellBigIconList
= 0;
1379 void *operator new (size_t, void *buf
)
1384 /*************************************************************************
1388 * calling oleinitialize here breaks sone apps.
1390 STDAPI_(BOOL
) DllMain(HINSTANCE hInstance
, DWORD dwReason
, LPVOID fImpLoad
)
1392 TRACE("%p 0x%x %p\n", hInstance
, dwReason
, fImpLoad
);
1393 if (dwReason
== DLL_PROCESS_ATTACH
)
1395 /* HACK - the global constructors don't run, so I placement new them here */
1396 new (&gModule
) CShell32Module
;
1397 new (&_AtlWinModule
) CAtlWinModule
;
1398 new (&_AtlBaseModule
) CAtlBaseModule
;
1399 new (&_AtlComModule
) CAtlComModule
;
1401 shell32_hInstance
= hInstance
;
1402 gModule
.Init(ObjectMap
, hInstance
, NULL
);
1404 DisableThreadLibraryCalls (hInstance
);
1406 /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
1407 GetModuleFileNameW(hInstance
, swShell32Name
, MAX_PATH
);
1408 swShell32Name
[MAX_PATH
- 1] = '\0';
1410 InitCommonControlsEx(NULL
);
1413 InitChangeNotifications();
1416 else if (dwReason
== DLL_PROCESS_DETACH
)
1418 shell32_hInstance
= NULL
;
1420 FreeChangeNotifications();
1426 /***********************************************************************
1427 * DllCanUnloadNow (SHELL32.@)
1429 STDAPI
DllCanUnloadNow()
1431 return gModule
.DllCanUnloadNow();
1434 /*************************************************************************
1435 * DllGetClassObject [SHELL32.@]
1436 * SHDllGetClassObject [SHELL32.128]
1438 STDAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
1442 TRACE("CLSID:%s,IID:%s\n", shdebugstr_guid(&rclsid
), shdebugstr_guid(&riid
));
1444 hResult
= gModule
.DllGetClassObject(rclsid
, riid
, ppv
);
1445 TRACE("-- pointer to class factory: %p\n", *ppv
);
1449 /***********************************************************************
1450 * DllRegisterServer (BROWSEUI.@)
1452 STDAPI
DllRegisterServer()
1454 return gModule
.DllRegisterServer(FALSE
);
1457 /***********************************************************************
1458 * DllUnregisterServer (BROWSEUI.@)
1460 STDAPI
DllUnregisterServer()
1462 return gModule
.DllUnregisterServer(FALSE
);
1465 /*************************************************************************
1466 * DllInstall [SHELL32.@]
1470 * BOOL bInstall - TRUE for install, FALSE for uninstall
1471 * LPCWSTR pszCmdLine - command line (unused by shell32?)
1474 HRESULT WINAPI
DllInstall(BOOL bInstall
, LPCWSTR cmdline
)
1476 FIXME("%s %s: stub\n", bInstall
? "TRUE":"FALSE", debugstr_w(cmdline
));
1477 return S_OK
; /* indicate success */