SetDPB_SetAllocInfo (FAT32)

[Windows 95 only.]

Sets the dpb_free_cnt and dpb_next_free fields in the DPB.

This sub-function is called when the SetDPB_Function field of the SDPDFormatStruc (FAT32) structure is set to 0.

Return Values

Clears the carry flag and sets the dpb_free_cnt and dpb_next_free fields in the DPB based upon the values in the SetDPB_Value1 and SetDPB_Value2 fields within the Set_DPB_ForFormat structure.

Remarks

SetDPB_Value1 Setting Result within DPB
0 Does not change the dpb_free_cnt field.
0xFFFFFFFF Sets dpb_free_cnt to unknown.
(any other value) Sets dpb_free_cnt to the specified value if it is a valid cluster count for the drive,.

The free cluster count cannot be explicitly set to zero by this call. This can only be done by setting SetDPB_Value1 to 0xFFFFFFFF, which forces the free space to be re-computed. Also, setting this value improperly causes the free count value to be reported improperly by GetDiskFreeSpace. The settings of 0 or 0xFFFFFFFF are recommended.

SetDPB_Value2 Setting Result within DPB
0 Does not change the dpb_next_free field.
0xFFFFFFFF Sets dpb_next_free to force the cluster search to begin at the beginning of the FAT.
(any other value) Sets dpb_next_free to the given value if it is a valid cluster number for the drive. This causes the search for free clusters to begin at the specified cluster.

The assembler calling sequence for all Int 21h 7304h sub-functions is almost identical. See the main listing for a sample. (Int 21h Function 7304h Set_DPBForFormat (FAT32))