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;
137 while (*
s && *
s!=
' ' && *
s!=
'\t')
141 while (*
s==
' ' || *
s==
'\t')
150 if ((*
s==
' ' || *
s==
'\t') && qcount==0)
153 while (*
s==
' ' || *
s==
'\t')
221 while (*
d && *
d!=
' ' && *
d!=
'\t')
230 while (*
s==
' ' || *
s==
'\t')
245 if ((*
s==
' ' || *
s==
'\t') && qcount==0)
254 }
while (*
s==
' ' || *
s==
'\t');
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,
551 hr = IShellFolder_GetDisplayNameOf( psfParent, pidlLast,
552 SHGDN_INFOLDER, &
str);
576 if (sTemp[0] == 0 || (sTemp[0] ==
'.' && sTemp[1] == 0))
603 uGilFlags |= GIL_OPENICON;
606 uGilFlags |= GIL_FORSHORTCUT;
611 uGilFlags |= GIL_FORSHORTCUT;
615 FIXME(
"SHGFI_OVERLAYINDEX unhandled\n");
618 FIXME(
"set icon to selected, stub\n");
621 FIXME(
"set icon to shell size, stub\n");
660 hr = IShellFolder_GetUIObjectOf(psfParent, 0, 1,
665 hr = IExtractIconW_GetIconLocation(pei, uGilFlags,
668 if (
uFlags & GIL_NOTFILENAME)
673 psfi->
iIcon = iIndex;
675 IExtractIconW_Release(pei);
707 if (psfi->
iIcon == -1)
717 &psfi->
hIcon, 0, 1, 0);
722 &psfi->
hIcon, 0, 1, 0);
725 IconNotYetLoaded=
FALSE;
726 psfi->
iIcon = icon_idx;
735 uGilFlags, &(psfi->
iIcon))))
762 IShellFolder_Release(psfParent);
769 TRACE (
"icon=%p index=0x%08x attr=0x%08x name=%s type=%s ret=0x%08lx\n",
883 if (nIconIndex == (
UINT)-1)
908 TRACE(
"(%s, %p, %p)\n",
debugstr_w(wsPrinterName), pLargeIcon, pSmallIcon);
916 if((wsPrinterName !=
NULL) && (wsPrinterName[0] != 0))
918 FIXME(
"(select Icon by PrinterName %s not implemented)\n",
debugstr_w(wsPrinterName));
921 if(pLargeIcon !=
NULL)
926 if(pSmallIcon !=
NULL)
941 FIXME(
"(%s, %x, %p (%p), %p (%p)) stub!\n",
debugstr_w(wsPrinter), dwType,
942 phClassPidl, (phClassPidl !=
NULL) ? *(phClassPidl) :
NULL,
943 phwnd, (phwnd !=
NULL) ? *(phwnd) :
NULL);
953 FIXME(
"(%p, %p) stub!\n", hClassPidl,
hwnd);
974 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
984 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1003 IUnknown_Release(
pUnk);
1070 static DWORD cxLogoBmp;
1071 static DWORD cyLogoBmp, cyLineBmp;
1072 static HBITMAP hLogoBmp, hLineBmp;
1073 static HWND hWndAuthors;
1084 MEMORYSTATUSEX MemStat;
1086 WCHAR szAppTitleTemplate[512];
1087 WCHAR szAuthorsText[20];
1102 if (hLogoBmp && hLineBmp)
1108 cxLogoBmp = bmpLogo.bmWidth;
1109 cyLogoBmp = bmpLogo.bmHeight;
1112 cyLineBmp = bmpLogo.bmHeight;
1143 MemStat.dwLength =
sizeof(MemStat);
1148 if (MemStat.ullTotalPhys > 1024 * 1024 * 1024)
1151 WCHAR szDecimalSeparator[4];
1155 MemStat.ullTotalPhys /= 1024 * 1024;
1157 if (MemStat.ullTotalPhys > 1024 * 1024)
1160 MemStat.ullTotalPhys /= 1024;
1162 if (MemStat.ullTotalPhys > 1024 * 1024)
1165 MemStat.ullTotalPhys /= 1024;
1167 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1172 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1178 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1190 uIntegral = (
UINT)dTotalPhys;
1191 uDecimals = (
UCHAR)((
UINT)(dTotalPhys * 100) - uIntegral * 100);
1194 swprintf(szBuf,
L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits);
1200 swprintf(szBuf,
L"%u MB", (
UINT)MemStat.ullTotalPhys / 1024 / 1024);
1217 if (hLogoBmp && hLineBmp)
1256 WCHAR szAuthorsText[20];
1258 if (bShowingAuthors)
1270 bShowingAuthors = !bShowingAuthors;
1329 WCHAR szVersionString[256];
1330 WCHAR szFormat[256];
1347 StringCchPrintfW(szVersionString,
_countof(szVersionString), szFormat, KERNEL_VERSION_STR, KERNEL_VERSION_BUILD_STR);
1352 info.szOSVersion = szVersionString;
1354 info.szOtherStuff = szOtherStuff;
static BOOL IsWindowsServer()
#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 RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
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)
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)
LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
static VOID NTAPI 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
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
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)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPSTR 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_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot)
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 IDB_REACTOS_SERVER
#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 IDB_REACTOS_WORKSTATION
#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
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
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)
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)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define MAKEINTRESOURCEW(i)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
int WINAPI GetSystemMetrics(_In_ int)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)