Relative Content

Tag Archive for windowswinapiusb-drive

Does WinAPI `GetDiskSpaceInformationA` support USB volumes?

I’m trying to use the WinAPI function GetDiskSpaceInformationA (or its Unicode counterpart GetDiskSpaceInformationW) to retrieve disk space information for USB volumes on Windows. However, I’ve encountered an issue where these functions seem to work for internal disks (e.g., C:), but fail with the error ERROR_INVALID_PARAMETER when I try to use them on USB volumes.