25 #define WIN32_NO_STATUS 43 #include <wine/unicode.h> 45 #include <reactos/version.h> 46 #include <reactos/buildno.h> 51 const 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);
968 #define DROP_FIELD_TOP (-15) 969 #define DROP_FIELD_HEIGHT 15 980 TRACE(
"msg=%d, data={cb=%d, hwnd=%p, callback=%x, edge=%d, rc=%s, lparam=%lx}\n",
1011 FIXME(
"ABM_REMOVE broken\n");
1040 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1050 FIXME(
"(%x, %x, %x, %x) stub!\n", dwArg1, dwArg2, dwArg3, dwArg4);
1069 IUnknown_Release(
pUnk);
1136 static DWORD cxLogoBmp;
1137 static DWORD cyLogoBmp, cyLineBmp;
1138 static HBITMAP hLogoBmp, hLineBmp;
1139 static HWND hWndAuthors;
1150 MEMORYSTATUSEX MemStat;
1152 WCHAR szAppTitleTemplate[512];
1153 WCHAR szAuthorsText[20];
1168 if (hLogoBmp && hLineBmp)
1174 cxLogoBmp = bmpLogo.bmWidth;
1175 cyLogoBmp = bmpLogo.bmHeight;
1178 cyLineBmp = bmpLogo.bmHeight;
1209 MemStat.dwLength =
sizeof(MemStat);
1214 if (MemStat.ullTotalPhys > 1024 * 1024 * 1024)
1217 WCHAR szDecimalSeparator[4];
1221 MemStat.ullTotalPhys /= 1024 * 1024;
1223 if (MemStat.ullTotalPhys > 1024 * 1024)
1226 MemStat.ullTotalPhys /= 1024;
1228 if (MemStat.ullTotalPhys > 1024 * 1024)
1231 MemStat.ullTotalPhys /= 1024;
1233 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1238 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1244 dTotalPhys = (
double)MemStat.ullTotalPhys / 1024;
1256 uIntegral = (
UINT)dTotalPhys;
1257 uDecimals = (
UCHAR)((
UINT)(dTotalPhys * 100) - uIntegral * 100);
1260 swprintf(szBuf,
L"%u%s%02u %s", uIntegral, szDecimalSeparator, uDecimals, szUnits);
1266 swprintf(szBuf,
L"%u MB", (
UINT)MemStat.ullTotalPhys / 1024 / 1024);
1283 if (hLogoBmp && hLineBmp)
1322 WCHAR szAuthorsText[20];
1324 if (bShowingAuthors)
1336 bShowingAuthors = !bShowingAuthors;
1348 #endif // __REACTOS__ 1395 WCHAR szVersionString[256];
1396 WCHAR szFormat[256];
1413 StringCchPrintfW(szVersionString,
_countof(szVersionString), szFormat, KERNEL_VERSION_STR, KERNEL_VERSION_BUILD_STR);
1418 info.szOSVersion = szVersionString;
1420 info.szOtherStuff = szOtherStuff;
void WINAPI FreeIconList(DWORD dw)
#define ERROR_INVALID_PARAMETER
unsigned __int3264 UINT_PTR
#define IDB_REACTOS_WORKSTATION
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
#define ABM_GETAUTOHIDEBAR
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
GLint GLint GLsizei width
#define SHGFI_SYSICONINDEX
static INT_PTR CALLBACK AboutDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI PathIsRelativeW(LPCWSTR lpszPath)
void WINAPI ILFree(LPITEMIDLIST pidl)
HICON WINAPI ExtractIconA(HINSTANCE hInstance, LPCSTR lpszFile, UINT nIconIndex)
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
#define WideCharToMultiByte
#define IDC_ABOUT_OTHERSTUFF
BOOL WINAPI ShellAboutA(HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon)
#define LOCALE_USER_DEFAULT
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
BOOL HCR_GetIconW(LPCWSTR szClass, LPWSTR szDest, LPCWSTR szName, DWORD len, int *picon_idx)
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
#define GetCurrentDirectoryW(x, y)
#define DISP_E_MEMBERNOTFOUND
#define IDC_ABOUT_APPNAME
WCHAR swShell32Name[MAX_PATH]
LONG WINAPI RegOpenKeyExA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey, _In_ DWORD ulOptions, _In_ REGSAM samDesired, _Out_ PHKEY phkResult)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
#define INVALID_HANDLE_VALUE
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define ABM_GETTASKBARPOS
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
WINE_DEFAULT_DEBUG_CHANNEL(shell)
#define GetWindowLongPtrW
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HRESULT WINAPI SHLoadInProc(REFCLSID rclsid)
BOOL WINAPI GetBinaryTypeW(LPCWSTR lpApplicationName, LPDWORD lpBinaryType)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI GetIconInfo(_In_ HICON, _Out_ PICONINFO)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
#define IDI_SHELL_PRINTERS_FOLDER
HICON WINAPI ExtractIconW(HINSTANCE hInstance, LPCWSTR lpszFile, UINT nIconIndex)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
VOID WINAPI Printers_UnregisterWindow(HANDLE hClassPidl, HWND hwnd)
#define IDC_ABOUT_REG_USERNAME
UINT_PTR WINAPI OLD_SHAppBarMessage(DWORD msg, PAPPBARDATA data)
static DWORD shgfi_get_exe_type(LPCWSTR szFullPath)
HWND WINAPI SetActiveWindow(_In_ HWND)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE, _In_ LPCWSTR, _In_ UINT, _In_ int, _In_ int, _In_ UINT)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
HDC WINAPI BeginPaint(_In_ HWND, _Out_ LPPAINTSTRUCT)
static struct _test_info info[]
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
REFIID LPVOID DWORD_PTR dw
#define SHGFI_SHELLICONSIZE
_Out_opt_ int _Out_opt_ int * cy
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
#define SHGFI_ADDOVERLAYS
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
#define SHGFI_DISPLAYNAME
BOOL SHELL_IsShortcut(LPCITEMIDLIST pidlLast)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
DWORD WINAPI SHHelpShortcuts_RunDLLA(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
#define FILE_ATTRIBUTE_DIRECTORY
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define IMAGE_NT_SIGNATURE
HICON WINAPI DuplicateIcon(HINSTANCE hInstance, HICON hIcon)
CHAR szDisplayName[MAX_PATH]
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDB_REACTOS_SERVER
#define SHGFI_OVERLAYINDEX
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
HICON WINAPI ImageList_GetIcon(HIMAGELIST himl, INT i, UINT fStyle)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
int WINAPI GetWindowTextLengthW(_In_ HWND)
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)
const char * wine_dbgstr_rect(const RECT *rect)
int WINAPI GetSystemMetrics(_In_ int)
VOID WINAPI Printer_LoadIconsW(LPCWSTR wsPrinterName, HICON *pLargeIcon, HICON *pSmallIcon)
#define SHGFI_LINKOVERLAY
BOOL HCR_MapTypeToValueW(LPCWSTR szExtension, LPWSTR szFileType, LONG len, BOOL bPrependDot)
INT_PTR CALLBACK AboutAuthorsDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path, DWORD dwFileAttributes, SHFILEINFOA *psfi, UINT sizeofpsfi, UINT flags)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDD_ABOUT_AUTHORS
unsigned __int3264 UINT_PTR
#define INVALID_FILE_ATTRIBUTES
VERSIONHELPERAPI IsWindowsServer()
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define SHGFI_USEFILEATTRIBUTES
#define ABM_SETAUTOHIDEBAR
BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot)
#define IDC_ABOUT_AUTHORS
#define IDS_ABOUT_VERSION_STRING
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define IDS_SHELL_ABOUT_AUTHORS
WCHAR szDisplayName[MAX_PATH]
BOOL WINAPI ShellAboutW(HWND hWnd, LPCWSTR szApp, LPCWSTR szOtherStuff, HICON hIcon)
#define CreateDialogW(h, n, w, f)
#define IMAGE_OS2_SIGNATURE
int _cdecl swprintf(const WCHAR *,...)
#define SHGFI_KNOWN_FLAGS
GLint GLint GLsizei GLsizei height
BOOL WINAPI Shell_GetImageLists(HIMAGELIST *lpBigList, HIMAGELIST *lpSmallList)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
#define IDC_ABOUT_VERSION
#define SHGFI_ICONLOCATION
WINE_UNICODE_INLINE WCHAR * strcpyW(WCHAR *dst, const WCHAR *src)
#define shell32_hInstance
DWORD WINAPI SHHelpShortcuts_RunDLLW(DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
BOOL WINAPI DeleteDC(_In_ HDC)
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
#define SHGFI_ATTR_SPECIFIED
void shell(int argc, const char *argv[])
HLOCAL NTAPI LocalFree(HLOCAL hMem)
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
const char *const SHELL_Authors[]
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
#define ABM_WINDOWPOSCHANGED
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
#define ReadFile(a, b, c, d, e)
INT_PTR WINAPI DialogBoxIndirectParamW(_In_opt_ HINSTANCE, _In_ LPCDLGTEMPLATE, _In_opt_ HWND, _In_opt_ DLGPROC, _In_ LPARAM)
INT SIC_GetIconIndex(LPCWSTR sSourceFile, INT dwSourceIndex, DWORD dwFlags)
#define MultiByteToWideChar
HRESULT WINAPI SHILCreateFromPathW(LPCWSTR path, LPITEMIDLIST *ppidl, DWORD *attributes)
static VOID SetRegTextData(HWND hWnd, HKEY hKey, LPCWSTR Value, UINT uID)
void WINAPI SHFree(LPVOID pv)
void _ILGetFileType(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
#define IDC_ABOUT_REG_ORGNAME
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
#define IDC_ABOUT_PHYSMEM
BOOL PidlToSicIndex(IShellFolder *sh, LPCITEMIDLIST pidl, BOOL bBigIcon, UINT uFlags, int *pIndex)
HRESULT WINAPI SHLoadNonloadedIconOverlayIdentifiers(VOID)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
BOOL NTAPI GlobalMemoryStatusEx(LPMEMORYSTATUSEX lpBuffer)
#define HKEY_CLASSES_ROOT
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI Printers_RegisterWindowW(LPCWSTR wsPrinter, DWORD dwType, HANDLE *phClassPidl, HWND *phwnd)
#define IDS_SHELL_ABOUT_BACK
LPWSTR WINAPI PathCombineW(LPWSTR lpszDest, LPCWSTR lpszDir, LPCWSTR lpszFile)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
#define IDC_ABOUT_AUTHORS_LISTBOX
static void *static void *static LPDIRECTPLAY IUnknown * pUnk
_Out_opt_ PICONINFO IconInfo
#define HeapFree(x, y, z)
#define RegCloseKey(hKey)
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)
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
#define HKEY_LOCAL_MACHINE
#define IMAGE_SUBSYSTEM_WINDOWS_GUI