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

# Extract(3w)

## NAME

**Extract** (CABINET.3)

## SYNOPSIS

HRESULT Extract\
  (\
   SESSION\* *dest*,\
   LPCSTR   *szCabName*\
  )

## DESCRIPTION

Extracts the contents of the cabinet file to the specified destination.

## PARAMS

*dest* **\[In/Out\]**  Controls the operation of Extract. See **NOTES**.

*szCabName* **\[In\]**  Filename of the cabinet to extract.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **E\_FAIL**.

## NOTES

The following members of the *dest* struct control the operation of Extract: FileSize \[Out\] The size of all files extracted up to CurrentFile. Error \[Out\] The error in case the extract operation fails. FileList \[In\]  A linked list of filenames. Extract only extracts. files from the cabinet that are in this list. FileCount \[Out\] Contains the number of files in FileList on. completion. Operation \[In\]  See Operation. Destination \[In\]  The destination directory. CurrentFile \[Out\] The last file extracted. FilterList \[In\]  A linked list of files that should not be extracted.

Operation If Operation contains **EXTRACT\_FILLFILELIST**, then FileList will be filled with all the files in the cabinet. If Operation contains **EXTRACT\_EXTRACTFILES**, then only the files in the FileList will be extracted from the cabinet. **EXTRACT\_FILLFILELIST** can be called by itself, but **EXTRACT\_EXTRACTFILES** must have a valid FileList in order to succeed. If Operation contains both **EXTRACT\_FILLFILELIST** and **EXTRACT\_EXTRACTFILES**, then all the files in the cabinet will be extracted.

## IMPLEMENTATION

Declared in **"cabinet.h"**.

Implemented in **"dlls/cabinet/cabinet\_main.c"**.

Debug channel **"cabinet"**.
