ReactOS 0.4.16-dev-980-g00983aa
filedefext.cpp
Go to the documentation of this file.
1/*
2 * Provides default file shell extension
3 *
4 * Copyright 2005 Johannes Anderwald
5 * Copyright 2012 Rafal Harabien
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "precomp.h"
23
24#define NTOS_MODE_USER
25#include <ndk/iofuncs.h>
26#include <ndk/obfuncs.h>
27
29
31
33{
40
42 {
43 ERR("RtlDosPathNameToNtPathName_U failed\n");
44 return FALSE;
45 }
46
48 &FileName,
50 NULL,
51 NULL);
59 if (!NT_SUCCESS(Status))
60 {
61 ERR("NtOpenFile failed for %S (Status 0x%08lx)\n", PathBuffer, Status);
62 return FALSE;
63 }
64
65 /* Query the file size */
68 &FileInfo,
69 sizeof(FileInfo),
72 if (!NT_SUCCESS(Status))
73 {
74 ERR("NtQueryInformationFile failed for %S (Status: %08lX)\n", PathBuffer, Status);
75 return FALSE;
76 }
77
78 Size->QuadPart = FileInfo.AllocationSize.QuadPart;
79 return TRUE;
80}
81
83{
84 ULONG cbInfo = GetFileVersionInfoSizeW(pwszPath, NULL);
85 if (!cbInfo)
86 {
87 WARN("GetFileVersionInfoSize %ls failed\n", pwszPath);
88 return FALSE;
89 }
90
92 if (!m_pInfo)
93 {
94 ERR("HeapAlloc failed bytes %x\n", cbInfo);
95 return FALSE;
96 }
97
98 if (!GetFileVersionInfoW(pwszPath, 0, cbInfo, m_pInfo))
99 {
100 ERR("GetFileVersionInfoW failed\n");
101 return FALSE;
102 }
103
104 LPLANGANDCODEPAGE lpLangCode;
105 UINT cBytes;
106 if (!VerQueryValueW(m_pInfo, L"\\VarFileInfo\\Translation", (LPVOID *)&lpLangCode, &cBytes) || cBytes < sizeof(LANGANDCODEPAGE))
107 {
108 ERR("VerQueryValueW failed\n");
109 return FALSE;
110 }
111
112 /* FIXME: find language from current locale / if not available,
113 * default to english
114 * for now default to first available language
115 */
116 m_wLang = lpLangCode->wLang;
117 m_wCode = lpLangCode->wCode;
118 TRACE("Lang %hx Code %hu\n", m_wLang, m_wCode);
119
120 return TRUE;
121}
122
124{
125 if (!m_pInfo)
126 return NULL;
127
128 WCHAR wszBuf[256];
129 swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", m_wLang, m_wCode, pwszName);
130
131 /* Query string in version block */
132 LPCWSTR pwszResult = NULL;
133 UINT cBytes = 0;
134 if (!VerQueryValueW(m_pInfo, wszBuf, (LPVOID *)&pwszResult, &cBytes))
135 pwszResult = NULL;
136
137 if (!pwszResult)
138 {
139 /* Try US English */
140 swprintf(wszBuf, L"\\StringFileInfo\\%04x%04x\\%s", MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), 1252, pwszName);
141 if (!VerQueryValueW(m_pInfo, wszBuf, (LPVOID *)&pwszResult, &cBytes))
142 pwszResult = NULL;
143 }
144
145 if (!pwszResult)
146 ERR("VerQueryValueW %ls failed\n", pwszName);
147 else
148 TRACE("%ls: %ls\n", pwszName, pwszResult);
149
150 return pwszResult;
151}
152
154{
155 if (!m_pInfo)
156 return NULL;
157
158 VS_FIXEDFILEINFO *pInfo;
159 UINT cBytes;
160 if (!VerQueryValueW(m_pInfo, L"\\", (PVOID*)&pInfo, &cBytes))
161 return NULL;
162 return pInfo;
163}
164
166{
167 if (!m_pInfo)
168 return NULL;
169
170 if (!m_wszLang[0])
171 {
173 ERR("VerLanguageNameW failed\n");
174 }
175
176 return m_wszLang;
177}
178
179UINT
180SH_FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
181{
182 // Print the number in uniform mode
183 WCHAR wszNumber[24];
184 swprintf(wszNumber, L"%I64u", Num);
185
186 // Get system strings for decimal and thousand separators.
187 WCHAR wszDecimalSep[8], wszThousandSep[8];
188 GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, wszDecimalSep, _countof(wszDecimalSep));
189 GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, wszThousandSep, _countof(wszThousandSep));
190
191 // Initialize format for printing the number in bytes
192 NUMBERFMTW nf;
193 ZeroMemory(&nf, sizeof(nf));
194 nf.lpDecimalSep = wszDecimalSep;
195 nf.lpThousandSep = wszThousandSep;
196
197 // Get system string for groups separator
198 WCHAR wszGrouping[12];
201 wszGrouping,
202 _countof(wszGrouping));
203
204 // Convert grouping specs from string to integer
205 for (INT i = 0; i < cchGrouping; i++)
206 {
207 WCHAR wch = wszGrouping[i];
208
209 if (wch >= L'0' && wch <= L'9')
210 nf.Grouping = nf.Grouping * 10 + (wch - L'0');
211 else if (wch != L';')
212 break;
213 }
214
215 if ((nf.Grouping % 10) == 0)
216 nf.Grouping /= 10;
217 else
218 nf.Grouping *= 10;
219
220 // Format the number
222 0,
223 wszNumber,
224 &nf,
225 pwszResult,
226 cchResultMax);
227
228 if (!cchResult)
229 return 0;
230
231 // GetNumberFormatW returns number of characters including UNICODE_NULL
232 return cchResult - 1;
233}
234
235UINT
236SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax)
237{
238 /* Write formated bytes count */
239 INT cchWritten = SH_FormatInteger(cbSize, pwszResult, cchResultMax);
240 if (!cchWritten)
241 return 0;
242
243 /* Copy " bytes" to buffer */
244 LPWSTR pwszEnd = pwszResult + cchWritten;
245 size_t cchRemaining = cchResultMax - cchWritten;
246 StringCchCopyExW(pwszEnd, cchRemaining, L" ", &pwszEnd, &cchRemaining, 0);
247 cchWritten = LoadStringW(shell32_hInstance, IDS_BYTES_FORMAT, pwszEnd, cchRemaining);
248 cchRemaining -= cchWritten;
249
250 return cchResultMax - cchRemaining;
251}
252
253/*************************************************************************
254 *
255 * SH_FormatFileSizeWithBytes
256 *
257 * Format a size in bytes to string.
258 *
259 * lpQwSize = Pointer to 64bit large integer to format
260 * pszBuf = Buffer to fill with output string
261 * cchBuf = size of pszBuf in characters
262 *
263 */
264
265LPWSTR
266SH_FormatFileSizeWithBytes(const PULARGE_INTEGER lpQwSize, LPWSTR pwszResult, UINT cchResultMax)
267{
268 /* Format bytes in KBs, MBs etc */
269 if (StrFormatByteSizeW(lpQwSize->QuadPart, pwszResult, cchResultMax) == NULL)
270 return NULL;
271
272 /* If there is less bytes than 1KB, we have nothing to do */
273 if (lpQwSize->QuadPart < 1024)
274 return pwszResult;
275
276 /* Concatenate " (" */
277 UINT cchWritten = wcslen(pwszResult);
278 LPWSTR pwszEnd = pwszResult + cchWritten;
279 size_t cchRemaining = cchResultMax - cchWritten;
280 StringCchCopyExW(pwszEnd, cchRemaining, L" (", &pwszEnd, &cchRemaining, 0);
281
282 /* Write formated bytes count */
283 cchWritten = SH_FormatByteSize(lpQwSize->QuadPart, pwszEnd, cchRemaining);
284 pwszEnd += cchWritten;
285 cchRemaining -= cchWritten;
286
287 /* Copy ")" to the buffer */
288 StringCchCopyW(pwszEnd, cchRemaining, L")");
289
290 return pwszResult;
291}
292
293VOID
295{
296 WCHAR wszBuf[MAX_PATH] = L"";
297 WCHAR wszPath[MAX_PATH] = L"";
298 DWORD dwSize = sizeof(wszBuf);
299 BOOL bUnknownApp = TRUE;
301
302 // TODO: Use ASSOCSTR_EXECUTABLE with ASSOCF_REMAPRUNDLL | ASSOCF_IGNOREBASECLASS
303 if (RegGetValueW(HKEY_CLASSES_ROOT, pwszExt, L"", RRF_RT_REG_SZ, NULL, wszBuf, &dwSize) == ERROR_SUCCESS)
304 {
305 bUnknownApp = FALSE;
306 StringCbCatW(wszBuf, sizeof(wszBuf), L"\\shell\\open\\command");
307 dwSize = sizeof(wszPath);
308 // FIXME: Missing FileExt check, see COpenWithList::SetDefaultHandler for details
309 // FIXME: Use HCR_GetDefaultVerbW to find the default verb
310 if (RegGetValueW(HKEY_CLASSES_ROOT, wszBuf, L"", RRF_RT_REG_SZ, NULL, wszPath, &dwSize) == ERROR_SUCCESS)
311 {
312 /* Get path from command line */
313 ExpandEnvironmentStringsW(wszPath, wszBuf, _countof(wszBuf));
314 if (SHELL32_GetDllFromRundll32CommandLine(wszBuf, wszBuf, _countof(wszBuf)) != S_OK)
315 {
316 PathRemoveArgs(wszBuf);
317 PathUnquoteSpacesW(wszBuf);
318 }
319 PathSearchAndQualify(wszBuf, wszPath, _countof(wszPath));
320
321 HICON hIcon;
322 if (ExtractIconExW(wszPath, 0, NULL, &hIcon, 1))
323 {
324 HWND hIconCtrl = GetDlgItem(hwndDlg, 14025);
325 HWND hDescrCtrl = GetDlgItem(hwndDlg, 14007);
326 ShowWindow(hIconCtrl, SW_SHOW);
327 RECT rcIcon, rcDescr;
328 GetWindowRect(hIconCtrl, &rcIcon);
329
330 rcIcon.right = rcIcon.left + GetSystemMetrics(SM_CXSMICON);
331 rcIcon.bottom = rcIcon.top + GetSystemMetrics(SM_CYSMICON);
332
333 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcIcon, 2);
334 GetWindowRect(hDescrCtrl, &rcDescr);
335 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcDescr, 2);
336 INT cxOffset = rcIcon.right + 2 - rcDescr.left;
337 SetWindowPos(hDescrCtrl, NULL,
338 rcDescr.left + cxOffset, rcDescr.top,
339 rcDescr.right - rcDescr.left - cxOffset, rcDescr.bottom - rcDescr.top,
341 SendMessageW(hIconCtrl, STM_SETICON, (WPARAM)hIcon, 0);
342 } else
343 ERR("Failed to extract icon\n");
344
345 if (PathFileExistsW(wszPath))
346 {
347 /* Get file description */
348 CFileVersionInfo VerInfo;
349 VerInfo.Load(wszPath);
350 LPCWSTR pwszDescr = VerInfo.GetString(L"FileDescription");
351 if (pwszDescr)
352 SetDlgItemTextW(hwndDlg, 14007, pwszDescr);
353 else
354 {
355 /* File has no description - display filename */
356 LPWSTR pwszFilename = PathFindFileNameW(wszPath);
357 PathRemoveExtension(pwszFilename);
358 pwszFilename[0] = towupper(pwszFilename[0]);
359 SetDlgItemTextW(hwndDlg, 14007, pwszFilename);
360 }
361 }
362 else
363 bUnknownApp = TRUE;
364 } else
365 WARN("RegGetValueW %ls failed\n", wszBuf);
366 } else
367 WARN("RegGetValueW %ls failed\n", pwszExt);
368
369 if (bUnknownApp)
370 {
371 /* Unknown application */
373 SetDlgItemTextW(hwndDlg, 14007, wszBuf);
374 }
375}
376
377/*************************************************************************
378 *
379 * SH_FileGeneralFileType [Internal]
380 *
381 * retrieves file extension description from registry and sets it in dialog
382 *
383 * TODO: retrieve file extension default icon and load it
384 * find executable name from registry, retrieve description from executable
385 */
386
387BOOL
389{
390 TRACE("path %s\n", debugstr_w(m_wszPath));
391
392 HWND hDlgCtrl = GetDlgItem(hwndDlg, 14005);
393 if (hDlgCtrl == NULL)
394 return FALSE;
395
396 /* Get file information */
397 SHFILEINFOW fi;
398 if (!SHGetFileInfoW(m_wszPath, 0, &fi, sizeof(fi), SHGFI_TYPENAME|SHGFI_ICON))
399 {
400 ERR("SHGetFileInfoW failed for %ls (%lu)\n", m_wszPath, GetLastError());
401 fi.szTypeName[0] = L'\0';
402 fi.hIcon = NULL;
403 }
404
406 if (pwszExt[0])
407 {
408 WCHAR wszBuf[256];
409
410 if (!fi.szTypeName[0])
411 {
412 /* The file type is unknown, so default to string "FileExtension File" */
413 size_t cchRemaining = 0;
414 LPWSTR pwszEnd = NULL;
415
416 StringCchPrintfExW(wszBuf, _countof(wszBuf), &pwszEnd, &cchRemaining, 0, L"%s ", pwszExt + 1);
417 SendMessageW(hDlgCtrl, WM_GETTEXT, (WPARAM)cchRemaining, (LPARAM)pwszEnd);
418
419 SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wszBuf);
420 }
421 else
422 {
423 /* Update file type */
424 StringCbPrintfW(wszBuf, sizeof(wszBuf), L"%s (%s)", fi.szTypeName, pwszExt);
425 SendMessageW(hDlgCtrl, WM_SETTEXT, (WPARAM)NULL, (LPARAM)wszBuf);
426 }
427 }
428
429 /* Update file icon */
430 if (fi.hIcon)
431 SendDlgItemMessageW(hwndDlg, 14000, STM_SETICON, (WPARAM)fi.hIcon, 0);
432 else
433 ERR("No icon %ls\n", m_wszPath);
434
435 return TRUE;
436}
437
438/*************************************************************************
439 *
440 * CFileDefExt::InitFilePath [Internal]
441 *
442 * sets file path string and filename string
443 *
444 */
445
446BOOL
448{
449 /* Find the filename */
450 WCHAR *pwszFilename = PathFindFileNameW(m_wszPath);
451
452 if (pwszFilename > m_wszPath)
453 {
454 /* Location field */
455 WCHAR wszLocation[MAX_PATH];
456 StringCchCopyNW(wszLocation, _countof(wszLocation), m_wszPath, pwszFilename - m_wszPath);
457 PathRemoveBackslashW(wszLocation);
458
459 SetDlgItemTextW(hwndDlg, 14009, wszLocation);
460 }
461
462 /* Filename field */
463 SetDlgItemTextW(hwndDlg, 14001, pwszFilename);
464
465 return TRUE;
466}
467
468/*************************************************************************
469 *
470 * CFileDefExt::GetFileTimeString [Internal]
471 *
472 * formats a given LPFILETIME struct into readable user format
473 */
474
475BOOL
476CFileDefExt::GetFileTimeString(LPFILETIME lpFileTime, LPWSTR pwszResult, UINT cchResult)
477{
478 FILETIME ft;
479 SYSTEMTIME st;
480
481 if (!FileTimeToLocalFileTime(lpFileTime, &ft) || !FileTimeToSystemTime(&ft, &st))
482 return FALSE;
483
484 size_t cchRemaining = cchResult;
485 LPWSTR pwszEnd = pwszResult;
486 int cchWritten = GetDateFormatW(LOCALE_USER_DEFAULT, DATE_LONGDATE, &st, NULL, pwszEnd, cchRemaining);
487 if (cchWritten)
488 --cchWritten; // GetDateFormatW returns count with terminating zero
489 else
490 ERR("GetDateFormatW failed\n");
491 cchRemaining -= cchWritten;
492 pwszEnd += cchWritten;
493
494 StringCchCopyExW(pwszEnd, cchRemaining, L", ", &pwszEnd, &cchRemaining, 0);
495
496 cchWritten = GetTimeFormatW(LOCALE_USER_DEFAULT, 0, &st, NULL, pwszEnd, cchRemaining);
497 if (cchWritten)
498 --cchWritten; // GetTimeFormatW returns count with terminating zero
499 else
500 ERR("GetTimeFormatW failed\n");
501 TRACE("result %s\n", debugstr_w(pwszResult));
502 return TRUE;
503}
504
505/*************************************************************************
506 *
507 * CFileDefExt::InitFileAttr [Internal]
508 *
509 * retrieves file information from file and sets in dialog
510 *
511 */
512
513BOOL
515{
517 WIN32_FIND_DATAW FileInfo; // WIN32_FILE_ATTRIBUTE_DATA
518 WCHAR wszBuf[MAX_PATH];
519
520 TRACE("InitFileAttr %ls\n", m_wszPath);
521
522 /*
523 * There are situations where GetFileAttributes(Ex) can fail even if the
524 * specified path represents a file. This happens when e.g. the file is a
525 * locked system file, such as C:\pagefile.sys . In this case, the function
526 * returns INVALID_FILE_ATTRIBUTES and GetLastError returns ERROR_SHARING_VIOLATION.
527 * (this would allow us to distinguish between this failure and a failure
528 * due to the fact that the path actually refers to a directory).
529 *
530 * Because we really want to retrieve the file attributes/size/date&time,
531 * we do the following trick:
532 * - First we call GetFileAttributesEx. If it succeeds we know we have
533 * a file or a directory, and we have retrieved its attributes.
534 * - If GetFileAttributesEx fails, we call FindFirstFile on the full path.
535 * While we could have called FindFirstFile at first and skip GetFileAttributesEx
536 * altogether, we do it after GetFileAttributesEx because it performs more
537 * work to retrieve the file attributes. However it actually works even
538 * for locked system files.
539 * - If FindFirstFile succeeds we have retrieved its attributes.
540 * - Otherwise (FindFirstFile has failed), we do not retrieve anything.
541 *
542 * The following code also relies on the fact that the first 6 members
543 * of WIN32_FIND_DATA are *exactly* the same as the WIN32_FILE_ATTRIBUTE_DATA
544 * structure. Therefore it is safe to use a single WIN32_FIND_DATA
545 * structure for both the GetFileAttributesEx and FindFirstFile calls.
546 */
547
551 if (!Success)
552 {
554 Success = (hFind != INVALID_HANDLE_VALUE);
555 if (Success)
556 FindClose(hFind);
557 }
558
559 if (Success)
560 {
561 /* Update attribute checkboxes */
562 if (FileInfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
563 SendDlgItemMessage(hwndDlg, 14021, BM_SETCHECK, BST_CHECKED, 0);
564 if (FileInfo.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
565 SendDlgItemMessage(hwndDlg, 14022, BM_SETCHECK, BST_CHECKED, 0);
566 if (FileInfo.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE)
567 SendDlgItemMessage(hwndDlg, 14023, BM_SETCHECK, BST_CHECKED, 0);
568
569 /* Update creation time */
570 if (GetFileTimeString(&FileInfo.ftCreationTime, wszBuf, _countof(wszBuf)))
571 SetDlgItemTextW(hwndDlg, 14015, wszBuf);
572
573 /* For files display last access and last write time */
574 if (!m_bDir)
575 {
576 if (GetFileTimeString(&FileInfo.ftLastAccessTime, wszBuf, _countof(wszBuf)))
577 SetDlgItemTextW(hwndDlg, 14019, wszBuf);
578
579 if (GetFileTimeString(&FileInfo.ftLastWriteTime, wszBuf, _countof(wszBuf)))
580 SetDlgItemTextW(hwndDlg, 14017, wszBuf);
581
582 /* Update size of file */
584 FileSize.u.LowPart = FileInfo.nFileSizeLow;
585 FileSize.u.HighPart = FileInfo.nFileSizeHigh;
586 if (SH_FormatFileSizeWithBytes(&FileSize, wszBuf, _countof(wszBuf)))
587 {
588 SetDlgItemTextW(hwndDlg, 14011, wszBuf);
589
590 // Compute file on disk. If fails, use logical size
593 else
594 ERR("Unreliable size on disk\n");
595
596 SetDlgItemTextW(hwndDlg, 14012, wszBuf);
597 }
598 }
599 }
600
601 if (m_bDir)
602 {
603 /* For directories files have to be counted */
604
606 data->This = this;
607 data->pwszBuf = static_cast<LPWSTR>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR) * MAX_PATH));
608 data->hwndDlg = hwndDlg;
609 this->AddRef();
611
613
614 /* Update size field */
615 if (SH_FormatFileSizeWithBytes(&m_DirSize, wszBuf, _countof(wszBuf)))
616 SetDlgItemTextW(hwndDlg, 14011, wszBuf);
617
619 SetDlgItemTextW(hwndDlg, 14012, wszBuf);
620
621 /* Display files and folders count */
622 WCHAR wszFormat[256];
623 LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, wszFormat, _countof(wszFormat));
624 StringCchPrintfW(wszBuf, _countof(wszBuf), wszFormat, m_cFiles, m_cFolders);
625 SetDlgItemTextW(hwndDlg, 14027, wszBuf);
626 }
627
628 /* Hide Advanced button. TODO: Implement advanced dialog and enable this button if filesystem supports compression or encryption */
629 ShowWindow(GetDlgItem(hwndDlg, 14028), SW_HIDE);
630
631 return TRUE;
632}
633
634/*************************************************************************
635 *
636 * CFileDefExt::InitGeneralPage [Internal]
637 *
638 * sets all file general properties in dialog
639 */
640
641BOOL
643{
644 /* Set general text properties filename filelocation and icon */
645 InitFilePath(hwndDlg);
646
647 /* Set file type and icon */
648 InitFileType(hwndDlg);
649
650 /* Set open with application */
651 if (!m_bDir)
652 {
653 if (!PathIsExeW(m_wszPath))
654 InitOpensWithField(hwndDlg);
655 else
656 {
657 WCHAR wszBuf[MAX_PATH];
659 SetDlgItemTextW(hwndDlg, 14006, wszBuf);
660 ShowWindow(GetDlgItem(hwndDlg, 14024), SW_HIDE);
661
662 /* hidden button 14024 allows to draw edit 14007 larger than defined in resources , we use edit 14009 as idol */
663 RECT rectIdol, rectToAdjust;
664 GetClientRect(GetDlgItem(hwndDlg, 14009), &rectIdol);
665 GetClientRect(GetDlgItem(hwndDlg, 14007), &rectToAdjust);
666 SetWindowPos(GetDlgItem(hwndDlg, 14007), HWND_TOP, 0, 0,
667 rectIdol.right-rectIdol.left /* make it as wide as its idol */,
668 rectToAdjust.bottom-rectToAdjust.top /* but keep its current height */,
670
671 LPCWSTR pwszDescr = m_VerInfo.GetString(L"FileDescription");
672 if (pwszDescr)
673 SetDlgItemTextW(hwndDlg, 14007, pwszDescr);
674 else
675 {
676 StringCbCopyW(wszBuf, sizeof(wszBuf), PathFindFileNameW(m_wszPath));
677 PathRemoveExtension(wszBuf);
678 SetDlgItemTextW(hwndDlg, 14007, wszBuf);
679 }
680 }
681 }
682
683 /* Set file created/modfied/accessed time, size and attributes */
684 InitFileAttr(hwndDlg);
685
686 return TRUE;
687}
688
689/*************************************************************************
690 *
691 * CFileDefExt::GeneralPageProc
692 *
693 * wnd proc of 'General' property sheet page
694 *
695 */
696
699{
700 CFileDefExt *pFileDefExt = reinterpret_cast<CFileDefExt *>(GetWindowLongPtr(hwndDlg, DWLP_USER));
701 switch (uMsg)
702 {
703 case WM_INITDIALOG:
704 {
706
707 if (ppsp == NULL || !ppsp->lParam)
708 break;
709
710 TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %S\n", hwndDlg, lParam, ppsp->lParam);
711
712 pFileDefExt = reinterpret_cast<CFileDefExt *>(ppsp->lParam);
713 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pFileDefExt);
714 pFileDefExt->InitGeneralPage(hwndDlg);
715 break;
716 }
717 case WM_COMMAND:
718 if (LOWORD(wParam) == 14024) /* Opens With - Change */
719 {
720 OPENASINFO oainfo;
721 oainfo.pcszFile = pFileDefExt->m_wszPath;
722 oainfo.pcszClass = NULL;
724 if (SHOpenWithDialog(hwndDlg, &oainfo) == S_OK)
725 {
726 pFileDefExt->InitGeneralPage(hwndDlg);
727 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
728 }
729 break;
730 }
731 else if (LOWORD(wParam) == 14021 || LOWORD(wParam) == 14022 || LOWORD(wParam) == 14023) /* checkboxes */
732 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
733 else if (LOWORD(wParam) == 14001) /* Name */
734 {
735 if (HIWORD(wParam) == EN_CHANGE)
736 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
737 }
738 break;
739 case WM_NOTIFY:
740 {
742 if (lppsn->hdr.code == PSN_APPLY)
743 {
744 /* Update attributes first */
745 DWORD dwAttr = GetFileAttributesW(pFileDefExt->m_wszPath);
746 if (dwAttr)
747 {
749
750 if (BST_CHECKED == SendDlgItemMessageW(hwndDlg, 14021, BM_GETCHECK, 0, 0))
751 dwAttr |= FILE_ATTRIBUTE_READONLY;
752 if (BST_CHECKED == SendDlgItemMessageW(hwndDlg, 14022, BM_GETCHECK, 0, 0))
753 dwAttr |= FILE_ATTRIBUTE_HIDDEN;
754 if (BST_CHECKED == SendDlgItemMessageW(hwndDlg, 14023, BM_GETCHECK, 0, 0))
755 dwAttr |= FILE_ATTRIBUTE_ARCHIVE;
756
757 if (!SetFileAttributesW(pFileDefExt->m_wszPath, dwAttr))
758 ERR("SetFileAttributesW failed\n");
759 }
760
761 /* Update filename now */
762 WCHAR wszBuf[MAX_PATH];
763 StringCchCopyW(wszBuf, _countof(wszBuf), pFileDefExt->m_wszPath);
764 LPWSTR pwszFilename = PathFindFileNameW(wszBuf);
765 UINT cchFilenameMax = _countof(wszBuf) - (pwszFilename - wszBuf);
766 if (GetDlgItemTextW(hwndDlg, 14001, pwszFilename, cchFilenameMax))
767 {
768 if (!MoveFileW(pFileDefExt->m_wszPath, wszBuf))
769 ERR("MoveFileW failed\n");
770 }
771
773 return TRUE;
774 }
775 break;
776 }
778 {
779 // reset icon
780 HWND hIconCtrl = GetDlgItem(hwndDlg, 14025);
781 HICON hIcon = (HICON)SendMessageW(hIconCtrl, STM_GETICON, 0, 0);
783 hIcon = NULL;
784 SendMessageW(hIconCtrl, STM_SETICON, (WPARAM)hIcon, 0);
785
786 // refresh the page
787 pFileDefExt->InitGeneralPage(hwndDlg);
788 return FALSE; // continue
789 }
790 default:
791 break;
792 }
793
794 return FALSE;
795}
796
797/*************************************************************************
798 *
799 * CFileDefExt::InitVersionPage [Internal]
800 *
801 * sets all file version properties in dialog
802 */
803
804BOOL
806{
807 /* Get fixed info */
809 if (pInfo)
810 {
811 WCHAR wszVersion[256];
812 swprintf(wszVersion, L"%u.%u.%u.%u", HIWORD(pInfo->dwFileVersionMS),
813 LOWORD(pInfo->dwFileVersionMS),
814 HIWORD(pInfo->dwFileVersionLS),
815 LOWORD(pInfo->dwFileVersionLS));
816 TRACE("MS %x LS %x ver %s \n", pInfo->dwFileVersionMS, pInfo->dwFileVersionLS, debugstr_w(wszVersion));
817 SetDlgItemTextW(hwndDlg, 14001, wszVersion);
818 }
819
820 /* Update labels */
821 SetVersionLabel(hwndDlg, 14003, L"FileDescription");
822 SetVersionLabel(hwndDlg, 14005, L"LegalCopyright");
823
824 /* Add items to listbox */
825 AddVersionString(hwndDlg, L"CompanyName");
826 LPCWSTR pwszLang = m_VerInfo.GetLangName();
827 if (pwszLang)
828 {
829 HWND hDlgCtrl = GetDlgItem(hwndDlg, 14009);
830 UINT Index = SendMessageW(hDlgCtrl, LB_ADDSTRING, (WPARAM)-1, (LPARAM)L"Language");
831 SendMessageW(hDlgCtrl, LB_SETITEMDATA, (WPARAM)Index, (LPARAM)(WCHAR *)pwszLang);
832 }
833 AddVersionString(hwndDlg, L"ProductName");
834 AddVersionString(hwndDlg, L"InternalName");
835 AddVersionString(hwndDlg, L"OriginalFilename");
836 AddVersionString(hwndDlg, L"FileVersion");
837 AddVersionString(hwndDlg, L"ProductVersion");
838 AddVersionString(hwndDlg, L"Comments");
839 AddVersionString(hwndDlg, L"LegalTrademarks");
840
841 if (pInfo && (pInfo->dwFileFlags & VS_FF_PRIVATEBUILD))
842 AddVersionString(hwndDlg, L"PrivateBuild");
843
844 if (pInfo && (pInfo->dwFileFlags & VS_FF_SPECIALBUILD))
845 AddVersionString(hwndDlg, L"SpecialBuild");
846
847 /* Attach file version to dialog window */
848 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this);
849
850 /* Select first item */
851 HWND hDlgCtrl = GetDlgItem(hwndDlg, 14009);
852 SendMessageW(hDlgCtrl, LB_SETCURSEL, 0, 0);
853 LPCWSTR pwszText = (LPCWSTR)SendMessageW(hDlgCtrl, LB_GETITEMDATA, (WPARAM)0, (LPARAM)NULL);
854 if (pwszText && pwszText != (LPCWSTR)LB_ERR)
855 SetDlgItemTextW(hwndDlg, 14010, pwszText);
856
857 return TRUE;
858}
859
860/*************************************************************************
861 *
862 * CFileDefExt::SetVersionLabel [Internal]
863 *
864 * retrieves a version string and uses it to set label text
865 */
866
867BOOL
869{
870 if (hwndDlg == NULL || pwszName == NULL)
871 return FALSE;
872
873 LPCWSTR pwszValue = m_VerInfo.GetString(pwszName);
874 if (pwszValue)
875 {
876 /* file description property */
877 TRACE("%s :: %s\n", debugstr_w(pwszName), debugstr_w(pwszValue));
878 SetDlgItemTextW(hwndDlg, idCtrl, pwszValue);
879 return TRUE;
880 }
881
882 return FALSE;
883}
884
885/*************************************************************************
886 *
887 * CFileDefExt::AddVersionString [Internal]
888 *
889 * retrieves a version string and adds it to listbox
890 */
891
892BOOL
894{
895 TRACE("pwszName %s, hwndDlg %p\n", debugstr_w(pwszName), hwndDlg);
896
897 if (hwndDlg == NULL || pwszName == NULL)
898 return FALSE;
899
900 LPCWSTR pwszValue = m_VerInfo.GetString(pwszName);
901 if (pwszValue)
902 {
903 /* listbox name property */
904 HWND hDlgCtrl = GetDlgItem(hwndDlg, 14009);
905 TRACE("%s :: %s\n", debugstr_w(pwszName), debugstr_w(pwszValue));
906 UINT Index = SendMessageW(hDlgCtrl, LB_ADDSTRING, (WPARAM) -1, (LPARAM)pwszName);
907 SendMessageW(hDlgCtrl, LB_SETITEMDATA, (WPARAM)Index, (LPARAM)(WCHAR *)pwszValue);
908 return TRUE;
909 }
910
911 return FALSE;
912}
913
914/*************************************************************************
915 *
916 * CFileDefExt::VersionPageProc
917 *
918 * wnd proc of 'Version' property sheet page
919 */
920
923{
924 switch (uMsg)
925 {
926 case WM_INITDIALOG:
927 {
929
930 if (ppsp == NULL || !ppsp->lParam)
931 break;
932
933 TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg, lParam, ppsp->lParam);
934
935 CFileDefExt *pFileDefExt = reinterpret_cast<CFileDefExt *>(ppsp->lParam);
936 return pFileDefExt->InitVersionPage(hwndDlg);
937 }
938 case WM_COMMAND:
939 if (LOWORD(wParam) == 14009 && HIWORD(wParam) == LBN_SELCHANGE)
940 {
941 HWND hDlgCtrl = (HWND)lParam;
942
944 if (Index == LB_ERR)
945 break;
946
948 if (pwszData == NULL)
949 break;
950
951 CString str(pwszData);
952 str.Trim();
953
954 TRACE("hDlgCtrl %x string %s\n", hDlgCtrl, debugstr_w(str));
955 SetDlgItemTextW(hwndDlg, 14010, str);
956
957 return TRUE;
958 }
959 break;
960 case WM_DESTROY:
961 break;
963 return FALSE; // continue
964 default:
965 break;
966 }
967
968 return FALSE;
969}
970
971/*************************************************************************/
972/* Folder Customize */
973
974static const WCHAR s_szShellClassInfo[] = L".ShellClassInfo";
975static const WCHAR s_szIconIndex[] = L"IconIndex";
976static const WCHAR s_szIconFile[] = L"IconFile";
977static const WCHAR s_szIconResource[] = L"IconResource";
978
979// IDD_FOLDER_CUSTOMIZE
982{
983 CFileDefExt *pFileDefExt = reinterpret_cast<CFileDefExt *>(GetWindowLongPtr(hwndDlg, DWLP_USER));
984 switch (uMsg)
985 {
986 case WM_INITDIALOG:
987 {
989
990 if (ppsp == NULL || !ppsp->lParam)
991 break;
992
993 TRACE("WM_INITDIALOG hwnd %p lParam %p ppsplParam %x\n", hwndDlg, lParam, ppsp->lParam);
994
995 pFileDefExt = reinterpret_cast<CFileDefExt *>(ppsp->lParam);
996 return pFileDefExt->InitFolderCustomizePage(hwndDlg);
997 }
998
999 case WM_COMMAND:
1000 switch (LOWORD(wParam))
1001 {
1003 pFileDefExt->OnFolderCustChangeIcon(hwndDlg);
1004 break;
1005
1007 // TODO:
1008 break;
1009
1011 // TODO:
1012 break;
1013 }
1014 break;
1015
1016 case WM_NOTIFY:
1017 {
1019 if (lppsn->hdr.code == PSN_APPLY)
1020 {
1021 // apply or not
1022 if (pFileDefExt->OnFolderCustApply(hwndDlg))
1023 {
1025 }
1026 else
1027 {
1029 }
1030 return TRUE;
1031 }
1032 break;
1033 }
1034
1035 case PSM_QUERYSIBLINGS:
1036 return FALSE; // continue
1037
1038 case WM_DESTROY:
1039 pFileDefExt->OnFolderCustDestroy(hwndDlg);
1040 break;
1041
1042 default:
1043 break;
1044 }
1045
1046 return FALSE;
1047}
1048
1049// IDD_FOLDER_CUSTOMIZE WM_DESTROY
1051{
1054
1055 /* Detach the object from dialog window */
1056 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)0);
1057}
1058
1060{
1061 // destroy icon if any
1062 if (m_hFolderIcon)
1063 {
1066 }
1067
1068 // create the icon
1069 if (m_szFolderIconPath[0] == 0 && m_nFolderIconIndex == 0)
1070 {
1071 // Windows ignores shell customization here and uses the default icon
1073 }
1074 else
1075 {
1077 }
1078
1079 // set icon
1081}
1082
1083// IDD_FOLDER_CUSTOMIZE WM_INITDIALOG
1085{
1086 /* Attach the object to dialog window */
1087 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)this);
1088
1093
1094 // build the desktop.ini file path
1097 PathAppendW(szIniFile, L"desktop.ini");
1098
1099 // desktop.ini --> m_szFolderIconPath, m_nFolderIconIndex
1100 m_szFolderIconPath[0] = 0;
1104 {
1106 }
1109 {
1111 }
1112
1113 // update icon
1114 UpdateFolderIcon(hwndDlg);
1115
1116 return TRUE;
1117}
1118
1119// IDD_FOLDER_CUSTOMIZE IDC_FOLDERCUST_CHANGE_ICON
1121{
1123 INT nIconIndex;
1124
1125 // m_szFolderIconPath, m_nFolderIconIndex --> szPath, nIconIndex
1126 if (m_szFolderIconPath[0])
1127 {
1129 nIconIndex = m_nFolderIconIndex;
1130 }
1131 else
1132 {
1133 szPath[0] = 0;
1134 nIconIndex = 0;
1135 }
1136
1137 // let the user choose the icon
1138 if (PickIconDlg(hwndDlg, szPath, _countof(szPath), &nIconIndex))
1139 {
1140 // changed
1142 PropSheet_Changed(GetParent(hwndDlg), hwndDlg);
1143
1144 // update
1146 m_nFolderIconIndex = nIconIndex;
1147 UpdateFolderIcon(hwndDlg);
1148 }
1149}
1150
1151// IDD_FOLDER_CUSTOMIZE PSN_APPLY
1153{
1154 // build the desktop.ini file path
1157 PathAppendW(szIniFile, L"desktop.ini");
1158
1159 if (m_bFolderIconIsSet) // it is set!
1160 {
1161 DWORD attrs;
1162
1163 // change folder attributes (-S -R)
1167
1168 // change desktop.ini attributes (-S -H -R)
1172
1173 if (m_szFolderIconPath[0])
1174 {
1175 // write IconFile and IconIndex
1177
1178 WCHAR szInt[32];
1179 StringCchPrintfW(szInt, _countof(szInt), L"%d", m_nFolderIconIndex);
1181
1182 // flush!
1184 }
1185 else
1186 {
1187 // erase three values
1191
1192 // flush!
1194 }
1195
1196 // change desktop.ini attributes (+S +H)
1200
1201 // change folder attributes (+R)
1203 attrs |= FILE_ATTRIBUTE_READONLY;
1205
1206 // notify to the siblings
1207 PropSheet_QuerySiblings(GetParent(hwndDlg), 0, 0);
1208
1209 // done!
1211 }
1212
1213 return TRUE;
1214}
1215
1216/*****************************************************************************/
1217
1219 m_bDir(FALSE), m_cFiles(0), m_cFolders(0)
1220{
1221 m_wszPath[0] = L'\0';
1222 m_DirSize.QuadPart = 0ull;
1224
1225 m_szFolderIconPath[0] = 0;
1229}
1230
1232{
1233
1234}
1235
1238{
1239 FORMATETC format;
1240 STGMEDIUM stgm;
1241 HRESULT hr;
1242
1243 TRACE("%p %p %p %p\n", this, pidlFolder, pDataObj, hkeyProgID);
1244
1245 if (!pDataObj)
1246 return E_FAIL;
1247
1248 format.cfFormat = CF_HDROP;
1249 format.ptd = NULL;
1250 format.dwAspect = DVASPECT_CONTENT;
1251 format.lindex = -1;
1252 format.tymed = TYMED_HGLOBAL;
1253
1254 hr = pDataObj->GetData(&format, &stgm);
1256 return hr;
1257
1258 if (!DragQueryFileW((HDROP)stgm.hGlobal, 0, m_wszPath, _countof(m_wszPath)))
1259 {
1260 ERR("DragQueryFileW failed\n");
1261 ReleaseStgMedium(&stgm);
1262 return E_FAIL;
1263 }
1264
1265 ReleaseStgMedium(&stgm);
1266
1267 TRACE("File properties %ls\n", m_wszPath);
1269 if (!m_bDir)
1271
1272 return S_OK;
1273}
1274
1277{
1279 return E_NOTIMPL;
1280}
1281
1284{
1286 return E_NOTIMPL;
1287}
1288
1291{
1293 return E_NOTIMPL;
1294}
1295
1298{
1299 HPROPSHEETPAGE hPage;
1301
1303 &PropSheetPageLifetimeCallback<CFileDefExt>);
1304 HRESULT hr = AddPropSheetPage(hPage, pfnAddPage, lParam);
1306 return hr;
1307 else
1308 AddRef(); // For PropSheetPageLifetimeCallback
1309
1311 {
1314 (LPARAM)this,
1315 NULL);
1316 AddPropSheetPage(hPage, pfnAddPage, lParam);
1317 }
1318
1319 if (m_bDir)
1320 {
1323 (LPARAM)this,
1324 NULL);
1325 AddPropSheetPage(hPage, pfnAddPage, lParam);
1326 }
1327
1328 return S_OK;
1329}
1330
1333{
1335 return E_NOTIMPL;
1336}
1337
1340{
1342 return E_NOTIMPL;
1343}
1344
1346CFileDefExt::GetSite(REFIID iid, void **ppvSite)
1347{
1349 return E_NOTIMPL;
1350}
1351
1354{
1355 _CountFolderAndFilesData *data = static_cast<_CountFolderAndFilesData*>(lpParameter);
1356 DWORD ticks = 0;
1357 data->This->CountFolderAndFiles(data->hwndDlg, data->pwszBuf, &ticks);
1358
1359 //Release the CFileDefExt and data object holds in the copying thread.
1360 data->This->Release();
1361 HeapFree(GetProcessHeap(), 0, data->pwszBuf);
1363
1364 return 0;
1365}
1366
1367BOOL
1369{
1370 CString sBuf = pwszBuf;
1371 sBuf += L"\\" ;
1372 CString sSearch = sBuf;
1373 sSearch += L"*" ;
1374 CString sFileName;
1375
1376 WIN32_FIND_DATAW wfd;
1377 HANDLE hFind = FindFirstFileW(sSearch, &wfd);
1378 if (hFind == INVALID_HANDLE_VALUE)
1379 {
1380 ERR("FindFirstFileW %ls failed\n", sSearch.GetString());
1381 return FALSE;
1382 }
1383
1384 BOOL root = FALSE;
1385 if (*ticks == 0) {
1386 *ticks = GetTickCount();
1387 root = TRUE;
1388 }
1389
1390 do
1391 {
1392 sFileName = sBuf;
1393 sFileName += wfd.cFileName;
1394 if (wfd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
1395 {
1396 /* Don't process "." and ".." items */
1397 if (!wcscmp(wfd.cFileName, L".") || !wcscmp(wfd.cFileName, L".."))
1398 continue;
1399
1400 ++m_cFolders;
1401
1402 CountFolderAndFiles(hwndDlg, sFileName, ticks);
1403 }
1404 else
1405 {
1406 m_cFiles++;
1407
1409 FileSize.u.LowPart = wfd.nFileSizeLow;
1410 FileSize.u.HighPart = wfd.nFileSizeHigh;
1412 // Calculate size on disc
1413 if (!GetPhysicalFileSize(sFileName.GetString(), &FileSize))
1414 ERR("GetPhysicalFileSize failed for %ls\n", sFileName.GetString());
1416 }
1417 if (GetTickCount() - *ticks > (DWORD) 300)
1418 {
1419 /* FIXME Using IsWindow is generally ill advised */
1420 if (IsWindow(hwndDlg))
1421 {
1422 WCHAR wszBuf[100];
1423
1424 if (SH_FormatFileSizeWithBytes(&m_DirSize, wszBuf, _countof(wszBuf)))
1425 SetDlgItemTextW(hwndDlg, 14011, wszBuf);
1426
1428 SetDlgItemTextW(hwndDlg, 14012, wszBuf);
1429
1430 /* Display files and folders count */
1431 WCHAR wszFormat[100];
1432 LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, wszFormat, _countof(wszFormat));
1433 StringCchPrintfW(wszBuf, _countof(wszBuf), wszFormat, m_cFiles, m_cFolders);
1434 SetDlgItemTextW(hwndDlg, 14027, wszBuf);
1435 *ticks = GetTickCount();
1436 }
1437 else
1438 break;
1439 }
1440 } while(FindNextFileW(hFind, &wfd));
1441
1442 if (root && IsWindow(hwndDlg))
1443 {
1444 WCHAR wszBuf[100];
1445
1446 if (SH_FormatFileSizeWithBytes(&m_DirSize, wszBuf, _countof(wszBuf)))
1447 SetDlgItemTextW(hwndDlg, 14011, wszBuf);
1448
1450 SetDlgItemTextW(hwndDlg, 14012, wszBuf);
1451
1452 /* Display files and folders count */
1453 WCHAR wszFormat[100];
1454 LoadStringW(shell32_hInstance, IDS_FILE_FOLDER, wszFormat, _countof(wszFormat));
1455 StringCchPrintfW(wszBuf, _countof(wszBuf), wszFormat, m_cFiles, m_cFolders);
1456 SetDlgItemTextW(hwndDlg, 14027, wszBuf);
1457 }
1458
1459 FindClose(hFind);
1460 return TRUE;
1461}
HRESULT WINAPI SHOpenWithDialog(HWND hwndParent, const OPENASINFO *poainfo)
EXTERN_C BOOL PathIsExeW(LPCWSTR lpszPath)
Definition: shellpath.c:539
HRESULT SHELL32_GetDllFromRundll32CommandLine(LPCWSTR pszCmd, LPWSTR pszOut, SIZE_T cchMax)
#define shell32_hInstance
UINT cchMax
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
LONG NTSTATUS
Definition: precomp.h:26
#define IDS_BYTES_FORMAT
Definition: resource.h:122
#define CF_HDROP
Definition: constants.h:410
void shell(int argc, const char *argv[])
Definition: cmds.c:1231
#define IDI_SHELL_FOLDER
Definition: treeview.c:21
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define EXTERN_C
Definition: basetyps.h:12
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
static INT_PTR CALLBACK VersionPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: filedefext.cpp:922
STDMETHOD() ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override
static BOOL GetFileTimeString(LPFILETIME lpFileTime, LPWSTR pwszResult, UINT cchResult)
Definition: filedefext.cpp:476
BOOL InitFileAttr(HWND hwndDlg)
Definition: filedefext.cpp:514
void OnFolderCustDestroy(HWND hwndDlg)
BOOL InitFileType(HWND hwndDlg)
Definition: filedefext.cpp:388
WCHAR m_szFolderIconPath[MAX_PATH]
Definition: filedefext.h:92
ULARGE_INTEGER m_DirSize
Definition: filedefext.h:86
VOID InitOpensWithField(HWND hwndDlg)
Definition: filedefext.cpp:294
BOOL InitVersionPage(HWND hwndDlg)
Definition: filedefext.cpp:805
STDMETHOD() InvokeCommand(LPCMINVOKECOMMANDINFO lpici) override
static INT_PTR CALLBACK GeneralPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: filedefext.cpp:698
void UpdateFolderIcon(HWND hwndDlg)
BOOL OnFolderCustApply(HWND hwndDlg)
BOOL InitFilePath(HWND hwndDlg)
Definition: filedefext.cpp:447
BOOL InitFolderCustomizePage(HWND hwndDlg)
DWORD m_cFiles
Definition: filedefext.h:84
ULARGE_INTEGER m_DirSizeOnDisc
Definition: filedefext.h:87
STDMETHOD() SetSite(IUnknown *punk) override
BOOL m_bFolderIconIsSet
Definition: filedefext.h:95
STDMETHOD() AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override
WCHAR m_wszPath[MAX_PATH]
Definition: filedefext.h:80
static INT_PTR CALLBACK FolderCustomizePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: filedefext.cpp:981
void OnFolderCustChangeIcon(HWND hwndDlg)
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override
INT m_nFolderIconIndex
Definition: filedefext.h:93
DWORD m_cFolders
Definition: filedefext.h:85
BOOL m_bDir
Definition: filedefext.h:82
STDMETHOD() GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override
BOOL InitGeneralPage(HWND hwndDlg)
Definition: filedefext.cpp:642
HICON m_hFolderIcon
Definition: filedefext.h:94
CFileVersionInfo m_VerInfo
Definition: filedefext.h:81
BOOL CountFolderAndFiles(HWND hwndDlg, LPCWSTR pwszBuf, LPDWORD ticks)
BOOL AddVersionString(HWND hwndDlg, LPCWSTR pwszName)
Definition: filedefext.cpp:893
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)
Definition: filedefext.cpp:868
static DWORD WINAPI _CountFolderAndFilesThreadProc(LPVOID lpParameter)
WCHAR m_wszLang[64]
Definition: filedefext.h:29
BOOL Load(LPCWSTR pwszPath)
Definition: filedefext.cpp:82
LPCWSTR GetString(LPCWSTR pwszName)
Definition: filedefext.cpp:123
VS_FIXEDFILEINFO * GetFixedInfo()
Definition: filedefext.cpp:153
LPCWSTR GetLangName()
Definition: filedefext.cpp:165
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
UINT uFlags
Definition: api.c:59
#define GetProcessHeap()
Definition: compat.h:736
HANDLE HWND
Definition: compat.h:19
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define CALLBACK
Definition: compat.h:35
#define FILE_SHARE_READ
Definition: compat.h:136
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:794
BOOL WINAPI GetFileAttributesExW(LPCWSTR lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, LPVOID lpFileInformation)
Definition: fileinfo.c:552
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
BOOL WINAPI MoveFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName)
Definition: move.c:1104
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
UINT WINAPI GetPrivateProfileIntW(LPCWSTR section, LPCWSTR entry, INT def_val, LPCWSTR filename)
Definition: profile.c:1297
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
DWORD WINAPI VerLanguageNameW(DWORD wLang, LPWSTR szLang, DWORD nSize)
Definition: locale.c:3084
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1666
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2033
#define RRF_RT_REG_SZ
Definition: driver.c:575
BOOL WINAPI PickIconDlg(HWND hWndOwner, LPWSTR lpstrFile, UINT nMaxFile, INT *lpdwIconIndex)
Definition: dialogs.cpp:351
static HRESULT AddPropSheetPage(HPROPSHEETPAGE hPage, LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: precomp.h:151
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
Definition: shellole.c:622
LPWSTR WINAPI PathFindFileNameW(LPCWSTR lpszPath)
Definition: path.c:394
LPWSTR WINAPI PathFindExtensionW(LPCWSTR lpszPath)
Definition: path.c:447
BOOL WINAPI PathFileExistsW(LPCWSTR lpszPath)
Definition: path.c:1783
VOID WINAPI PathUnquoteSpacesW(LPWSTR lpszPath)
Definition: path.c:1040
LPWSTR WINAPI PathRemoveBackslashW(LPWSTR lpszPath)
Definition: path.c:867
BOOL WINAPI PathIsDirectoryW(LPCWSTR lpszPath)
Definition: path.c:1729
int WINAPI PathParseIconLocationW(LPWSTR lpszPath)
Definition: path.c:1098
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
Definition: string.c:2394
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
Definition: thread.c:356
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:845
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1057
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:611
#define swprintf
Definition: precomp.h:40
@ Success
Definition: eventcreate.c:712
struct _FileName FileName
Definition: fatprocs.h:897
static const WCHAR s_szShellClassInfo[]
Definition: filedefext.cpp:974
UINT SH_FormatInteger(LONGLONG Num, LPWSTR pwszResult, UINT cchResultMax)
Definition: filedefext.cpp:180
LPWSTR SH_FormatFileSizeWithBytes(const PULARGE_INTEGER lpQwSize, LPWSTR pwszResult, UINT cchResultMax)
Definition: filedefext.cpp:266
EXTERN_C BOOL PathIsExeW(LPCWSTR lpszPath)
Definition: shellpath.c:539
static const WCHAR s_szIconFile[]
Definition: filedefext.cpp:976
UINT SH_FormatByteSize(LONGLONG cbSize, LPWSTR pwszResult, UINT cchResultMax)
Definition: filedefext.cpp:236
BOOL GetPhysicalFileSize(LPCWSTR PathBuffer, PULARGE_INTEGER Size)
Definition: filedefext.cpp:32
static const WCHAR s_szIconResource[]
Definition: filedefext.cpp:977
static const WCHAR s_szIconIndex[]
Definition: filedefext.cpp:975
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
#define FILE_SYNCHRONOUS_IO_NONALERT
Definition: from_kernel.h:31
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
Definition: fsrtlfuncs.h:108
Status
Definition: gdiplustypes.h:25
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
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
Definition: glfuncs.h:248
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
Definition: iconcache.cpp:855
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
HRESULT GetData([in, unique] FORMATETC *pformatetcIn, [out] STGMEDIUM *pmedium)
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags, LPCWSTR lpszValue, const NUMBERFMTW *lpFormat, LPWSTR lpNumberStr, int cchOut)
Definition: lcformat.c:1208
INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1089
INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut)
Definition: lcformat.c:989
LPCWSTR szPath
Definition: env.c:37
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static HICON
Definition: imagelist.c:80
static OUT PIO_STATUS_BLOCK IoStatusBlock
Definition: pipe.c:75
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
static HMENU hmenu
Definition: win.c:66
HICON hIcon
Definition: msconfig.c:44
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
unsigned int UINT
Definition: ndis.h:50
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)
Definition: file.c:3953
#define SYNCHRONIZE
Definition: nt_native.h:61
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
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)
Definition: obhandle.c:3402
#define FILE_ATTRIBUTE_ARCHIVE
Definition: nt_native.h:706
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define LOCALE_USER_DEFAULT
#define L(x)
Definition: ntvdm.h:50
#define PathAppendW
Definition: pathcch.h:309
#define LOWORD(l)
Definition: pedump.c:82
#define PSNRET_INVALID_NOCHANGEPAGE
Definition: prsht.h:131
#define PropSheet_Changed(d, w)
Definition: prsht.h:344
#define PropSheet_QuerySiblings(d, w, l)
Definition: prsht.h:349
#define PSN_APPLY
Definition: prsht.h:117
#define PSNRET_NOERROR
Definition: prsht.h:129
#define LPPROPSHEETPAGE
Definition: prsht.h:390
struct _PROPSHEETPAGEW * LPPROPSHEETPAGEW
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:327
struct _PSHNOTIFY * LPPSHNOTIFY
#define PSM_QUERYSIBLINGS
Definition: prsht.h:160
#define REFIID
Definition: guiddef.h:118
#define WM_NOTIFY
Definition: richedit.h:61
const WCHAR * str
TCHAR szIniFile[]
Definition: scrnsave.c:29
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define MAKELANGID(p, s)
Definition: nls.h:15
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_ENGLISH_US
Definition: nls.h:222
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
Definition: shell32_main.c:430
#define SHGFI_ICON
Definition: shellapi.h:165
#define SHGFI_TYPENAME
Definition: shellapi.h:168
#define FileStandardInformation
Definition: propsheet.cpp:61
HRESULT hr
Definition: shlfolder.c:183
@ OAIF_REGISTER_EXT
Definition: shlobj.h:2689
@ OAIF_FORCE_REGISTRATION
Definition: shlobj.h:2691
#define PathRemoveExtension
Definition: shlwapi.h:1066
#define PathSearchAndQualify
Definition: shlwapi.h:1100
#define PathRemoveArgs
Definition: shlwapi.h:1054
#define IDC_FOLDERCUST_CHANGE_ICON
Definition: shresdef.h:561
#define IDD_FILE_VERSION
Definition: shresdef.h:430
#define IDD_FILE_PROPERTIES
Definition: shresdef.h:421
#define IDC_FOLDERCUST_CHECKBOX
Definition: shresdef.h:556
#define IDC_FOLDERCUST_COMBOBOX
Definition: shresdef.h:555
#define IDC_FOLDERCUST_RESTORE_DEFAULTS
Definition: shresdef.h:558
#define IDD_FOLDER_CUSTOMIZE
Definition: shresdef.h:551
#define IDS_FILE_FOLDER
Definition: shresdef.h:220
#define IDC_FOLDERCUST_ICON
Definition: shresdef.h:560
#define IDS_EXE_DESCRIPTION
Definition: shresdef.h:210
#define IDD_FOLDER_PROPERTIES
Definition: shresdef.h:422
#define IDS_UNKNOWN_APP
Definition: shresdef.h:209
#define IDC_FOLDERCUST_CHOOSE_PIC
Definition: shresdef.h:557
#define _countof(array)
Definition: sndvol32.h:70
#define TRACE(s)
Definition: solgame.cpp:4
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
STRSAFEAPI StringCchCopyExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags)
Definition: strsafe.h:184
STRSAFEAPI StringCchPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:585
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
STRSAFEAPI StringCbPrintfW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:557
STRSAFEAPI StringCchCopyNW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, size_t cchToCopy)
Definition: strsafe.h:236
STRSAFEAPI StringCbCatW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:342
LPARAM lParam
Definition: prsht.h:227
NMHDR hdr
Definition: prsht.h:330
WCHAR szTypeName[80]
Definition: shellapi.h:377
HICON hIcon
Definition: shellapi.h:373
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
LPWSTR lpDecimalSep
Definition: winnls.h:647
UINT Grouping
Definition: winnls.h:646
LPWSTR lpThousandSep
Definition: winnls.h:648
Definition: format.c:58
UINT code
Definition: winuser.h:3170
LPCWSTR pcszFile
Definition: shlobj.h:2701
LPCWSTR pcszClass
Definition: shlobj.h:2702
OPEN_AS_INFO_FLAGS oaifInFlags
Definition: shlobj.h:2703
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
DWORD dwFileVersionLS
Definition: compat.h:903
DWORD dwFileVersionMS
Definition: compat.h:902
#define towupper(c)
Definition: wctype.h:99
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT_PTR
Definition: typedefs.h:64
int64_t LONGLONG
Definition: typedefs.h:68
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
LONGLONG QuadPart
Definition: typedefs.h:114
struct _LARGE_INTEGER::@2379 u
#define VS_FF_SPECIALBUILD
Definition: verrsrc.h:47
#define VS_FF_PRIVATEBUILD
Definition: verrsrc.h:45
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
HPROPSHEETPAGE SH_CreatePropertySheetPage(WORD wDialogId, DLGPROC pfnDlgProc, LPARAM lParam, LPCWSTR pwszTitle)
Definition: propsheet.cpp:243
HPROPSHEETPAGE SH_CreatePropertySheetPageEx(WORD wDialogId, DLGPROC pfnDlgProc, LPARAM lParam, LPCWSTR pwszTitle, LPFNPSPCALLBACK Callback)
Definition: propsheet.cpp:223
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
#define ZeroMemory
Definition: winbase.h:1743
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
@ GetFileExInfoStandard
Definition: winbase.h:1192
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define LOCALE_SGROUPING
Definition: winnls.h:46
#define LOCALE_SDECIMAL
Definition: winnls.h:44
#define LOCALE_STHOUSAND
Definition: winnls.h:45
#define DATE_LONGDATE
Definition: winnls.h:199
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
#define LB_ERR
Definition: winuser.h:2443
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define SW_HIDE
Definition: winuser.h:779
#define LB_GETITEMDATA
Definition: winuser.h:2052
#define DWLP_USER
Definition: winuser.h:883
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define STM_SETICON
Definition: winuser.h:2103
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)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define WM_COMMAND
Definition: winuser.h:1751
#define SM_CYSMICON
Definition: winuser.h:1024
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_GETTEXT
Definition: winuser.h:1629
#define WM_INITDIALOG
Definition: winuser.h:1750
#define LB_ADDSTRING
Definition: winuser.h:2042
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)
#define BM_SETCHECK
Definition: winuser.h:1932
#define STM_GETICON
Definition: winuser.h:2101
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SETTEXT
Definition: winuser.h:1628
#define SM_CXSMICON
Definition: winuser.h:1023
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define HWND_TOP
Definition: winuser.h:1218
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HWND WINAPI GetParent(_In_ HWND)
#define LB_SETITEMDATA
Definition: winuser.h:2076
#define LBN_SELCHANGE
Definition: winuser.h:2086
#define DWLP_MSGRESULT
Definition: winuser.h:881
#define SW_SHOW
Definition: winuser.h:786
#define WM_DESTROY
Definition: winuser.h:1620
#define LB_SETCURSEL
Definition: winuser.h:2074
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SWP_NOZORDER
Definition: winuser.h:1258
#define LB_GETCURSEL
Definition: winuser.h:2050
#define SendDlgItemMessage
Definition: winuser.h:5862
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2412
int WINAPI GetSystemMetrics(_In_ int)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define BST_CHECKED
Definition: winuser.h:197
#define BM_GETCHECK
Definition: winuser.h:1929
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2390
#define EN_CHANGE
Definition: winuser.h:2033
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185