Skip to content

Commit

Permalink
Revert "fix ;"
Browse files Browse the repository at this point in the history
This reverts commit bf68dc2.
  • Loading branch information
CyberGreg05 committed Mar 7, 2024
1 parent bf68dc2 commit dfdee7f
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions al-khaser/AntiVM/Generic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,13 @@ BOOL disk_size_wmi()
hRes = pEnumerator->Next(WBEM_INFINITE, 1, &pclsObj, &uReturn);
if (0 == uReturn)
break;

// Don`t check removable disk, network drive CD-ROM and RAM disk
if (checkDriveType(pclsObj)) {
pclsObj->Release();
continue;
}

// Get the value of the Name property
hRes = pclsObj->Get(_T("Size"), 0, &vtProp, NULL, 0);
if (SUCCEEDED(hRes)) {
Expand All @@ -594,32 +594,32 @@ BOOL disk_size_wmi()
if (diskSizeBytes < minHardDiskSize) { // Less than 80GB
bFound = TRUE;
}

// release the current result object
VariantClear(&vtProp);
}

// release the current result object
VariantClear(&vtProp);
}

// release class object
pclsObj->Release();

// break from while
if (bFound)
break;
}

// Cleanup
pEnumerator->Release();
pSvc->Release();
pLoc->Release();
CoUninitialize();
// release class object
pclsObj->Release();

// break from while
if (bFound)
break;
}
}

return bFound;
// Cleanup
pEnumerator->Release();
pSvc->Release();
pLoc->Release();
CoUninitialize();
}
}

return bFound;
}


/*
DeviceIoControl works with disks directly rather than partitions (GetDiskFreeSpaceEx)
We can send IOCTL_DISK_GET_LENGTH_INFO code to get the raw byte size of the physical disk
Expand Down

0 comments on commit dfdee7f

Please sign in to comment.