INF: How to Truncate a File ID Number: Q32800
2.x 3.x 4.x 5.00 MS-DOS
Summary:
The following is a fast algorithm for truncating a file handle using the MS-DOS file handle services of interrupt 21h:
- Open the file using interrupt 21h service 03Dh (open file handle).
- Move the file pointer to the point at which truncation is to occur using interrupt 21h service 042h (move file handle pointer).
- Write 0 bytes to the file using interrupt 21h service 040h (write file handle).
- Close the file using interrupt 21h service 03Eh (close file handle).