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

Function Ext2RemoveDrvLetter

Ext2Mgr/enumDisk.cpp:4261–4288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4259}
4260
4261BOOL
4262Ext2RemoveDrvLetter(
4263 PEXT2_LETTER drvLetter
4264 )
4265{
4266 CHAR drvPath[] = "A:\\\0";
4267 CHAR dosPath[] = "A:\0";
4268
4269 BOOL rc = FALSE;
4270
4271 if (!drvLetter->bUsed) {
4272 return TRUE;
4273 }
4274
4275 dosPath[0] = drvPath[0] = drvLetter->Letter;
4276 rc = Ext2DefineDosDevice (
4277 DDD_RAW_TARGET_PATH|
4278 DDD_REMOVE_DEFINITION|
4279 DDD_EXACT_MATCH_ON_REMOVE,
4280 dosPath, drvLetter->SymLink);
4281 DeleteVolumeMountPoint(drvPath);
4282
4283 if (!rc) {
4284 return FALSE;
4285 }
4286
4287 return TRUE;
4288}
4289
4290CHAR
4291Ext2QueryRegistryMountPoint (

Callers 2

Ext2RemoveDriveLetterFunction · 0.70
RemoveMountPointMethod · 0.70

Calls 1

Ext2DefineDosDeviceFunction · 0.85

Tested by

no test coverage detected