Previous | Next |
The GetTotalBad method retrieves the total amount of unusable space on the storage medium.
Syntax
HRESULT GetTotalBad(
DWORD* pdwBadLow,
DWORD* pdwBadHigh
);
Parameters
pdwBadLow
[out] Pointer to a double word containing the low-order bytes identifying the amount of unusable space.
pdwBadHigh
[out] Pointer to a double word containing the high-order bytes identifying the amount of unusable space.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
E_INVALIDARG | Either pdwBadLow or pdwBadHigh is an invalid or NULL pointer. |
WMDM_E_NOTSUPPORTED | The device is not capable of retrieving the amount of unusable space on the storage medium. |
E_FAIL | An unspecified error occurred. |
Remarks
To determine the amount of storage space in use by the medium for file management, subtract the number of bad bytes identified with GetTotalBad from the number of free bytes identified with GetTotalFree.
See Also
Previous | Next |