ReactOS 0.4.17-dev-243-g1369312
CDrivesFolder.cpp File Reference
#include <precomp.h>
#include <process.h>
Include dependency graph for CDrivesFolder.cpp:

Go to the source code of this file.

Classes

class  CDrivesFolderEnum
 

Macros

#define RETRY_COUNT   3
 
#define RETRY_SLEEP   250
 
#define CMDID_FORMAT   1
 
#define CMDID_EJECT   2
 
#define CMDID_DISCONNECT   3
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shell)
 
static const CLSIDIsRegItem (PCUITEMID_CHILD pidl)
 
static bool IsRegItem (PCUITEMID_CHILD pidl, REFCLSID clsid)
 
static INT8 GetDriveNumber (PCUITEMID_CHILD pidl)
 
static INT8 GetDriveNumber (PCWSTR DrivePath)
 
static UINT GetCachedDriveType (INT8 DrvNum)
 
static UINT GetCachedDriveType (PCWSTR DrivePath)
 
static bool IsFloppyDrive (PCWSTR DrivePath)
 
INT8 GetDrivePath (PCUITEMID_CHILD pidl, PWSTR Path)
 
static UINT _ILGetRemovableTypeId (LPCITEMIDLIST pidl)
 
UINT _ILGetDriveType (LPCITEMIDLIST pidl)
 
static UINT SHELL_GetAutoRunInfPath (PCWSTR DrvPath, PWSTR AriPath, BOOL ForInvoke=FALSE)
 
BOOL SHELL32_IsShellFolderNamespaceItemHidden (LPCWSTR SubKey, REFCLSID Clsid)
 Returns true if the item should be hidden in DefView but not in the Explorer folder tree.
 
static BOOL TryToLockOrUnlockDrive (HANDLE hDrive, BOOL bLock)
 
static BOOL DoEjectDrive (const WCHAR *physical, UINT nDriveType, INT *pnStringID)
 
static DWORD CALLBACK DoFormatDriveThread (LPVOID args)
 
static HRESULT DoFormatDriveAsync (HWND hwnd, UINT nDrive)
 
HRESULT CALLBACK DrivesContextMenuCallback (IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HRESULT CDrivesContextMenu_CreateInstance (PCIDLIST_ABSOLUTE pidlFolder, HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IShellFolder *psf, IContextMenu **ppcm)
 
static HRESULT getIconLocationForDrive (_In_ PCWSTR pszDrivePath, _Out_writes_z_(cchMax) PWSTR szIconFile, _In_ UINT cchMax, _Out_ int *piIndex, _Out_ UINT *pGilOut)
 
static HRESULT getLabelForDriveFromAutoRun (PCWSTR wszPath, LPWSTR szLabel, UINT cchMax)
 
static HRESULT GetRawDriveLabel (PCWSTR DrivePath, LPWSTR szLabel, UINT cchMax)
 
static HRESULT GetDriveLabel (PCWSTR DrivePath, LPWSTR szLabel, UINT cchMax)
 
static bool GetRegCustomizedDriveIcon (_In_ INT8 DriveNum, _Out_writes_z_(cchMax) PWSTR szIconFile, _In_ UINT cchMax, _Out_ int *piIndex, _Out_ UINT *pGilOut)
 
HRESULT CDrivesExtractIcon_CreateInstance (IShellFolder *psf, LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppvOut)
 

Variables

static int iDriveIconIds [7]
 
static int iDriveTypeIds [7]
 
static const REQUIREDREGITEM g_RequiredItems []
 
static const REGFOLDERINFO g_RegFolderInfo
 
UINT g_IsFloppyCache = 0
 
static const shvheader MyComputerSFHeader []
 
static const DWORD dwComputerAttributes
 
static const DWORD dwControlPanelAttributes
 
static const DWORD dwDriveAttributes
 

Macro Definition Documentation

◆ CMDID_DISCONNECT

#define CMDID_DISCONNECT   3

◆ CMDID_EJECT

#define CMDID_EJECT   2

◆ CMDID_FORMAT

#define CMDID_FORMAT   1

◆ RETRY_COUNT

#define RETRY_COUNT   3

Definition at line 206 of file CDrivesFolder.cpp.

◆ RETRY_SLEEP

#define RETRY_SLEEP   250

Definition at line 207 of file CDrivesFolder.cpp.

Function Documentation

◆ _ILGetDriveType()

UINT _ILGetDriveType ( LPCITEMIDLIST  pidl)

Definition at line 156 of file CDrivesFolder.cpp.

157{
158 WCHAR szDrive[8];
159 if (!_ILGetDrive(pidl, szDrive, _countof(szDrive)))
160 {
161 ERR("pidl %p is not a drive\n", pidl);
162 return DRIVE_UNKNOWN;
163 }
164 return GetCachedDriveType(GetDriveNumber(szDrive));
165}
static UINT GetCachedDriveType(INT8 DrvNum)
static INT8 GetDriveNumber(PCUITEMID_CHILD pidl)
#define ERR(fmt,...)
Definition: precomp.h:57
short WCHAR
Definition: pedump.c:58
DWORD _ILGetDrive(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uSize)
Definition: pidl.c:2052
#define _countof(array)
Definition: sndvol32.h:70
#define DRIVE_UNKNOWN
Definition: winbase.h:280

Referenced by CDrivesFolder::GetAttributesOf(), and CDrivesFolder::GetDetailsEx().

◆ _ILGetRemovableTypeId()

static UINT _ILGetRemovableTypeId ( LPCITEMIDLIST  pidl)
inlinestatic

Definition at line 148 of file CDrivesFolder.cpp.

149{
150 WCHAR buf[8];
151 if (GetDrivePath(pidl, buf) >= 0 && IsFloppyDrive(buf))
152 return SHDID_COMPUTER_DRIVE35; // TODO: 3.5-inch vs 5.25-inch
154}
static bool IsFloppyDrive(PCWSTR DrivePath)
INT8 GetDrivePath(PCUITEMID_CHILD pidl, PWSTR Path)
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define SHDID_COMPUTER_REMOVABLE
Definition: shlobj.h:1469
#define SHDID_COMPUTER_DRIVE35
Definition: shlobj.h:1467

Referenced by CDrivesFolder::GetDetailsEx().

◆ CDrivesContextMenu_CreateInstance()

HRESULT CDrivesContextMenu_CreateInstance ( PCIDLIST_ABSOLUTE  pidlFolder,
HWND  hwnd,
UINT  cidl,
PCUITEMID_CHILD_ARRAY  apidl,
IShellFolder psf,
IContextMenu **  ppcm 
)

Definition at line 458 of file CDrivesFolder.cpp.

464{
466 AddClassKeyToArray(L"Drive", keys, keys);
467 AddClassKeyToArray(L"Folder", keys, keys);
468 return CDefFolderMenu_Create2(pidlFolder, hwnd, cidl, apidl, psf, DrivesContextMenuCallback, keys, keys, ppcm);
469}
HRESULT WINAPI CDefFolderMenu_Create2(PCIDLIST_ABSOLUTE pidlFolder, HWND hwnd, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, IShellFolder *psf, LPFNDFMCALLBACK lpfn, UINT nKeys, const HKEY *ahkeyClsKeys, IContextMenu **ppcm)
HRESULT CALLBACK DrivesContextMenuCallback(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
const UINT * keys
Definition: locale.c:416
#define L(x)
Definition: resources.c:13
LSTATUS AddClassKeyToArray(const WCHAR *szClass, HKEY *array, UINT *cKeys)
Definition: fontext.cpp:109
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by CDrivesFolder::GetUIObjectOf().

◆ CDrivesExtractIcon_CreateInstance()

HRESULT CDrivesExtractIcon_CreateInstance ( IShellFolder psf,
LPCITEMIDLIST  pidl,
REFIID  riid,
LPVOID ppvOut 
)

Definition at line 562 of file CDrivesFolder.cpp.

563{
564 CComPtr<IDefaultExtractIconInit> initIcon;
567 return hr;
568
569 WCHAR wTemp[MAX_PATH], szDrive[8];
570 int icon_idx, reg_idx = 0;
571 UINT GilOut = 0;
572 BOOL bFloppy = FALSE;
573 INT8 DriveNum = GetDrivePath(pidl, szDrive);
577
578 switch (DriveType)
579 {
580 case DRIVE_REMOVABLE:
581 bFloppy = IsFloppyDrive(szDrive);
582 reg_idx = bFloppy ? IDI_SHELL_3_14_FLOPPY : IDI_SHELL_REMOVEABLE;
583 break;
584 case DRIVE_FIXED:
585 reg_idx = IDI_SHELL_DRIVE;
586 break;
587 case DRIVE_REMOTE:
588 reg_idx = IDI_SHELL_NETDRIVE;
589 break;
590 case DRIVE_CDROM:
591 reg_idx = IDI_SHELL_CDROM;
592 break;
593 case DRIVE_RAMDISK:
594 reg_idx = IDI_SHELL_RAMDISK;
595 break;
596 }
597
598 hr = getIconLocationForDrive(szDrive, wTemp, _countof(wTemp),
599 &icon_idx, &GilOut);
600 if (SUCCEEDED(hr))
601 {
602 initIcon->SetNormalIcon(wTemp, icon_idx);
603 }
604 else if (DriveType > DRIVE_NO_ROOT_DIR &&
605 GetRegCustomizedDriveIcon(DriveNum, wTemp, _countof(wTemp), &icon_idx, &GilOut))
606 {
607 initIcon->SetNormalIcon(wTemp, icon_idx);
608 }
609 else if (reg_idx && HLM_GetIconW(reg_idx - 1, wTemp, _countof(wTemp), &icon_idx))
610 {
611 initIcon->SetNormalIcon(wTemp, icon_idx);
612 }
613 else if (DriveType == DRIVE_FIXED &&
614 HCR_GetIconW(L"Drive", wTemp, NULL, _countof(wTemp), &icon_idx))
615 {
616 initIcon->SetNormalIcon(wTemp, icon_idx);
617 }
618 else
619 {
620 if (DriveType == DRIVE_REMOVABLE && bFloppy)
621 icon_idx = IDI_SHELL_3_14_FLOPPY;
622 else
623 icon_idx = iDriveIconIds[DriveType];
624 initIcon->SetNormalIcon(swShell32Name, -icon_idx);
625 }
626
627 return initIcon->QueryInterface(riid, ppvOut);
628}
static HRESULT getIconLocationForDrive(_In_ PCWSTR pszDrivePath, _Out_writes_z_(cchMax) PWSTR szIconFile, _In_ UINT cchMax, _Out_ int *piIndex, _Out_ UINT *pGilOut)
static int iDriveIconIds[7]
static bool GetRegCustomizedDriveIcon(_In_ INT8 DriveNum, _Out_writes_z_(cchMax) PWSTR szIconFile, _In_ UINT cchMax, _Out_ int *piIndex, _Out_ UINT *pGilOut)
HRESULT WINAPI SHCreateDefaultExtractIcon(REFIID riid, void **ppv)
UINT DriveType
signed char INT8
Definition: basetsd.h:183
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define MAX_PATH
Definition: compat.h:34
#define FAILED_UNEXPECTEDLY
Definition: utils.cpp:31
unsigned int BOOL
Definition: ntddk_ex.h:94
WCHAR swShell32Name[MAX_PATH]
Definition: folders.cpp:22
REFIID riid
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
unsigned int UINT
Definition: ndis.h:50
BOOL HCR_GetIconW(LPCWSTR szClass, LPWSTR szDest, LPCWSTR szName, DWORD len, int *picon_idx)
Definition: classes.c:314
#define IDI_SHELL_3_14_FLOPPY
Definition: shresdef.h:600
#define IDI_SHELL_NETDRIVE
Definition: shresdef.h:603
#define IDI_SHELL_CDROM
Definition: shresdef.h:605
#define IDI_SHELL_DRIVE
Definition: shresdef.h:602
#define IDI_SHELL_RAMDISK
Definition: shresdef.h:606
#define IDI_SHELL_REMOVEABLE
Definition: shresdef.h:601
#define DRIVE_NO_ROOT_DIR
Definition: winbase.h:281
#define DRIVE_REMOTE
Definition: winbase.h:277
#define DRIVE_RAMDISK
Definition: winbase.h:279
#define DRIVE_CDROM
Definition: winbase.h:278
#define DRIVE_FIXED
Definition: winbase.h:276
#define DRIVE_REMOVABLE
Definition: winbase.h:275
#define IID_PPV_ARG(Itype, ppType)

Referenced by CDrivesFolder::GetUIObjectOf().

◆ DoEjectDrive()

static BOOL DoEjectDrive ( const WCHAR physical,
UINT  nDriveType,
INT pnStringID 
)
static

Definition at line 228 of file CDrivesFolder.cpp.

229{
230 /* GENERIC_WRITE isn't needed for umount */
231 DWORD dwAccessMode = GENERIC_READ;
232 DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
233
234 HANDLE hDrive = CreateFile(physical, dwAccessMode, dwShareMode, 0, OPEN_EXISTING, 0, NULL);
235 if (hDrive == INVALID_HANDLE_VALUE)
236 return FALSE;
237
238 BOOL bResult, bNeedUnlock = FALSE;
239 DWORD dwBytesReturned, dwError = NO_ERROR;
240 PREVENT_MEDIA_REMOVAL removal;
241 do
242 {
243 bResult = TryToLockOrUnlockDrive(hDrive, TRUE);
244 if (!bResult)
245 {
246 dwError = GetLastError();
247 *pnStringID = IDS_CANTLOCKVOLUME; /* Unable to lock volume */
248 break;
249 }
250 bResult = DeviceIoControl(hDrive, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
251 if (!bResult)
252 {
253 dwError = GetLastError();
254 *pnStringID = IDS_CANTDISMOUNTVOLUME; /* Unable to dismount volume */
255 bNeedUnlock = TRUE;
256 break;
257 }
258 removal.PreventMediaRemoval = FALSE;
259 bResult = DeviceIoControl(hDrive, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL,
260 0, &dwBytesReturned, NULL);
261 if (!bResult)
262 {
263 *pnStringID = IDS_CANTEJECTMEDIA; /* Unable to eject media */
264 dwError = GetLastError();
265 bNeedUnlock = TRUE;
266 break;
267 }
268 bResult = DeviceIoControl(hDrive, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
269 if (!bResult)
270 {
271 *pnStringID = IDS_CANTEJECTMEDIA; /* Unable to eject media */
272 dwError = GetLastError();
273 bNeedUnlock = TRUE;
274 break;
275 }
276 } while (0);
277
278 if (bNeedUnlock)
279 {
281 }
282
283 CloseHandle(hDrive);
284
285 SetLastError(dwError);
286 return bResult;
287}
static BOOL TryToLockOrUnlockDrive(HANDLE hDrive, BOOL bLock)
#define NO_ERROR
Definition: dderror.h:5
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: deviceio.c:136
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define GENERIC_READ
Definition: compat.h:135
#define FILE_SHARE_READ
Definition: compat.h:136
unsigned long DWORD
Definition: ntddk_ex.h:95
#define FILE_SHARE_WRITE
Definition: nt_native.h:681
#define FSCTL_DISMOUNT_VOLUME
Definition: nt_native.h:834
#define IOCTL_STORAGE_EJECT_MEDIA
Definition: ntddstor.h:107
#define IOCTL_STORAGE_MEDIA_REMOVAL
Definition: ntddstor.h:104
#define IDS_CANTDISMOUNTVOLUME
Definition: shresdef.h:148
#define IDS_CANTLOCKVOLUME
Definition: shresdef.h:147
#define IDS_CANTEJECTMEDIA
Definition: shresdef.h:149
BOOLEAN PreventMediaRemoval
Definition: ntddstor.h:343
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define CreateFile
Definition: winbase.h:3498

Referenced by DrivesContextMenuCallback().

◆ DoFormatDriveAsync()

static HRESULT DoFormatDriveAsync ( HWND  hwnd,
UINT  nDrive 
)
static

Definition at line 301 of file CDrivesFolder.cpp.

302{
304 return succ ? S_OK : E_FAIL;
305}
static DWORD CALLBACK DoFormatDriveThread(LPVOID args)
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI SHCreateThread(LPTHREAD_START_ROUTINE pfnThreadProc, VOID *pData, DWORD dwFlags, LPTHREAD_START_ROUTINE pfnCallback)
Definition: thread.c:356
#define UlongToPtr(u)
Definition: config.h:106
#define S_OK
Definition: intsafe.h:52
@ CTF_PROCESS_REF
Definition: shlwapi.h:73

Referenced by DrivesContextMenuCallback().

◆ DoFormatDriveThread()

static DWORD CALLBACK DoFormatDriveThread ( LPVOID  args)
static

Definition at line 289 of file CDrivesFolder.cpp.

290{
291 UINT nDrive = PtrToUlong(args);
292 WCHAR szPath[] = { LOWORD(L'A' + nDrive), L'\0' }; // Arbitrary, just needs to include nDrive
295 if (FAILED(hr))
296 return hr;
298 return stub.DestroyWindow();
299}
@ TYPE_FORMATDRIVE
Definition: precomp.h:228
DWORD WINAPI SHFormatDrive(HWND hwnd, UINT drive, UINT fmtID, UINT options)
Definition: drive.cpp:762
#define PtrToUlong(u)
Definition: config.h:107
#define FAILED(hr)
Definition: intsafe.h:51
LPCWSTR szPath
Definition: env.c:37
#define LOWORD(l)
Definition: pedump.c:82
#define SHFMT_ID_DEFAULT
Definition: shlobj.h:332
Definition: stubgen.c:11
Definition: match.c:390
struct _stub stub

Referenced by DoFormatDriveAsync().

◆ DrivesContextMenuCallback()

HRESULT CALLBACK DrivesContextMenuCallback ( IShellFolder psf,
HWND  hwnd,
IDataObject pdtobj,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)

Definition at line 307 of file CDrivesFolder.cpp.

313{
314 if (uMsg != DFM_MERGECONTEXTMENU && uMsg != DFM_INVOKECOMMAND)
315 return SHELL32_DefaultContextMenuCallBack(psf, pdtobj, uMsg);
316
317 PIDLIST_ABSOLUTE pidlFolder;
318 PUITEMID_CHILD *apidl;
319 UINT cidl;
321 HRESULT hr = SH_GetApidlFromDataObject(pdtobj, &pidlFolder, &apidl, &cidl);
323 return hr;
324
325 WCHAR szDrive[8] = {0};
326 if (!_ILGetDrive(apidl[0], szDrive, _countof(szDrive)))
327 {
328 ERR("pidl is not a drive\n");
329 SHFree(pidlFolder);
330 _ILFreeaPidl(apidl, cidl);
331 return E_FAIL;
332 }
333 UINT nDriveType = GetCachedDriveType(szDrive);
334 if (!GetVolumeInformationW(szDrive, NULL, 0, NULL, NULL, &dwFlags, NULL, 0))
335 {
336 if (nDriveType >= DRIVE_REMOTE)
338 else
339 dwFlags = 0; // Assume drive with unknown filesystem, allow format
340 }
341
342// custom command IDs
343#if 0 // Disabled until our menu building system is fixed
344#define CMDID_FORMAT 0
345#define CMDID_EJECT 1
346#define CMDID_DISCONNECT 2
347#else
348/* FIXME: These IDs should start from 0, however there is difference
349 * between ours and Windows' menu building systems, which should be fixed. */
350#define CMDID_FORMAT 1
351#define CMDID_EJECT 2
352#define CMDID_DISCONNECT 3
353#endif
354
355 if (uMsg == DFM_MERGECONTEXTMENU)
356 {
357 QCMINFO *pqcminfo = (QCMINFO *)lParam;
358
359 UINT idCmdFirst = pqcminfo->idCmdFirst;
360 UINT idCmd = 0;
361 if (!(dwFlags & FILE_READ_ONLY_VOLUME) && nDriveType != DRIVE_REMOTE && cidl == 1)
362 {
363 /* add separator and Format */
364 idCmd = idCmdFirst + CMDID_FORMAT;
365 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
367 }
368 if (nDriveType == DRIVE_REMOVABLE || nDriveType == DRIVE_CDROM)
369 {
370 /* add separator and Eject */
371 idCmd = idCmdFirst + CMDID_EJECT;
372 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
374 }
375 if (nDriveType == DRIVE_REMOTE)
376 {
377 /* add separator and Disconnect */
378 idCmd = idCmdFirst + CMDID_DISCONNECT;
379 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
381 }
382
383 if (idCmd)
384#if 0 // see FIXME above
385 pqcminfo->idCmdFirst = ++idCmd;
386#else
387 pqcminfo->idCmdFirst = (idCmd + 2);
388#endif
389 hr = S_OK;
390 }
391 else if (uMsg == DFM_INVOKECOMMAND)
392 {
393 WCHAR wszBuf[4] = L"A:\\";
394 wszBuf[0] = (WCHAR)szDrive[0];
395
396 INT nStringID = 0;
397 DWORD dwError = NO_ERROR;
398
400 {
401 ATLASSERT(pdtobj);
403 // Not setting nStringID because SHOpenPropSheet already displayed an error box
404 }
405 else
406 {
407 if (wParam == CMDID_FORMAT)
408 {
409 hr = DoFormatDriveAsync(hwnd, szDrive[0] - 'A');
410 }
411 else if (wParam == CMDID_EJECT)
412 {
413 /* do eject */
414 WCHAR physical[10];
415 wsprintfW(physical, _T("\\\\.\\%c:"), szDrive[0]);
416
417 if (DoEjectDrive(physical, nDriveType, &nStringID))
418 {
420 }
421 else
422 {
423 dwError = GetLastError();
424 }
425 }
426 else if (wParam == CMDID_DISCONNECT)
427 {
428 /* do disconnect */
429 wszBuf[2] = UNICODE_NULL;
430 dwError = WNetCancelConnection2W(wszBuf, 0, FALSE);
431 if (dwError == NO_ERROR)
432 {
434 }
435 else
436 {
437 nStringID = IDS_CANTDISCONNECT;
438 }
439 }
440 }
441
442 if (nStringID != 0)
443 {
444 /* show error message */
445 WCHAR szFormat[128], szMessage[128];
446 LoadStringW(shell32_hInstance, nStringID, szFormat, _countof(szFormat));
447 wsprintfW(szMessage, szFormat, dwError);
448 MessageBoxW(hwnd, szMessage, NULL, MB_ICONERROR);
449 }
450 }
451
452 SHFree(pidlFolder);
453 _ILFreeaPidl(apidl, cidl);
454
455 return hr;
456}
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
static HRESULT DoFormatDriveAsync(HWND hwnd, UINT nDrive)
#define CMDID_FORMAT
static BOOL DoEjectDrive(const WCHAR *physical, UINT nDriveType, INT *pnStringID)
#define CMDID_EJECT
#define CMDID_DISCONNECT
#define shell32_hInstance
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define DFM_MERGECONTEXTMENU
Definition: precomp.h:44
#define DFM_INVOKECOMMAND
Definition: precomp.h:45
BOOL WINAPI GetVolumeInformationW(IN LPCWSTR lpRootPathName, IN LPWSTR lpVolumeNameBuffer, IN DWORD nVolumeNameSize, OUT LPDWORD lpVolumeSerialNumber OPTIONAL, OUT LPDWORD lpMaximumComponentLength OPTIONAL, OUT LPDWORD lpFileSystemFlags OPTIONAL, OUT LPWSTR lpFileSystemNameBuffer OPTIONAL, IN DWORD nFileSystemNameSize)
Definition: volume.c:226
HRESULT SHELL32_DefaultContextMenuCallBack(IShellFolder *psf, IDataObject *pdo, UINT msg)
Definition: shlfolder.cpp:624
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:370
#define FILE_READ_ONLY_VOLUME
Definition: from_kernel.h:246
HRESULT SHELL32_ShowFilesystemItemPropertiesDialogAsync(IDataObject *pDO)
Definition: item_prop.cpp:157
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define UNICODE_NULL
void _ILFreeaPidl(LPITEMIDLIST *apidl, UINT cidl)
Definition: pidl.c:2614
#define LoadStringW
Definition: utils.h:64
HRESULT SH_GetApidlFromDataObject(IDataObject *pDataObject, PIDLIST_ABSOLUTE *ppidlfolder, PUITEMID_CHILD **apidlItems, UINT *pcidl)
Definition: shlfolder.cpp:510
void WINAPI _InsertMenuItemW(HMENU hmenu, UINT indexMenu, BOOL fByPosition, UINT wID, UINT fType, LPCWSTR dwTypeData, UINT fState)
#define SHCNE_DRIVEREMOVED
Definition: shlobj.h:1904
#define SHCNE_MEDIAREMOVED
Definition: shlobj.h:1903
#define SHCNF_PATHW
Definition: shlobj.h:1933
#define DFM_CMD_PROPERTIES
Definition: shlobj.h:2620
#define SHCNF_FLUSHNOWAIT
Definition: shlobj.h:1937
#define IDS_DISCONNECT
Definition: shresdef.h:244
#define IDS_EJECT
Definition: shresdef.h:243
#define IDS_CANTDISCONNECT
Definition: shresdef.h:151
#define IDS_FORMATDRIVE
Definition: shresdef.h:229
ITEMID_CHILD UNALIGNED * PUITEMID_CHILD
Definition: shtypes.idl:68
HMENU hmenu
Definition: shlobj.h:1397
UINT idCmdFirst
Definition: shlobj.h:1399
UINT indexMenu
Definition: shlobj.h:1398
int32_t INT
Definition: typedefs.h:58
#define _T(x)
Definition: vfdio.h:22
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define MFT_SEPARATOR
Definition: winuser.h:755
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_ICONERROR
Definition: winuser.h:798
#define MFS_ENABLED
Definition: winuser.h:761
#define MFT_STRING
Definition: winuser.h:757
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
DWORD WINAPI WNetCancelConnection2W(LPCWSTR lpName, DWORD dwFlags, BOOL fForce)
Definition: wnet.c:2420

Referenced by CDrivesContextMenu_CreateInstance().

◆ GetCachedDriveType() [1/2]

static UINT GetCachedDriveType ( INT8  DrvNum)
static

Definition at line 104 of file CDrivesFolder.cpp.

105{
106 if (DrvNum < 0 || DrvNum >= 26)
107 return DRIVE_UNKNOWN;
108 if (g_IsFloppyCache & (1 << DrvNum))
109 return DRIVE_REMOVABLE;
110 WCHAR DrvPath[] = { LOWORD('A' + DrvNum), ':', '\\', '\0' };
111 return ::GetDriveTypeW(DrvPath);
112}
UINT g_IsFloppyCache

Referenced by _ILGetDriveType(), CDrivesExtractIcon_CreateInstance(), DrivesContextMenuCallback(), GetCachedDriveType(), CDrivesFolder::GetDetailsOf(), CDrivesFolder::GetDisplayNameOf(), IsFloppyDrive(), and SHELL_GetAutoRunInfPath().

◆ GetCachedDriveType() [2/2]

static UINT GetCachedDriveType ( PCWSTR  DrivePath)
inlinestatic

Definition at line 114 of file CDrivesFolder.cpp.

115{
116 return GetCachedDriveType(GetDriveNumber(DrivePath));
117}

◆ GetDriveLabel()

static HRESULT GetDriveLabel ( PCWSTR  DrivePath,
LPWSTR  szLabel,
UINT  cchMax 
)
static

Definition at line 533 of file CDrivesFolder.cpp.

534{
535 HRESULT hr = getLabelForDriveFromAutoRun(DrivePath, szLabel, cchMax);
536 return hr == S_OK ? S_OK : GetRawDriveLabel(DrivePath, szLabel, cchMax);
537}
static HRESULT GetRawDriveLabel(PCWSTR DrivePath, LPWSTR szLabel, UINT cchMax)
static HRESULT getLabelForDriveFromAutoRun(PCWSTR wszPath, LPWSTR szLabel, UINT cchMax)
UINT cchMax

Referenced by CDrivesFolder::GetDisplayNameOf().

◆ GetDriveNumber() [1/2]

static INT8 GetDriveNumber ( PCUITEMID_CHILD  pidl)
static

Definition at line 87 of file CDrivesFolder.cpp.

88{
89 if (!_ILIsDrive(pidl))
90 return -1;
91 BYTE letter = ((PIDLDATA*)pidl->mkid.abID)->u.drive.szDriveName[0];
92 BYTE number = (letter | 32) - 'a';
93 return number < 26 ? number : -1;
94}
static unsigned int number
Definition: dsound.c:1479
BOOL _ILIsDrive(LPCITEMIDLIST pidl)
Definition: pidl.c:2137
unsigned char BYTE
Definition: xxhash.c:193

Referenced by _ILGetDriveType(), GetCachedDriveType(), GetDrivePath(), IsFloppyDrive(), CDrivesFolder::MessageSFVCB(), and SHELL_GetAutoRunInfPath().

◆ GetDriveNumber() [2/2]

static INT8 GetDriveNumber ( PCWSTR  DrivePath)
static

Definition at line 96 of file CDrivesFolder.cpp.

97{
98 WORD number = (DrivePath[0] | 32) - 'a';
99 return number < 26 ? number : -1;
100}
unsigned short WORD
Definition: ntddk_ex.h:93

◆ GetDrivePath()

INT8 GetDrivePath ( PCUITEMID_CHILD  pidl,
PWSTR  Path 
)

Definition at line 136 of file CDrivesFolder.cpp.

137{
138 INT8 number = GetDriveNumber(pidl);
139 if (number < 0)
140 return number;
141 Path[0] = 'A' + number;
142 Path[1] = ':';
143 Path[2] = '\\';
144 Path[3] = '\0';
145 return number;
146}
PRTL_UNICODE_STRING_BUFFER Path

Referenced by _ILGetRemovableTypeId(), CDrivesExtractIcon_CreateInstance(), CDrivesFolder::GetDetailsOf(), CDrivesFolder::GetDisplayNameOf(), and CDrivesFolder::SetNameOf().

◆ getIconLocationForDrive()

static HRESULT getIconLocationForDrive ( _In_ PCWSTR  pszDrivePath,
_Out_writes_z_(cchMax) PWSTR  szIconFile,
_In_ UINT  cchMax,
_Out_ int piIndex,
_Out_ UINT pGilOut 
)
static

Definition at line 472 of file CDrivesFolder.cpp.

478{
479 WCHAR wszPath[MAX_PATH];
480 WCHAR wszAutoRunInfPath[MAX_PATH];
481 WCHAR wszValue[MAX_PATH], wszTemp[MAX_PATH];
482
483 if (!SHELL_GetAutoRunInfPath(pszDrivePath, wszAutoRunInfPath))
484 return E_FAIL;
485 wcscpy(wszPath, pszDrivePath);
486
487 // autorun.inf --> wszValue
488 if (GetPrivateProfileStringW(L"autorun", L"icon", NULL, wszValue, _countof(wszValue),
489 wszAutoRunInfPath) && wszValue[0] != 0)
490 {
491 // wszValue --> wszTemp
492 ExpandEnvironmentStringsW(wszValue, wszTemp, _countof(wszTemp));
493
494 *piIndex = PathParseIconLocationW(wszTemp);
495
496 // wszPath + wszTemp --> wszPath
497 if (PathIsRelativeW(wszTemp))
498 PathAppendW(wszPath, wszTemp);
499 else
500 StringCchCopyW(wszPath, _countof(wszPath), wszTemp);
501
502 // wszPath --> szIconFile
503 GetFullPathNameW(wszPath, cchMax, szIconFile, NULL);
504 return S_OK;
505 }
506 return E_FAIL;
507}
static UINT SHELL_GetAutoRunInfPath(PCWSTR DrvPath, PWSTR AriPath, BOOL ForInvoke=FALSE)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:492
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
BOOL WINAPI PathIsRelativeW(const WCHAR *path)
Definition: path.c:1030
int WINAPI PathParseIconLocationW(WCHAR *path)
Definition: path.c:2644
#define PathAppendW
Definition: pathcch.h:310
wcscpy
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149

Referenced by CDrivesExtractIcon_CreateInstance().

◆ getLabelForDriveFromAutoRun()

static HRESULT getLabelForDriveFromAutoRun ( PCWSTR  wszPath,
LPWSTR  szLabel,
UINT  cchMax 
)
static

Definition at line 510 of file CDrivesFolder.cpp.

511{
512 WCHAR wszAutoRunInfPath[MAX_PATH];
513 WCHAR wszTemp[MAX_PATH];
514
515 if (!SHELL_GetAutoRunInfPath(wszPath, wszAutoRunInfPath))
516 return E_FAIL;
517
518 if (GetPrivateProfileStringW(L"autorun", L"label", NULL, wszTemp, _countof(wszTemp),
519 wszAutoRunInfPath) && wszTemp[0] != 0)
520 {
521 return StringCchCopyW(szLabel, cchMax, wszTemp);
522 }
523 return E_FAIL;
524}

Referenced by GetDriveLabel().

◆ GetRawDriveLabel()

static HRESULT GetRawDriveLabel ( PCWSTR  DrivePath,
LPWSTR  szLabel,
UINT  cchMax 
)
inlinestatic

Definition at line 526 of file CDrivesFolder.cpp.

527{
528 if (GetVolumeInformationW(DrivePath, szLabel, cchMax, NULL, NULL, NULL, NULL, 0))
529 return *szLabel ? S_OK : S_FALSE;
531}
#define HResultFromWin32
Definition: loader.cpp:14
#define S_FALSE
Definition: winerror.h:3451

Referenced by GetDriveLabel().

◆ GetRegCustomizedDriveIcon()

static bool GetRegCustomizedDriveIcon ( _In_ INT8  DriveNum,
_Out_writes_z_(cchMax) PWSTR  szIconFile,
_In_ UINT  cchMax,
_Out_ int piIndex,
_Out_ UINT pGilOut 
)
static

Definition at line 539 of file CDrivesFolder.cpp.

545{
546 WCHAR szKey[200], chDrv = 'A' + DriveNum;
547 wsprintfW(szKey, L"%s\\DriveIcons\\%c\\DefaultIcon", REGSTR_PATH_EXPLORER, chDrv);
548 DWORD cb = cchMax * sizeof(*szIconFile);
550 if (err != ERROR_SUCCESS)
551 {
552 cb = cchMax * sizeof(*szIconFile);
553 wsprintfW(szKey, L"Applications\\Explorer.exe\\Drives\\%c\\DefaultIcon", chDrv);
554 err = RegGetValueW(HKEY_CLASSES_ROOT, szKey, NULL, RRF_RT_REG_SZ, NULL, szIconFile, &cb);
555 }
556 if (err != ERROR_SUCCESS)
557 return false;
558 *piIndex = PathParseIconLocationW(szIconFile);
559 return *szIconFile != UNICODE_NULL;
560}
#define ERROR_SUCCESS
Definition: deptool.c:10
LSTATUS WINAPI RegGetValueW(HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwFlags, LPDWORD pdwType, PVOID pvData, LPDWORD pcbData)
Definition: reg.c:1931
static MonoProfilerRuntimeShutdownBeginCallback cb
Definition: metahost.c:118
#define err(...)
#define REGSTR_PATH_EXPLORER
Definition: regstr.h:33
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define RRF_RT_REG_SZ
Definition: winreg.h:58
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10

Referenced by CDrivesExtractIcon_CreateInstance().

◆ IsFloppyDrive()

static bool IsFloppyDrive ( PCWSTR  DrivePath)
static

Definition at line 119 of file CDrivesFolder.cpp.

120{
121 extern BOOL IsDriveFloppyW(LPCWSTR pszDriveRoot);
122 INT8 DrvNum = GetDriveNumber(DrivePath);
123 if (DrvNum < 0)
124 return false;
125 if (g_IsFloppyCache & (1 << DrvNum))
126 return true;
127 UINT Type = GetCachedDriveType(DrvNum);
128 if (Type == DRIVE_REMOVABLE && IsDriveFloppyW(DrivePath))
129 {
130 g_IsFloppyCache |= (1 << DrvNum);
131 return true;
132 }
133 return false;
134}
Type
Definition: Type.h:7
BOOL IsDriveFloppyW(LPCWSTR pszDriveRoot)
Definition: drvdefext.cpp:320
const uint16_t * LPCWSTR
Definition: typedefs.h:57

Referenced by _ILGetRemovableTypeId(), CDrivesExtractIcon_CreateInstance(), CDrivesFolder::GetDetailsOf(), CDrivesFolder::GetDisplayNameOf(), and SHELL_GetAutoRunInfPath().

◆ IsRegItem() [1/2]

static const CLSID * IsRegItem ( PCUITEMID_CHILD  pidl)
static

Definition at line 71 of file CDrivesFolder.cpp.

72{
73 if (pidl && pidl->mkid.cb == 2 + 2 + sizeof(CLSID))
74 {
75 if (pidl->mkid.abID[0] == PT_SHELLEXT || pidl->mkid.abID[0] == PT_GUID) // FIXME: Remove PT_GUID when CRegFolder is fixed
76 return (const CLSID*)(&pidl->mkid.abID[2]);
77 }
78 return NULL;
79}
#define PT_GUID
Definition: pidl.h:87
#define PT_SHELLEXT
Definition: pidl.h:91

Referenced by IsRegItem().

◆ IsRegItem() [2/2]

static bool IsRegItem ( PCUITEMID_CHILD  pidl,
REFCLSID  clsid 
)
static

Definition at line 81 of file CDrivesFolder.cpp.

82{
83 const CLSID *pClass = IsRegItem(pidl);
84 return pClass && *pClass == clsid;
85}
static const CLSID * IsRegItem(PCUITEMID_CHILD pidl)
const CLSID * clsid
Definition: msctf.cpp:50

◆ SHELL32_IsShellFolderNamespaceItemHidden()

BOOL SHELL32_IsShellFolderNamespaceItemHidden ( LPCWSTR  SubKey,
REFCLSID  Clsid 
)

Returns true if the item should be hidden in DefView but not in the Explorer folder tree.

Definition at line 193 of file CDrivesFolder.cpp.

194{
196 wsprintfW(path, L"%s\\%s", REGSTR_PATH_EXPLORER, SubKey);
198 // Check the value in both HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE
200}
#define CHARS_IN_GUID
#define SHRegGetBoolUSValue
Definition: shlwapi.h:845
static __inline int SHELL32_GUIDToStringW(REFGUID guid, LPWSTR str)
Definition: shfldr.h:162
Definition: name.c:39

Referenced by CDesktopFolderViewCB::ShouldShow(), and CDrivesFolder::ShouldShow().

◆ SHELL_GetAutoRunInfPath()

static UINT SHELL_GetAutoRunInfPath ( PCWSTR  DrvPath,
PWSTR  AriPath,
BOOL  ForInvoke = FALSE 
)
static

Definition at line 167 of file CDrivesFolder.cpp.

168{
169 INT8 DrvNum = GetDriveNumber(DrvPath);
170 if (DrvNum < 0 || DrvPath[1] != ':' || (DrvPath[2] && (DrvPath[2] != '\\' || DrvPath[3])))
171 return 0;
172 if (!ForInvoke && IsFloppyDrive(DrvPath))
173 return 0; // Don't read label nor icon from floppy
175 return 0;
176 return wsprintfW(AriPath, L"%c:\\autorun.inf", DrvPath[0]);
177}

Referenced by getIconLocationForDrive(), and getLabelForDriveFromAutoRun().

◆ TryToLockOrUnlockDrive()

static BOOL TryToLockOrUnlockDrive ( HANDLE  hDrive,
BOOL  bLock 
)
static

Definition at line 208 of file CDrivesFolder.cpp.

209{
210 DWORD dwError, dwBytesReturned;
211 DWORD dwCode = (bLock ? FSCTL_LOCK_VOLUME : FSCTL_UNLOCK_VOLUME);
212 for (DWORD i = 0; i < RETRY_COUNT; ++i)
213 {
214 if (DeviceIoControl(hDrive, dwCode, NULL, 0, NULL, 0, &dwBytesReturned, NULL))
215 return TRUE;
216
217 dwError = GetLastError();
218 if (dwError == ERROR_INVALID_FUNCTION)
219 break; /* don't sleep if function is not implemented */
220
222 }
223 SetLastError(dwError);
224 return FALSE;
225}
#define RETRY_COUNT
#define RETRY_SLEEP
#define ERROR_INVALID_FUNCTION
Definition: dderror.h:6
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
#define FSCTL_LOCK_VOLUME
Definition: nt_native.h:832
#define FSCTL_UNLOCK_VOLUME
Definition: nt_native.h:833
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:726

Referenced by DoEjectDrive().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shell  )

Variable Documentation

◆ dwComputerAttributes

const DWORD dwComputerAttributes
static
Initial value:
=
SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET | SFGAO_DROPTARGET |
SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_CANLINK

Definition at line 672 of file CDrivesFolder.cpp.

Referenced by CDrivesFolder::GetAttributesOf().

◆ dwControlPanelAttributes

const DWORD dwControlPanelAttributes
static
Initial value:
=
SFGAO_HASSUBFOLDER | SFGAO_FOLDER | SFGAO_CANLINK

Definition at line 675 of file CDrivesFolder.cpp.

Referenced by CControlPanelFolder::GetAttributesOf(), and CDrivesFolder::GetAttributesOf().

◆ dwDriveAttributes

const DWORD dwDriveAttributes
static
Initial value:
=
SFGAO_HASSUBFOLDER | SFGAO_FILESYSTEM | SFGAO_FOLDER | SFGAO_FILESYSANCESTOR |
SFGAO_DROPTARGET | SFGAO_HASPROPSHEET | SFGAO_CANRENAME | SFGAO_CANLINK | SFGAO_CANCOPY

Definition at line 677 of file CDrivesFolder.cpp.

Referenced by CDrivesFolder::GetAttributesOf().

◆ g_IsFloppyCache

UINT g_IsFloppyCache = 0

◆ g_RegFolderInfo

const REGFOLDERINFO g_RegFolderInfo
static
Initial value:
=
{
CLSID_MyComputer,
L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}",
L"MyComputer",
}
static const REQUIREDREGITEM g_RequiredItems[]
#define PT_COMPUTER_REGITEM
Definition: lnktool.cpp:39

Definition at line 62 of file CDrivesFolder.cpp.

◆ g_RequiredItems

const REQUIREDREGITEM g_RequiredItems[]
static
Initial value:
=
{
{ CLSID_ControlPanel, NULL, REGITEMORDER_MYCOMPUTER_CONTROLS },
}

Definition at line 58 of file CDrivesFolder.cpp.

◆ iDriveIconIds

◆ iDriveTypeIds

int iDriveTypeIds[7]
static
Initial value:
}
#define IDS_DRIVE_CDROM
Definition: shresdef.h:112
#define IDS_DRIVE_FIXED
Definition: shresdef.h:111
#define IDS_DRIVE_NETWORK
Definition: shresdef.h:113
#define IDS_DRIVE_REMOVABLE
Definition: shresdef.h:115

Definition at line 49 of file CDrivesFolder.cpp.

Referenced by CDrivesFolder::GetDetailsOf(), and CDrivesFolder::GetDisplayNameOf().

◆ MyComputerSFHeader