43 ERR(
"RtlDosPathNameToNtPathName_U failed\n");
61 ERR(
"NtOpenFile failed for %S (Status 0x%08lx)\n", PathBuffer,
Status);
74 ERR(
"NtQueryInformationFile failed for %S (Status: %08lX)\n", PathBuffer,
Status);
87 WARN(
"GetFileVersionInfoSize %ls failed\n", pwszPath);
94 ERR(
"HeapAlloc failed bytes %x\n", cbInfo);
100 ERR(
"GetFileVersionInfoW failed\n");
108 ERR(
"VerQueryValueW failed\n");
146 ERR(
"VerQueryValueW %ls failed\n", pwszName);
148 TRACE(
"%ls: %ls\n", pwszName, pwszResult);
173 ERR(
"VerLanguageNameW failed\n");
187 WCHAR wszDecimalSep[8], wszThousandSep[8];
198 WCHAR wszGrouping[12];
205 for (
INT i = 0;
i < cchGrouping;
i++)
207 WCHAR wch = wszGrouping[
i];
209 if (wch >=
L'0' && wch <=
L'9')
211 else if (wch !=
L';')
232 return cchResult - 1;
244 LPWSTR pwszEnd = pwszResult + cchWritten;
245 size_t cchRemaining = cchResultMax - cchWritten;
248 cchRemaining -= cchWritten;
250 return cchResultMax - cchRemaining;
278 LPWSTR pwszEnd = pwszResult + cchWritten;
279 size_t cchRemaining = cchResultMax - cchWritten;
284 pwszEnd += cchWritten;
285 cchRemaining -= cchWritten;
311 Page.pfnDlgProc = pfnDlgProc;
313 Page.pszTitle = pwszTitle;
333 StringCbCatW(wszBuf,
sizeof(wszBuf),
L"\\shell\\open\\command");
349 RECT rcIcon, rcDescr;
360 rcDescr.
left + cxOffset, rcDescr.
top,
365 ERR(
"Failed to extract icon\n");
371 VerInfo.
Load(wszPath);
380 pwszFilename[0] =
towupper(pwszFilename[0]);
387 WARN(
"RegGetValueW %ls failed\n", wszBuf);
389 WARN(
"RegGetValueW %ls failed\n", pwszExt);
415 if (hDlgCtrl ==
NULL)
435 size_t cchRemaining = 0;
506 size_t cchRemaining = cchResult;
507 LPWSTR pwszEnd = pwszResult;
512 ERR(
"GetDateFormatW failed\n");
513 cchRemaining -= cchWritten;
514 pwszEnd += cchWritten;
522 ERR(
"GetTimeFormatW failed\n");
616 ERR(
"Unreliable size on disk\n");
630 data->hwndDlg = hwndDlg;
644 WCHAR wszFormat[256];
685 RECT rectIdol, rectToAdjust;
732 TRACE(
"WM_INITDIALOG hwnd %p lParam %p ppsplParam %S\n", hwndDlg,
lParam, ppsp->
lParam);
736 pFileDefExt->InitGeneralPage(hwndDlg);
780 ERR(
"SetFileAttributesW failed\n");
787 UINT cchFilenameMax =
_countof(wszBuf) - (pwszFilename - wszBuf);
791 ERR(
"MoveFileW failed\n");
833 WCHAR wszVersion[256];
892 if (hwndDlg ==
NULL || pwszName ==
NULL)
919 if (hwndDlg ==
NULL || pwszName ==
NULL)
952 if (ppsp ==
NULL || !ppsp->lParam)
955 TRACE(
"WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg,
lParam, ppsp->lParam);
970 if (pwszData ==
NULL)
973 CString
str(pwszData);
1012 if (ppsp ==
NULL || !ppsp->lParam)
1015 TRACE(
"WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg,
lParam, ppsp->lParam);
1017 pFileDefExt =
reinterpret_cast<CFileDefExt *
>(ppsp->lParam);
1241 m_bDir(
FALSE), m_cFiles(0), m_cFolders(0)
1265 TRACE(
"%p %p %p %p\n",
this, pidlFolder, pDataObj, hkeyProgID);
1272 format.dwAspect = DVASPECT_CONTENT;
1274 format.tymed = TYMED_HGLOBAL;
1282 ERR(
"DragQueryFileW failed\n");
1329 pfnAddPage(hPage,
lParam);
1338 pfnAddPage(hPage,
lParam);
1348 pfnAddPage(hPage,
lParam);
1383 data->This->Release();
1393 CString sBuf = pwszBuf;
1395 CString sSearch = sBuf;
1403 ERR(
"FindFirstFileW %ls failed\n", sSearch.GetString());
1416 sFileName += wfd.cFileName;
1420 if (!
wcscmp(wfd.cFileName,
L".") || !
wcscmp(wfd.cFileName,
L".."))
1433 FileSize.
u.HighPart = wfd.nFileSizeHigh;
1437 ERR(
"GetPhysicalFileSize failed for %ls\n", sFileName.GetString());
1454 WCHAR wszFormat[100];
1476 WCHAR wszFormat[100];
#define shell32_hInstance
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
static INT_PTR CALLBACK VersionPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHOD() ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override
static BOOL GetFileTimeString(LPFILETIME lpFileTime, LPWSTR pwszResult, UINT cchResult)
BOOL InitFileAttr(HWND hwndDlg)
void OnFolderCustDestroy(HWND hwndDlg)
BOOL InitFileType(HWND hwndDlg)
WCHAR m_szFolderIconPath[MAX_PATH]
VOID InitOpensWithField(HWND hwndDlg)
BOOL InitVersionPage(HWND hwndDlg)
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpici) override
static INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void UpdateFolderIcon(HWND hwndDlg)
BOOL OnFolderCustApply(HWND hwndDlg)
BOOL InitFilePath(HWND hwndDlg)
BOOL InitFolderCustomizePage(HWND hwndDlg)
ULARGE_INTEGER m_DirSizeOnDisc
STDMETHOD() SetSite(IUnknown *punk) override
STDMETHOD() AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override
WCHAR m_wszPath[MAX_PATH]
static INT_PTR CALLBACK FolderCustomizePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
void OnFolderCustChangeIcon(HWND hwndDlg)
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override
STDMETHOD() GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override
BOOL InitGeneralPage(HWND hwndDlg)
CFileVersionInfo m_VerInfo
BOOL CountFolderAndFiles(HWND hwndDlg, LPCWSTR pwszBuf, LPDWORD ticks)
BOOL AddVersionString(HWND hwndDlg, LPCWSTR pwszName)
STDMETHOD() QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override
STDMETHOD() GetSite(REFIID iid, void **ppvSite) override
BOOL SetVersionLabel(HWND hwndDlg, DWORD idCtrl, LPCWSTR pwszName)
static DWORD WINAPI _CountFolderAndFilesThreadProc(LPVOID lpParameter)
BOOL Load(LPCWSTR pwszPath)
LPCWSTR GetString(LPCWSTR pwszName)
VS_FIXEDFILEINFO * GetFixedInfo()
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
#define NT_SUCCESS(StatCode)
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define FAILED_UNEXPECTEDLY(hr)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation)
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI FindClose(HANDLE hFindFile)
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
DWORD WINAPI GetTickCount(VOID)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
UINT WINAPI GetPrivateProfileIntW(LPCWSTR section, LPCWSTR entry, INT def_val, LPCWSTR filename)
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
DWORD WINAPI VerLanguageNameW(DWORD wLang, LPWSTR szLang, DWORD nSize)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
BOOL WINAPI PickIconDlg(HWND hWndOwner, LPWSTR lpstrFile, UINT nMaxFile, INT *lpdwIconIndex)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
HPROPSHEETPAGE SH_CreatePropertySheetPage(LPCSTR resname, DLGPROC dlgproc, LPARAM lParam, LPWSTR szTitle)
struct _FileName FileName
static const WCHAR s_szShellClassInfo[]
UINT SH_FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
HPROPSHEETPAGE SH_CreatePropertySheetPage(WORD wDialogId, DLGPROC pfnDlgProc, LPARAM lParam, LPCWSTR pwszTitle)
LPWSTR SH_FormatFileSizeWithBytes(const PULARGE_INTEGER lpQwSize, LPWSTR pwszResult, UINT cchResultMax)
EXTERN_C BOOL PathIsExeW(LPCWSTR lpszPath)
static const WCHAR s_szIconFile[]
UINT SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax)
BOOL GetPhysicalFileSize(LPCWSTR PathBuffer, PULARGE_INTEGER Size)
static const WCHAR s_szIconResource[]
static const WCHAR s_szIconIndex[]
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
#define FILE_SYNCHRONOUS_IO_NONALERT
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
static OUT PIO_STATUS_BLOCK IoStatusBlock
#define InitializeObjectAttributes(p, n, a, r, s)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
struct _PSP * HPROPSHEETPAGE
unsigned __int3264 UINT_PTR
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
NTSYSAPI NTSTATUS NTAPI NtOpenFile(OUT PHANDLE phFile, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK pIoStatusBlock, IN ULONG ShareMode, IN ULONG OpenMode)
#define FILE_ATTRIBUTE_READONLY
#define FILE_READ_ATTRIBUTES
#define FILE_ATTRIBUTE_HIDDEN
#define FILE_ATTRIBUTE_SYSTEM
NTSYSAPI NTSTATUS NTAPI NtQueryInformationFile(IN HANDLE hFile, OUT PIO_STATUS_BLOCK pIoStatusBlock, OUT PVOID FileInformationBuffer, IN ULONG FileInformationBufferLength, IN FILE_INFORMATION_CLASS FileInfoClass)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
#define FILE_ATTRIBUTE_ARCHIVE
#define FILE_ATTRIBUTE_DIRECTORY
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define LOCALE_USER_DEFAULT
_In_ PVOID _Out_opt_ BOOLEAN _Out_opt_ PPFN_NUMBER Page
#define FileStandardInformation
#define PSNRET_INVALID_NOCHANGEPAGE
#define PropSheet_Changed(d, w)
#define PropSheet_QuerySiblings(d, w, l)
struct _PROPSHEETPAGEW PROPSHEETPAGEW
struct _PROPSHEETPAGEW * LPPROPSHEETPAGEW
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
struct _PSHNOTIFY * LPPSHNOTIFY
#define PSM_QUERYSIBLINGS
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define SUBLANG_ENGLISH_US
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
@ OAIF_FORCE_REGISTRATION
#define PathRemoveExtension
#define PathSearchAndQualify
#define IDC_FOLDERCUST_CHANGE_ICON
#define IDD_FILE_PROPERTIES
#define IDC_FOLDERCUST_CHECKBOX
#define IDC_FOLDERCUST_COMBOBOX
#define IDC_FOLDERCUST_RESTORE_DEFAULTS
#define IDD_FOLDER_CUSTOMIZE
#define IDC_FOLDERCUST_ICON
#define IDS_EXE_DESCRIPTION
#define IDD_FOLDER_PROPERTIES
#define IDC_FOLDERCUST_CHOOSE_PIC
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags)
STRSAFEAPI StringCchPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
OPEN_AS_INFO_FLAGS oaifInFlags
struct _LARGE_INTEGER::@2299 u
#define VS_FF_SPECIALBUILD
#define VS_FF_PRIVATEBUILD
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetLastError(void)
#define HKEY_CLASSES_ROOT
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define MAKEINTRESOURCEW(i)
#define SendDlgItemMessage
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyIcon(_In_ HICON)