25#define WIN32_NO_STATUS
43#include <wine/unicode.h>
45#include <reactos/version.h>
46#include <reactos/buildno.h>
50const char *
const SHELL_Authors[] = {
"Copyright 1993-"COPYRIGHT_YEAR
" WINE team",
"Copyright 1998-"COPYRIGHT_YEAR
" ReactOS Team", 0 };
109 if (
len < deslen)
break;
319 HRESULT hr = IShellFolder_QueryInterface(psf, &IID_IShellFolder2, (
void**)&psf2);
322 hr = IShellFolder2_GetDetailsOf(psf2, pidl, col, &
details);
323 IShellFolder2_Release(psf2);
325 else if (
SUCCEEDED(
hr = IShellFolder_QueryInterface(psf, &IID_IShellDetails, (
void**)&psd)))
419#define SHGFI_KNOWN_FLAGS \
420 (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
421 SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
422 SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
423 SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
424 SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
445 TRACE(
"%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
488 flags &= ~SHGFI_TYPENAME;
593 uGilFlags |= GIL_OPENICON;
596 uGilFlags |= GIL_FORSHORTCUT;
601 uGilFlags |= GIL_FORSHORTCUT;
605 FIXME(
"SHGFI_OVERLAYINDEX unhandled\n");
608 FIXME(
"set icon to selected, stub\n");
647 hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1,
652 hr = IExtractIconW_GetIconLocation(pei, uGilFlags,
655 if (
uFlags & GIL_NOTFILENAME)
660 psfi->
iIcon = iIndex;
662 IExtractIconW_Release(pei);
694 if (psfi->
iIcon == -1)
725 &psfi->
hIcon, 0, 1, 0);
728 IconNotYetLoaded=
FALSE;
729 psfi->
iIcon = icon_idx;
738 uGilFlags, &(psfi->
iIcon))))
765 IShellFolder_Release(psfParent);
771 TRACE (
"icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
885 if (nIconIndex == (
UINT)-1)
910 TRACE(
"(%s, %p, %p)\n",
debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon);
918 if((wsPrinterName !=
NULL) && (wsPrinterName[0] != 0))
920 FIXME(
"(select Icon by PrinterName %s not implemented)\n",
debugstr_w(wsPrinterName));
923 if(pLargeIcon !=
NULL)
928 if(pSmallIcon !=
NULL)
943 FIXME(
"(%s, %x, %p (%p), %p (%p)) stub!\n",
debugstr_w(wsPrinter), dwType,
944 phClassPidl, (phClassPidl !=
NULL) ? *(phClassPidl) :
NULL,
945 phwnd, (phwnd !=
NULL) ? *(phwnd) :
NULL);
955 FIXME(
"(%p, %p) stub!\n", hClassPidl,
hwnd);
976 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
986 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1005 IUnknown_Release(
pUnk);
1072 static DWORD cxLogoBmp;
1073 static DWORD cyLogoBmp, cyLineBmp;
1074 static HBITMAP hLogoBmp, hLineBmp;
1075 static HWND hWndAuthors;
1086 MEMORYSTATUSEX MemStat;
1088 WCHAR szAppTitleTemplate[512];
1089 WCHAR szAuthorsText[20];
1095 if (hLogoBmp && hLineBmp)
1101 cxLogoBmp = bmpLogo.bmWidth;
1102 cyLogoBmp = bmpLogo.bmHeight;
1105 cyLineBmp = bmpLogo.bmHeight;
1136 MemStat.dwLength =
sizeof(MemStat);
1141 if (MemStat.ullTotalPhys > 1024 * 1024 * 1024)
1144 WCHAR szDecimalSeparator[4];
1148 MemStat.ullTotalPhys /= 1024 * 1024;
1150 if (MemStat.ullTotalPhys > 1024 * 1024)
1153 MemStat.ullTotalPhys /= 1024;
1155 if (MemStat.ullTotalPhys > 1024 * 1024)
1158 MemStat.ullTotalPhys /= 1024;
1160 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1165 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1171 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1183 uIntegral = (
UINT)dTotalPhys;
1184 uDecimals = (
UCHAR)((
UINT)(dTotalPhys * 100) - uIntegral * 100);
1187 swprintf(szBuf,
L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits);
1193 swprintf(szBuf,
L"%u MB", (
UINT)MemStat.ullTotalPhys / 1024 / 1024);
1210 if (hLogoBmp && hLineBmp)
1249 WCHAR szAuthorsText[20];
1251 if (bShowingAuthors)
1263 bShowingAuthors = !bShowingAuthors;
1322 WCHAR szVersionString[256];
1323 WCHAR szFormat[256];
1340 StringCchPrintfW(szVersionString,
_countof(szVersionString), szFormat, KERNEL_VERSION_STR, KERNEL_VERSION_BUILD_STR);
1345 info.szOSVersion = szVersionString;
1347 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)
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
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)
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)
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)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
void WINAPI SHFree(LPVOID pv)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRootW(LPCWSTR lpszPath)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
#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_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
#define SHGFI_ADDOVERLAYS
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 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
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_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 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
#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)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
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)