Changes the size of a file.

#define INCL_DOSFILEMGR
#include <os2.h>

HFILE     hFile;               /*  Handle of the file whose size to be changed. */
ULONG     cbSize;              /*  New size, in bytes, of the file. */
FHLOCK    fhFileHandleLockID;  /*  The filehandle lockid obtained from DosProtectOpen. */
APIRET    ulrc;                /*  Return Code. */

ulrc = DosProtectSetFileSize(hFile, cbSize,
         fhFileHandleLockID);


[Back] [Next]