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;
403#define SHGFI_KNOWN_FLAGS \
404 (SHGFI_SMALLICON | SHGFI_OPENICON | SHGFI_SHELLICONSIZE | SHGFI_PIDL | \
405 SHGFI_USEFILEATTRIBUTES | SHGFI_ADDOVERLAYS | SHGFI_OVERLAYINDEX | \
406 SHGFI_ICON | SHGFI_DISPLAYNAME | SHGFI_TYPENAME | SHGFI_ATTRIBUTES | \
407 SHGFI_ICONLOCATION | SHGFI_EXETYPE | SHGFI_SYSICONINDEX | \
408 SHGFI_LINKOVERLAY | SHGFI_SELECTED | SHGFI_ATTR_SPECIFIED)
429 TRACE(
"%s fattr=0x%x sfi=%p(attr=0x%08x) size=0x%x flags=0x%x\n",
514 ERR(
"pidl is null!\n");
528 IShellFolder_GetAttributesOf(psfParent, 1, (
LPCITEMIDLIST*)&pidlLast,
552 SHGDN_INFOLDER, &
str);
573 if (sTemp[0] == 0 || (sTemp[0] ==
'.' && sTemp[1] == 0))
600 uGilFlags |= GIL_OPENICON;
603 uGilFlags |= GIL_FORSHORTCUT;
608 uGilFlags |= GIL_FORSHORTCUT;
612 FIXME(
"SHGFI_OVERLAYINDEX unhandled\n");
615 FIXME(
"set icon to selected, stub\n");
618 FIXME(
"set icon to shell size, stub\n");
657 hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1,
662 hr = IExtractIconW_GetIconLocation(pei, uGilFlags,
665 if (
uFlags & GIL_NOTFILENAME)
670 psfi->
iIcon = iIndex;
672 IExtractIconW_Release(pei);
704 if (psfi->
iIcon == -1)
714 &psfi->
hIcon, 0, 1, 0);
719 &psfi->
hIcon, 0, 1, 0);
722 IconNotYetLoaded=
FALSE;
723 psfi->
iIcon = icon_idx;
732 uGilFlags, &(psfi->
iIcon))))
759 IShellFolder_Release(psfParent);
766 TRACE (
"icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
880 if (nIconIndex == (
UINT)-1)
905 TRACE(
"(%s, %p, %p)\n",
debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon);
913 if((wsPrinterName !=
NULL) && (wsPrinterName[0] != 0))
915 FIXME(
"(select Icon by PrinterName %s not implemented)\n",
debugstr_w(wsPrinterName));
918 if(pLargeIcon !=
NULL)
923 if(pSmallIcon !=
NULL)
938 FIXME(
"(%s, %x, %p (%p), %p (%p)) stub!\n",
debugstr_w(wsPrinter), dwType,
939 phClassPidl, (phClassPidl !=
NULL) ? *(phClassPidl) :
NULL,
940 phwnd, (phwnd !=
NULL) ? *(phwnd) :
NULL);
950 FIXME(
"(%p, %p) stub!\n", hClassPidl,
hwnd);
971 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
981 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1000 IUnknown_Release(
pUnk);
1067 static DWORD cxLogoBmp;
1068 static DWORD cyLogoBmp, cyLineBmp;
1069 static HBITMAP hLogoBmp, hLineBmp;
1070 static HWND hWndAuthors;
1081 MEMORYSTATUSEX MemStat;
1083 WCHAR szAppTitleTemplate[512];
1084 WCHAR szAuthorsText[20];
1090 if (hLogoBmp && hLineBmp)
1096 cxLogoBmp = bmpLogo.bmWidth;
1097 cyLogoBmp = bmpLogo.bmHeight;
1100 cyLineBmp = bmpLogo.bmHeight;
1131 MemStat.dwLength =
sizeof(MemStat);
1136 if (MemStat.ullTotalPhys > 1024 * 1024 * 1024)
1139 WCHAR szDecimalSeparator[4];
1143 MemStat.ullTotalPhys /= 1024 * 1024;
1145 if (MemStat.ullTotalPhys > 1024 * 1024)
1148 MemStat.ullTotalPhys /= 1024;
1150 if (MemStat.ullTotalPhys > 1024 * 1024)
1153 MemStat.ullTotalPhys /= 1024;
1155 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1160 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1166 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1178 uIntegral = (
UINT)dTotalPhys;
1179 uDecimals = (
UCHAR)((
UINT)(dTotalPhys * 100) - uIntegral * 100);
1182 swprintf(szBuf,
L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits);
1188 swprintf(szBuf,
L"%u MB", (
UINT)MemStat.ullTotalPhys / 1024 / 1024);
1205 if (hLogoBmp && hLineBmp)
1244 WCHAR szAuthorsText[20];
1246 if (bShowingAuthors)
1258 bShowingAuthors = !bShowingAuthors;
1317 WCHAR szVersionString[256];
1318 WCHAR szFormat[256];
1335 StringCchPrintfW(szVersionString,
_countof(szVersionString), szFormat, KERNEL_VERSION_STR, KERNEL_VERSION_BUILD_STR);
1340 info.szOSVersion = szVersionString;
1342 info.szOtherStuff = szOtherStuff;
#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 PathFindFileNameW(LPCWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(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 IMAGE_NT_SIGNATURE
#define IMAGE_OS2_SIGNATURE
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
void _ILGetFileType(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize)
_Out_opt_ int _Out_opt_ int * cy
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
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)
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)
#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 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 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 HKEY_CLASSES_ROOT
#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)