25#define WIN32_NO_STATUS
43#include <wine/unicode.h>
45#include <reactos/version.h>
46#include <reactos/buildno.h>
51const char *
const SHELL_Authors[] = {
"Copyright 1993-"COPYRIGHT_YEAR
" WINE team",
"Copyright 1998-"COPYRIGHT_YEAR
" ReactOS Team", 0 };
110 if (
len < deslen)
break;
320 HRESULT hr = IShellFolder_QueryInterface(psf, &IID_IShellFolder2, (
void**)&psf2);
323 hr = IShellFolder2_GetDetailsOf(psf2, pidl, col, &
details);
324 IShellFolder2_Release(psf2);
326 else if (
SUCCEEDED(
hr = IShellFolder_QueryInterface(psf, &IID_IShellDetails, (
void**)&psd)))
420#define SHGFI_KNOWN_FLAGS \
421 (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
422 SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
423 SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
424 SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
425 SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
446 TRACE(
"%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
489 flags &= ~SHGFI_TYPENAME;
594 uGilFlags |= GIL_OPENICON;
597 uGilFlags |= GIL_FORSHORTCUT;
602 uGilFlags |= GIL_FORSHORTCUT;
606 FIXME(
"SHGFI_OVERLAYINDEX unhandled\n");
609 FIXME(
"set icon to selected, stub\n");
648 hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1,
653 hr = IExtractIconW_GetIconLocation(pei, uGilFlags,
656 if (
uFlags & GIL_NOTFILENAME)
661 psfi->
iIcon = iIndex;
663 IExtractIconW_Release(pei);
695 if (psfi->
iIcon == -1)
726 &psfi->
hIcon, 0, 1, 0);
729 IconNotYetLoaded=
FALSE;
730 psfi->
iIcon = icon_idx;
739 uGilFlags, &(psfi->
iIcon))))
766 IShellFolder_Release(psfParent);
772 TRACE (
"icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
886 if (nIconIndex == (
UINT)-1)
911 TRACE(
"(%s, %p, %p)\n",
debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon);
919 if((wsPrinterName !=
NULL) && (wsPrinterName[0] != 0))
921 FIXME(
"(select Icon by PrinterName %s not implemented)\n",
debugstr_w(wsPrinterName));
924 if(pLargeIcon !=
NULL)
929 if(pSmallIcon !=
NULL)
944 FIXME(
"(%s, %x, %p (%p), %p (%p)) stub!\n",
debugstr_w(wsPrinter), dwType,
945 phClassPidl, (phClassPidl !=
NULL) ? *(phClassPidl) :
NULL,
946 phwnd, (phwnd !=
NULL) ? *(phwnd) :
NULL);
956 FIXME(
"(%p, %p) stub!\n", hClassPidl,
hwnd);
977 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
987 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1006 IUnknown_Release(
pUnk);
1073 static DWORD cxLogoBmp;
1074 static DWORD cyLogoBmp, cyLineBmp;
1075 static HBITMAP hLogoBmp, hLineBmp;
1076 static HWND hWndAuthors;
1087 MEMORYSTATUSEX MemStat;
1089 WCHAR szAppTitleTemplate[512];
1090 WCHAR szAuthorsText[20];
1104 if (hLogoBmp && hLineBmp)
1145 MemStat.dwLength =
sizeof(MemStat);
1150 if (MemStat.ullTotalPhys > 1024 * 1024 * 1024)
1153 WCHAR szDecimalSeparator[4];
1157 MemStat.ullTotalPhys /= 1024 * 1024;
1159 if (MemStat.ullTotalPhys > 1024 * 1024)
1162 MemStat.ullTotalPhys /= 1024;
1164 if (MemStat.ullTotalPhys > 1024 * 1024)
1167 MemStat.ullTotalPhys /= 1024;
1169 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1174 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1180 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1192 uIntegral = (
UINT)dTotalPhys;
1193 uDecimals = (
UCHAR)((
UINT)(dTotalPhys * 100) - uIntegral * 100);
1196 swprintf(szBuf,
L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits);
1202 swprintf(szBuf,
L"%u MB", (
UINT)MemStat.ullTotalPhys / 1024 / 1024);
1219 if (hLogoBmp && hLineBmp)
1258 WCHAR szAuthorsText[20];
1260 if (bShowingAuthors)
1272 bShowingAuthors = !bShowingAuthors;
1331 WCHAR szVersionString[256];
1332 WCHAR szFormat[256];
1349 StringCchPrintfW(szVersionString,
_countof(szVersionString), szFormat, KERNEL_VERSION_STR, KERNEL_VERSION_BUILD_STR);
1354 info.szOSVersion = szVersionString;
1356 info.szOtherStuff = szOtherStuff;
EXTERN_C HRESULT SHELL32_AssocGetFileDescription(PCWSTR Name, PWSTR Buf, UINT cchBuf)
EXTERN_C HRESULT SHELL32_AssocGetFSDirectoryDescription(PWSTR Buf, UINT cchBuf)
#define shell32_hInstance
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
HICON WINAPI ImageList_GetIcon(HIMAGELIST himl, INT i, UINT fStyle)
#define ERROR_INVALID_PARAMETER
#define GetCurrentDirectoryW(x, y)
#define ReadFile(a, b, c, d, e)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
LPWSTR WINAPI PathFindExtensionW(const WCHAR *path)
BOOL WINAPI PathIsRelativeW(const WCHAR *path)
BOOL WINAPI PathIsRootW(const WCHAR *path)
void WINAPI SHFree(LPVOID pv)
#define IShellFolder_GetDisplayNameOf
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
WCHAR swShell32Name[MAX_PATH]
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
BOOL NTAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
INT SIC_GetIconIndex(LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
BOOL PidlToSicIndex(IShellFolder *sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int *pIndex)
BOOL WINAPI Shell_GetImageLists(HIMAGELIST *lpBigList, HIMAGELIST *lpSmallList)
_Out_opt_ PICONINFO IconInfo
REFIID LPVOID DWORD_PTR dw
static const WCHAR pathW[]
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
unsigned __int3264 UINT_PTR
#define FILE_ATTRIBUTE_DIRECTORY
#define LOCALE_USER_DEFAULT
#define IMAGE_SUBSYSTEM_WINDOWS_GUI
#define MAKEINTRESOURCE(i)
#define IMAGE_NT_SIGNATURE
#define IMAGE_OS2_SIGNATURE
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
LPITEMIDLIST SHELL32_CreateSimpleIDListFromPath(LPCWSTR pszPath, DWORD dwAttributes)
BOOL _ILIsDrive(LPCITEMIDLIST pidl)
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize)
_Out_opt_ int _Out_opt_ int * cy
#define GetWindowLongPtrW
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
UINT WINAPI PrivateExtractIconsW(_In_reads_(MAX_PATH) LPCWSTR szFileName, _In_ int nIconIndex, _In_ int cxIcon, _In_ int cyIcon, _Out_writes_opt_(nIcons) HICON *phicon, _Out_writes_opt_(nIcons) UINT *piconid, _In_ UINT nIcons, _In_ UINT flags)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define CreateDialogW(h, n, w, f)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define IDB_BRAND_BANNERLINE
BOOL HCR_GetIconW(LPCWSTR szClass, LPWSTR szDest, LPCWSTR szName, DWORD len, int *picon_idx)
BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot)
HRESULT HCR_GetProgIdKeyOfExtension(PCWSTR szExtension, PHKEY phKey, BOOL AllowFallback)
VOID WINAPI Printer_LoadIconsW(LPCWSTR wsPrinterName, HICON *pLargeIcon, HICON *pSmallIcon)
BOOL SHELL_IsShortcut(LPCITEMIDLIST pidlLast)
DWORD WINAPI SHHelpShortcuts_RunDLLW(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
#define SHGFI_KNOWN_FLAGS
static DWORD shgfi_get_exe_type(LPCWSTR szFullPath)
HRESULT WINAPI SHLoadNonloadedIconOverlayIdentifiers(VOID)
static INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
const char *const SHELL_Authors[]
HRESULT WINAPI SHLoadInProc(REFCLSID rclsid)
HICON WINAPI DuplicateIcon(HINSTANCE hInstance, HICON hIcon)
HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex)
HICON WINAPI ExtractIconA(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex)
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT sizeofpsfi, UINT flags)
VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd)
BOOL WINAPI Printers_RegisterWindowW(LPCWSTR wsPrinter, DWORD dwType, HANDLE *phClassPidl, HWND *phwnd)
BOOL WINAPI ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon)
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
INT_PTR CALLBACK AboutAuthorsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
static VOID SetRegTextData(HWND hWnd, HKEY hKey, LPCWSTR Value, UINT uID)
DWORD WINAPI SHHelpShortcuts_RunDLLA(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
void WINAPI FreeIconList(DWORD dw)
static HRESULT SHELL_GetDetailsOfToBuffer(IShellFolder *psf, PCUITEMID_CHILD pidl, UINT col, LPWSTR Buf, UINT cchBuf)
#define SHGFI_ATTR_SPECIFIED
#define SHGFI_LINKOVERLAY
#define SHGFI_SYSICONINDEX
#define SHGFI_ICONLOCATION
#define SHGFI_DISPLAYNAME
#define SHGFI_USEFILEATTRIBUTES
#define SHGFI_ADDOVERLAYS
#define SHGFI_OVERLAYINDEX
#define SHGFI_SHELLICONSIZE
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
#define IShellDetails_Release(p)
#define IShellDetails_GetDetailsOf(p, a, b, c)
#define IDC_ABOUT_REG_USERNAME
#define IDC_ABOUT_PHYSMEM
#define IDC_ABOUT_APPNAME
#define IDC_ABOUT_AUTHORS_LISTBOX
#define IDC_ABOUT_AUTHORS
#define IDS_ABOUT_VERSION_STRING
#define IDC_ABOUT_REG_ORGNAME
#define IDI_SHELL_PRINTERS_FOLDER
#define IDC_ABOUT_VERSION
#define IDC_ABOUT_OTHERSTUFF
#define IDD_ABOUT_AUTHORS
#define IDS_SHELL_ABOUT_BACK
#define IDS_SHELL_ABOUT_AUTHORS
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
CHAR szDisplayName[MAX_PATH]
WCHAR szDisplayName[MAX_PATH]
#define INVALID_FILE_ATTRIBUTES
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
#define LOAD_LIBRARY_AS_DATAFILE
#define DISP_E_MEMBERNOTFOUND
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI DeleteDC(_In_ HDC)
#define HKEY_LOCAL_MACHINE