MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2QueryVolumeLetterStrings

Function Ext2QueryVolumeLetterStrings

Ext2Mgr/enumDisk.cpp:3616–3670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3614
3615
3616CString
3617Ext2QueryVolumeLetterStrings(
3618 ULONGLONG letters,
3619 PEXT2_LETTER * first
3620 )
3621{
3622 CHAR drvName[] = "C:\0";
3623 CString str;
3624 int i = 0;
3625 BOOL bInserted = FALSE;
3626 ULONGLONG drive = 0;
3627
3628 str.Empty();
3629
3630 for (i=0; i < 10; i++) {
3631 drive = ((ULONGLONG) 1) << (i + 32);
3632 if (letters & drive) {
3633 if (bInserted) {
3634 str += ",";
3635 } else {
3636 str = "(";
3637 if (first) {
3638 *first = &drvDigits[i];
3639 }
3640 }
3641 drvName[0] = '0' + i;
3642 str += drvName;
3643 bInserted = TRUE;
3644 }
3645 }
3646
3647 for (i=0; i < 26; i++) {
3648 drive = ((ULONGLONG) 1) << (i);
3649 if (letters & drive) {
3650 if (bInserted) {
3651 str += ",";
3652 } else {
3653 str = "(";
3654 if (first) {
3655 *first = &drvLetters[i];
3656 }
3657 }
3658
3659 drvName[0] = 'A' + i;
3660 str += drvName;
3661 bInserted = TRUE;
3662 }
3663 }
3664
3665 if (bInserted) {
3666 str += ")";
3667 }
3668
3669 return str;
3670}
3671
3672VOID
3673Ext2RefreshVLVI(

Callers 11

Ext2PartInformationFunction · 0.85
Ext2CdromInformationFunction · 0.85
Ext2VolumeInformationFunction · 0.85
Ext2RefreshVLVIFunction · 0.85
Ext2RefreshVLCDFunction · 0.85
Ext2RefreshDVPTFunction · 0.85
Ext2RefreshDVCMFunction · 0.85
SetVolumeMethod · 0.85
SetPartitionMethod · 0.85
SetCdromMethod · 0.85
QuerySelectedItemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected