Here is some code to try...
program main
c_external GetDiskSpaceInformation 'GetDiskSpaceInformationA'(INSTRING,REF):LOGICAL
type DISK_SPACE_INFORMATION
sequence
integer(4) ActualTotalAllocationUnits;
integer(4) ActualAvailableAllocationUnits;
integer(4) ActualPoolUnavailableAllocationUnits;
integer(4) CallerTotalAllocationUnits;
integer(4) CallerAvailableAllocationUnits;
integer(4) CallerPoolUnavailableAllocationUnits;
integer(4) UsedAllocationUnits;
integer(4) TotalReservedAllocationUnits;
integer(4) VolumeStorageReserveAllocationUnits;
integer(4) AvailableCommittedAllocationUnits;
integer(4) PoolAvailableAllocationUnits;
integer(3) SectorsPerAllocationUnit;
integer(3) BytesPerSector;
end type
type(DISK_SPACE_INFORMATION)::diskSpaceInfo
logical res
diskSpaceInfo = DISK_SPACE_INFORMATION(0,0,0,0,0,0,0,0,0,0,0,0,0)
res = GetDiskSpaceInformation('C:\', diskSpaceInfo)
print*, diskSpaceInfo
end program
res returns FALSE (which is wrong) but the data structure is filled.