---
name: "FDITruncateCabinet"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/FDITruncateCabinet"
---

# FDITruncateCabinet(3w)

## NAME

**FDITruncateCabinet** (CABINET.24)

## SYNOPSIS

BOOL FDITruncateCabinet\
  (\
   HFDI   *hfdi*,\
   char\*  *pszCabinetName*,\
   USHORT *iFolderToDelete*\
  )

## DESCRIPTION

Removes all folders of a cabinet file after and including the specified folder number.

## PARAMS

*hfdi* **\[In\]**  Handle to the **FDI** context.

*pszCabinetName* **\[In\]**  Filename of the cabinet.

*iFolderToDelete* **\[In\]**  Index of the first folder to delete.

## RETURNS

**Success:** **TRUE**.

**Failure:** **FALSE**.

## NOTES

The **PFNWRITE** function supplied to FDICreate must truncate the file at the current position if the number of bytes to write is **0.**

## IMPLEMENTATION

Declared in **"fdi.h"**.

Implemented in **"dlls/cabinet/fdi.c"**.

Debug channel **"cabinet"**.
