ReactOS 0.4.16-dev-1520-gb558596
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)
 
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 203 of file CDrivesFolder.cpp.

◆ RETRY_SLEEP

#define RETRY_SLEEP   250

Definition at line 204 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
DWORD _ILGetDrive(LPCITEMIDLIST pidl, LPWSTR pOut, UINT uSize)
Definition: pidl.c:2046
#define _countof(array)
Definition: sndvol32.h:70
#define DRIVE_UNKNOWN
Definition: winbase.h:289
__wchar_t WCHAR
Definition: xmlstorage.h:180

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:1467
#define SHDID_COMPUTER_DRIVE35
Definition: shlobj.h:1465

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 455 of file CDrivesFolder.cpp.

461{
462 CRegKeyHandleArray keys;
463 AddClassKeyToArray(L"Drive", keys, keys);
464 AddClassKeyToArray(L"Folder", keys, keys);
465 return CDefFolderMenu_Create2(pidlFolder, hwnd, cidl, apidl, psf, DrivesContextMenuCallback, keys, keys, ppcm);
466}
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: shlfolder.cpp:408
_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 559 of file CDrivesFolder.cpp.

560{
561 CComPtr<IDefaultExtractIconInit> initIcon;
564 return hr;
565
566 WCHAR wTemp[MAX_PATH], szDrive[8];
567 int icon_idx, reg_idx = 0;
568 UINT GilOut = 0;
569 BOOL bFloppy = FALSE;
570 INT8 DriveNum = GetDrivePath(pidl, szDrive);
574
575 switch (DriveType)
576 {
577 case DRIVE_REMOVABLE:
578 bFloppy = IsFloppyDrive(szDrive);
579 reg_idx = bFloppy ? IDI_SHELL_3_14_FLOPPY : IDI_SHELL_REMOVEABLE;
580 break;
581 case DRIVE_FIXED:
582 reg_idx = IDI_SHELL_DRIVE;
583 break;
584 case DRIVE_REMOTE:
585 reg_idx = IDI_SHELL_NETDRIVE;
586 break;
587 case DRIVE_CDROM:
588 reg_idx = IDI_SHELL_CDROM;
589 break;
590 case DRIVE_RAMDISK:
591 reg_idx = IDI_SHELL_RAMDISK;
592 break;
593 }
594
595 hr = getIconLocationForDrive(szDrive, wTemp, _countof(wTemp),
596 &icon_idx, &GilOut);
597 if (SUCCEEDED(hr))
598 {
599 initIcon->SetNormalIcon(wTemp, icon_idx);
600 }
601 else if (DriveType > DRIVE_NO_ROOT_DIR &&
602 GetRegCustomizedDriveIcon(DriveNum, wTemp, _countof(wTemp), &icon_idx, &GilOut))
603 {
604 initIcon->SetNormalIcon(wTemp, icon_idx);
605 }
606 else if (reg_idx && HLM_GetIconW(reg_idx - 1, wTemp, _countof(wTemp), &icon_idx))
607 {
608 initIcon->SetNormalIcon(wTemp, icon_idx);
609 }
610 else if (DriveType == DRIVE_FIXED &&
611 HCR_GetIconW(L"Drive", wTemp, NULL, _countof(wTemp), &icon_idx))
612 {
613 initIcon->SetNormalIcon(wTemp, icon_idx);
614 }
615 else
616 {
617 if (DriveType == DRIVE_REMOVABLE && bFloppy)
618 icon_idx = IDI_SHELL_3_14_FLOPPY;
619 else
620 icon_idx = iDriveIconIds[DriveType];
621 initIcon->SetNormalIcon(swShell32Name, -icon_idx);
622 }
623
624 return initIcon->QueryInterface(riid, ppvOut);
625}
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
#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:30
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
#define DRIVE_CDROM
Definition: machpc98.h:119
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
HRESULT hr
Definition: shlfolder.c:183
#define IDI_SHELL_3_14_FLOPPY
Definition: shresdef.h:592
#define IDI_SHELL_NETDRIVE
Definition: shresdef.h:595
#define IDI_SHELL_CDROM
Definition: shresdef.h:597
#define IDI_SHELL_DRIVE
Definition: shresdef.h:594
#define IDI_SHELL_RAMDISK
Definition: shresdef.h:598
#define IDI_SHELL_REMOVEABLE
Definition: shresdef.h:593
#define DRIVE_NO_ROOT_DIR
Definition: winbase.h:290
#define DRIVE_REMOTE
Definition: winbase.h:286
#define DRIVE_RAMDISK
Definition: winbase.h:288
#define DRIVE_FIXED
Definition: winbase.h:285
#define DRIVE_REMOVABLE
Definition: winbase.h:284
#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 225 of file CDrivesFolder.cpp.

226{
227 /* GENERIC_WRITE isn't needed for umount */
228 DWORD dwAccessMode = GENERIC_READ;
229 DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
230
231 HANDLE hDrive = CreateFile(physical, dwAccessMode, dwShareMode, 0, OPEN_EXISTING, 0, NULL);
232 if (hDrive == INVALID_HANDLE_VALUE)
233 return FALSE;
234
235 BOOL bResult, bNeedUnlock = FALSE;
236 DWORD dwBytesReturned, dwError = NO_ERROR;
237 PREVENT_MEDIA_REMOVAL removal;
238 do
239 {
240 bResult = TryToLockOrUnlockDrive(hDrive, TRUE);
241 if (!bResult)
242 {
243 dwError = GetLastError();
244 *pnStringID = IDS_CANTLOCKVOLUME; /* Unable to lock volume */
245 break;
246 }
247 bResult = DeviceIoControl(hDrive, FSCTL_DISMOUNT_VOLUME, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
248 if (!bResult)
249 {
250 dwError = GetLastError();
251 *pnStringID = IDS_CANTDISMOUNTVOLUME; /* Unable to dismount volume */
252 bNeedUnlock = TRUE;
253 break;
254 }
255 removal.PreventMediaRemoval = FALSE;
256 bResult = DeviceIoControl(hDrive, IOCTL_STORAGE_MEDIA_REMOVAL, &removal, sizeof(removal), NULL,
257 0, &dwBytesReturned, NULL);
258 if (!bResult)
259 {
260 *pnStringID = IDS_CANTEJECTMEDIA; /* Unable to eject media */
261 dwError = GetLastError();
262 bNeedUnlock = TRUE;
263 break;
264 }
265 bResult = DeviceIoControl(hDrive, IOCTL_STORAGE_EJECT_MEDIA, NULL, 0, NULL, 0, &dwBytesReturned, NULL);
266 if (!bResult)
267 {
268 *pnStringID = IDS_CANTEJECTMEDIA; /* Unable to eject media */
269 dwError = GetLastError();
270 bNeedUnlock = TRUE;
271 break;
272 }
273 } while (0);
274
275 if (bNeedUnlock)
276 {
278 }
279
280 CloseHandle(hDrive);
281
282 SetLastError(dwError);
283 return bResult;
284}
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:3790

Referenced by DrivesContextMenuCallback().

◆ DoFormatDriveAsync()

static HRESULT DoFormatDriveAsync ( HWND  hwnd,
UINT  nDrive 
)
static

Definition at line 298 of file CDrivesFolder.cpp.

299{
301 return succ ? S_OK : E_FAIL;
302}
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
#define CTF_PROCESS_REF
Definition: shlwapi.h:1991

Referenced by DrivesContextMenuCallback().

◆ DoFormatDriveThread()

static DWORD CALLBACK DoFormatDriveThread ( LPVOID  args)
static

Definition at line 286 of file CDrivesFolder.cpp.

287{
288 UINT nDrive = PtrToUlong(args);
289 WCHAR szPath[] = { LOWORD(L'A' + nDrive), L'\0' }; // Arbitrary, just needs to include nDrive
292 if (FAILED(hr))
293 return hr;
295 return stub.DestroyWindow();
296}
@ TYPE_FORMATDRIVE
Definition: precomp.h:226
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 304 of file CDrivesFolder.cpp.

310{
311 if (uMsg != DFM_MERGECONTEXTMENU && uMsg != DFM_INVOKECOMMAND)
312 return SHELL32_DefaultContextMenuCallBack(psf, pdtobj, uMsg);
313
314 PIDLIST_ABSOLUTE pidlFolder;
315 PUITEMID_CHILD *apidl;
316 UINT cidl;
318 HRESULT hr = SH_GetApidlFromDataObject(pdtobj, &pidlFolder, &apidl, &cidl);
320 return hr;
321
322 WCHAR szDrive[8] = {0};
323 if (!_ILGetDrive(apidl[0], szDrive, _countof(szDrive)))
324 {
325 ERR("pidl is not a drive\n");
326 SHFree(pidlFolder);
327 _ILFreeaPidl(apidl, cidl);
328 return E_FAIL;
329 }
330 UINT nDriveType = GetCachedDriveType(szDrive);
331 if (!GetVolumeInformationW(szDrive, NULL, 0, NULL, NULL, &dwFlags, NULL, 0))
332 {
333 if (nDriveType >= DRIVE_REMOTE)
335 else
336 dwFlags = 0; // Assume drive with unknown filesystem, allow format
337 }
338
339// custom command IDs
340#if 0 // Disabled until our menu building system is fixed
341#define CMDID_FORMAT 0
342#define CMDID_EJECT 1
343#define CMDID_DISCONNECT 2
344#else
345/* FIXME: These IDs should start from 0, however there is difference
346 * between ours and Windows' menu building systems, which should be fixed. */
347#define CMDID_FORMAT 1
348#define CMDID_EJECT 2
349#define CMDID_DISCONNECT 3
350#endif
351
352 if (uMsg == DFM_MERGECONTEXTMENU)
353 {
354 QCMINFO *pqcminfo = (QCMINFO *)lParam;
355
356 UINT idCmdFirst = pqcminfo->idCmdFirst;
357 UINT idCmd = 0;
358 if (!(dwFlags & FILE_READ_ONLY_VOLUME) && nDriveType != DRIVE_REMOTE && cidl == 1)
359 {
360 /* add separator and Format */
361 idCmd = idCmdFirst + CMDID_FORMAT;
362 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
364 }
365 if (nDriveType == DRIVE_REMOVABLE || nDriveType == DRIVE_CDROM)
366 {
367 /* add separator and Eject */
368 idCmd = idCmdFirst + CMDID_EJECT;
369 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
371 }
372 if (nDriveType == DRIVE_REMOTE)
373 {
374 /* add separator and Disconnect */
375 idCmd = idCmdFirst + CMDID_DISCONNECT;
376 _InsertMenuItemW(pqcminfo->hmenu, pqcminfo->indexMenu++, TRUE, 0, MFT_SEPARATOR, NULL, 0);
378 }
379
380 if (idCmd)
381#if 0 // see FIXME above
382 pqcminfo->idCmdFirst = ++idCmd;
383#else
384 pqcminfo->idCmdFirst = (idCmd + 2);
385#endif
386 hr = S_OK;
387 }
388 else if (uMsg == DFM_INVOKECOMMAND)
389 {
390 WCHAR wszBuf[4] = L"A:\\";
391 wszBuf[0] = (WCHAR)szDrive[0];
392
393 INT nStringID = 0;
394 DWORD dwError = NO_ERROR;
395
397 {
398 ATLASSERT(pdtobj);
400 // Not setting nStringID because SHOpenPropSheet already displayed an error box
401 }
402 else
403 {
404 if (wParam == CMDID_FORMAT)
405 {
406 hr = DoFormatDriveAsync(hwnd, szDrive[0] - 'A');
407 }
408 else if (wParam == CMDID_EJECT)
409 {
410 /* do eject */
411 WCHAR physical[10];
412 wsprintfW(physical, _T("\\\\.\\%c:"), szDrive[0]);
413
414 if (DoEjectDrive(physical, nDriveType, &nStringID))
415 {
417 }
418 else
419 {
420 dwError = GetLastError();
421 }
422 }
423 else if (wParam == CMDID_DISCONNECT)
424 {
425 /* do disconnect */
426 wszBuf[2] = UNICODE_NULL;
427 dwError = WNetCancelConnection2W(wszBuf, 0, FALSE);
428 if (dwError == NO_ERROR)
429 {
431 }
432 else
433 {
434 nStringID = IDS_CANTDISCONNECT;
435 }
436 }
437 }
438
439 if (nStringID != 0)
440 {
441 /* show error message */
442 WCHAR szFormat[128], szMessage[128];
443 LoadStringW(shell32_hInstance, nStringID, szFormat, _countof(szFormat));
444 wsprintfW(szMessage, szFormat, dwError);
445 MessageBoxW(hwnd, szMessage, NULL, MB_ICONERROR);
446 }
447 }
448
449 SHFree(pidlFolder);
450 _ILFreeaPidl(apidl, cidl);
451
452 return hr;
453}
#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
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
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
LPCWSTR LPCWSTR LPCWSTR DWORD dwFlags
Definition: env.c:37
#define UNICODE_NULL
void _ILFreeaPidl(LPITEMIDLIST *apidl, UINT cidl)
Definition: pidl.c:2608
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:1902
#define SHCNE_MEDIAREMOVED
Definition: shlobj.h:1901
#define SHCNF_PATHW
Definition: shlobj.h:1931
#define DFM_CMD_PROPERTIES
Definition: shlobj.h:2618
#define SHCNF_FLUSHNOWAIT
Definition: shlobj.h:1935
#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:1395
UINT idCmdFirst
Definition: shlobj.h:1397
UINT indexMenu
Definition: shlobj.h:1396
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 530 of file CDrivesFolder.cpp.

531{
532 HRESULT hr = getLabelForDriveFromAutoRun(DrivePath, szLabel, cchMax);
533 return hr == S_OK ? S_OK : GetRawDriveLabel(DrivePath, szLabel, cchMax);
534}
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:2131
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 469 of file CDrivesFolder.cpp.

475{
476 WCHAR wszPath[MAX_PATH];
477 WCHAR wszAutoRunInfPath[MAX_PATH];
478 WCHAR wszValue[MAX_PATH], wszTemp[MAX_PATH];
479
480 if (!SHELL_GetAutoRunInfPath(pszDrivePath, wszAutoRunInfPath))
481 return E_FAIL;
482 wcscpy(wszPath, pszDrivePath);
483
484 // autorun.inf --> wszValue
485 if (GetPrivateProfileStringW(L"autorun", L"icon", NULL, wszValue, _countof(wszValue),
486 wszAutoRunInfPath) && wszValue[0] != 0)
487 {
488 // wszValue --> wszTemp
489 ExpandEnvironmentStringsW(wszValue, wszTemp, _countof(wszTemp));
490
491 *piIndex = PathParseIconLocationW(wszTemp);
492
493 // wszPath + wszTemp --> wszPath
494 if (PathIsRelativeW(wszTemp))
495 PathAppendW(wszPath, wszTemp);
496 else
497 StringCchCopyW(wszPath, _countof(wszPath), wszTemp);
498
499 // wszPath --> szIconFile
500 GetFullPathNameW(wszPath, cchMax, szIconFile, NULL);
501 return S_OK;
502 }
503 return E_FAIL;
504}
static UINT SHELL_GetAutoRunInfPath(PCWSTR DrvPath, PWSTR AriPath, BOOL ForInvoke=FALSE)
wcscpy
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
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
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 507 of file CDrivesFolder.cpp.

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

Referenced by GetDriveLabel().

◆ GetRawDriveLabel()

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

Definition at line 523 of file CDrivesFolder.cpp.

524{
525 if (GetVolumeInformationW(DrivePath, szLabel, cchMax, NULL, NULL, NULL, NULL, 0))
526 return *szLabel ? S_OK : S_FALSE;
528}
#define HResultFromWin32
Definition: loader.cpp:14
#define S_FALSE
Definition: winerror.h:3452

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 536 of file CDrivesFolder.cpp.

542{
543 WCHAR szKey[200], chDrv = 'A' + DriveNum;
544 wsprintfW(szKey, L"%s\\DriveIcons\\%c\\DefaultIcon", REGSTR_PATH_EXPLORER, chDrv);
545 DWORD cb = cchMax * sizeof(*szIconFile);
547 if (err != ERROR_SUCCESS)
548 {
549 cb = cchMax * sizeof(*szIconFile);
550 wsprintfW(szKey, L"Applications\\Explorer.exe\\Drives\\%c\\DefaultIcon", chDrv);
551 err = RegGetValueW(HKEY_CLASSES_ROOT, szKey, NULL, RRF_RT_REG_SZ, NULL, szIconFile, &cb);
552 }
553 if (err != ERROR_SUCCESS)
554 return false;
555 *piIndex = PathParseIconLocationW(szIconFile);
556 return *szIconFile != UNICODE_NULL;
557}
#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
#define RRF_RT_REG_SZ
Definition: driver.c:575
static HMODULE MODULEINFO DWORD cb
Definition: module.c:33
#define err(...)
#define REGSTR_PATH_EXPLORER
Definition: regstr.h:33
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#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 WCHAR * LPCWSTR
Definition: xmlstorage.h:185

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:51

◆ SHELL32_IsShellFolderNamespaceItemHidden()

BOOL SHELL32_IsShellFolderNamespaceItemHidden ( LPCWSTR  SubKey,
REFCLSID  Clsid 
)

Definition at line 189 of file CDrivesFolder.cpp.

190{
191 // If this function returns true, the item should be hidden in DefView but not in the Explorer folder tree.
193 wsprintfW(path, L"%s\\%s", REGSTR_PATH_EXPLORER, SubKey);
195 DWORD data = 0, size = sizeof(data);
197}
#define CHARS_IN_GUID
#define RRF_RT_DWORD
Definition: driver.c:581
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
static __inline int SHELL32_GUIDToStringW(REFGUID guid, LPWSTR str)
Definition: shfldr.h:162
Definition: name.c:39
#define HKEY_CURRENT_USER
Definition: winreg.h:11

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 205 of file CDrivesFolder.cpp.

206{
207 DWORD dwError, dwBytesReturned;
208 DWORD dwCode = (bLock ? FSCTL_LOCK_VOLUME : FSCTL_UNLOCK_VOLUME);
209 for (DWORD i = 0; i < RETRY_COUNT; ++i)
210 {
211 if (DeviceIoControl(hDrive, dwCode, NULL, 0, NULL, 0, &dwBytesReturned, NULL))
212 return TRUE;
213
214 dwError = GetLastError();
215 if (dwError == ERROR_INVALID_FUNCTION)
216 break; /* don't sleep if function is not implemented */
217
219 }
220 SetLastError(dwError);
221 return FALSE;
222}
#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:790

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 669 of file CDrivesFolder.cpp.

Referenced by CDrivesFolder::GetAttributesOf().

◆ dwControlPanelAttributes

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

Definition at line 672 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 674 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