Added stub implementation of cabinet.dll.

diff --git a/configure b/configure
index 881f855..d4fbe3a 100755
--- a/configure
+++ b/configure
@@ -13655,7 +13655,7 @@
 MAKE_PROG_RULES=programs/Makeprog.rules
 
 
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rundll32/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile"
+                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ac_config_files="$ac_config_files Make.rules dlls/Makedll.rules dlls/Maketest.rules programs/Makeprog.rules Makefile dlls/Makefile dlls/advapi32/Makefile dlls/advapi32/tests/Makefile dlls/avicap32/Makefile dlls/avifil32/Makefile dlls/cabinet/Makefile dlls/comcat/Makefile dlls/comctl32/Makefile dlls/commdlg/Makefile dlls/crtdll/Makefile dlls/crypt32/Makefile dlls/d3d8/Makefile dlls/dciman32/Makefile dlls/ddraw/Makefile dlls/devenum/Makefile dlls/dinput/Makefile dlls/dinput8/Makefile dlls/dplay/Makefile dlls/dplayx/Makefile dlls/dsound/Makefile dlls/gdi/Makefile dlls/gdi/tests/Makefile dlls/glu32/Makefile dlls/icmp/Makefile dlls/imagehlp/Makefile dlls/imm32/Makefile dlls/kernel/Makefile dlls/kernel/tests/Makefile dlls/lzexpand/Makefile dlls/mapi32/Makefile dlls/mpr/Makefile dlls/msacm/Makefile dlls/msacm/imaadp32/Makefile dlls/msacm/msadp32/Makefile dlls/msacm/msg711/Makefile dlls/msacm/winemp3/Makefile dlls/msdmo/Makefile dlls/msimg32/Makefile dlls/msisys/Makefile dlls/msnet32/Makefile dlls/msvcrt/Makefile dlls/msvcrt/tests/Makefile dlls/msvcrt20/Makefile dlls/msvideo/Makefile dlls/msvideo/msrle32/Makefile dlls/netapi32/Makefile dlls/netapi32/tests/Makefile dlls/ntdll/Makefile dlls/ntdll/tests/Makefile dlls/odbc32/Makefile dlls/ole32/Makefile dlls/oleaut32/Makefile dlls/oleaut32/tests/Makefile dlls/olecli/Makefile dlls/oledlg/Makefile dlls/olepro32/Makefile dlls/olesvr/Makefile dlls/opengl32/Makefile dlls/psapi/Makefile dlls/qcap/Makefile dlls/quartz/Makefile dlls/rasapi32/Makefile dlls/richedit/Makefile dlls/rpcrt4/Makefile dlls/rpcrt4/tests/Makefile dlls/serialui/Makefile dlls/setupapi/Makefile dlls/shdocvw/Makefile dlls/shell32/Makefile dlls/shell32/tests/Makefile dlls/shfolder/Makefile dlls/shlwapi/Makefile dlls/shlwapi/tests/Makefile dlls/snmpapi/Makefile dlls/sti/Makefile dlls/tapi32/Makefile dlls/ttydrv/Makefile dlls/twain/Makefile dlls/url/Makefile dlls/urlmon/Makefile dlls/urlmon/tests/Makefile dlls/user/Makefile dlls/user/tests/Makefile dlls/version/Makefile dlls/win32s/Makefile dlls/winaspi/Makefile dlls/winedos/Makefile dlls/wineps/Makefile dlls/wininet/Makefile dlls/wininet/tests/Makefile dlls/winmm/Makefile dlls/winmm/joystick/Makefile dlls/winmm/mcianim/Makefile dlls/winmm/mciavi/Makefile dlls/winmm/mcicda/Makefile dlls/winmm/mciseq/Makefile dlls/winmm/mciwave/Makefile dlls/winmm/midimap/Makefile dlls/winmm/tests/Makefile dlls/winmm/wavemap/Makefile dlls/winmm/winealsa/Makefile dlls/winmm/winearts/Makefile dlls/winmm/wineaudioio/Makefile dlls/winmm/winenas/Makefile dlls/winmm/wineoss/Makefile dlls/winnls/Makefile dlls/winsock/Makefile dlls/winsock/tests/Makefile dlls/winspool/Makefile dlls/wintrust/Makefile dlls/wow32/Makefile dlls/wsock32/Makefile dlls/x11drv/Makefile documentation/Makefile include/Makefile library/Makefile miscemu/Makefile ole/Makefile programs/Makefile programs/avitools/Makefile programs/clock/Makefile programs/cmdlgtst/Makefile programs/control/Makefile programs/expand/Makefile programs/notepad/Makefile programs/osversioncheck/Makefile programs/progman/Makefile programs/regapi/Makefile programs/regedit/Makefile programs/regsvr32/Makefile programs/regtest/Makefile programs/rundll32/Makefile programs/uninstaller/Makefile programs/view/Makefile programs/wcmd/Makefile programs/wineconsole/Makefile programs/winedbg/Makefile programs/winefile/Makefile programs/winemine/Makefile programs/winepath/Makefile programs/winhelp/Makefile programs/winver/Makefile server/Makefile tools/Makefile tools/widl/Makefile tools/winapi/Makefile tools/winebuild/Makefile tools/winedump/Makefile tools/wmc/Makefile tools/wpp/Makefile tools/wrc/Makefile unicode/Makefile"
 
 
 cat >confcache <<\_ACEOF
@@ -14175,6 +14175,7 @@
   "dlls/advapi32/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/advapi32/tests/Makefile" ;;
   "dlls/avicap32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avicap32/Makefile" ;;
   "dlls/avifil32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/avifil32/Makefile" ;;
+  "dlls/cabinet/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/cabinet/Makefile" ;;
   "dlls/comcat/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/comcat/Makefile" ;;
   "dlls/comctl32/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/comctl32/Makefile" ;;
   "dlls/commdlg/Makefile" ) CONFIG_FILES="$CONFIG_FILES dlls/commdlg/Makefile" ;;
diff --git a/configure.ac b/configure.ac
index f36a301..b721e38 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1389,6 +1389,7 @@
 dlls/advapi32/tests/Makefile
 dlls/avicap32/Makefile
 dlls/avifil32/Makefile
+dlls/cabinet/Makefile
 dlls/comcat/Makefile
 dlls/comctl32/Makefile
 dlls/commdlg/Makefile
diff --git a/dlls/Makefile.in b/dlls/Makefile.in
index 15098f5..28a7c3f 100644
--- a/dlls/Makefile.in
+++ b/dlls/Makefile.in
@@ -18,6 +18,7 @@
 	advapi32 \
 	avicap32 \
 	avifil32 \
+	cabinet \
 	comcat \
 	comctl32 \
 	commdlg \
@@ -177,6 +178,7 @@
 	advapi32.dll$(DLLEXT) \
 	avicap32.dll$(DLLEXT) \
 	avifil32.dll$(DLLEXT) \
+	cabinet.dll$(DLLEXT) \
 	comcat.dll$(DLLEXT) \
 	comctl32.dll$(DLLEXT) \
 	comdlg32.dll$(DLLEXT) \
@@ -277,6 +279,9 @@
 avifil32.dll$(DLLEXT) avifile.dll$(DLLEXT): avifil32/avifil32.dll$(DLLEXT)
 	$(RM) $@ && $(LN_S) avifil32/avifil32.dll$(DLLEXT) $@
 
+cabinet.dll$(DLLEXT): cabinet/cabinet.dll$(DLLEXT)
+	$(RM) $@ && $(LN_S) cabinet/cabinet.dll$(DLLEXT) $@
+
 comcat.dll$(DLLEXT): comcat/comcat.dll$(DLLEXT)
 	$(RM) $@ && $(LN_S) comcat/comcat.dll$(DLLEXT) $@
 
@@ -567,6 +572,7 @@
 advapi32/advapi32.dll$(DLLEXT): advapi32
 avicap32/avicap32.dll$(DLLEXT): avicap32
 avifil32/avifil32.dll$(DLLEXT): avifil32
+cabinet/cabinet.dll$(DLLEXT): cabinet
 comcat/comcat.dll$(DLLEXT): comcat
 comctl32/comctl32.dll$(DLLEXT): comctl32
 commdlg/comdlg32.dll$(DLLEXT): commdlg
@@ -666,6 +672,7 @@
 advapi32/__install__: advapi32.dll$(DLLEXT)
 avicap32/__install__: avicap32.dll$(DLLEXT)
 avifil32/__install__: avifil32.dll$(DLLEXT)
+cabinet/__install__: cabinet.dll$(DLLEXT)
 comcat/__install__: comcat.dll$(DLLEXT)
 comctl32/__install__: comctl32.dll$(DLLEXT)
 commdlg/__install__: comdlg32.dll$(DLLEXT)
@@ -766,6 +773,7 @@
 avicap32: ntdll.dll$(DLLEXT)
 avifil32: msacm32.dll$(DLLEXT) msvfw32.dll$(DLLEXT) shell32.dll$(DLLEXT) winmm.dll$(DLLEXT) \
           user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
+cabinet:  kernel32.dll$(DLLEXT)
 comcat:   ole32.dll$(DLLEXT) user32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT)
 comctl32: user32.dll$(DLLEXT) gdi32.dll$(DLLEXT) advapi32.dll$(DLLEXT) kernel32.dll$(DLLEXT) \
           winmm.dll$(DLLEXT)
diff --git a/dlls/cabinet/.cvsignore b/dlls/cabinet/.cvsignore
new file mode 100644
index 0000000..282711e
--- /dev/null
+++ b/dlls/cabinet/.cvsignore
@@ -0,0 +1,3 @@
+Makefile
+cabinet.dll.dbg.c
+cabinet.spec.c
diff --git a/dlls/cabinet/Makefile.in b/dlls/cabinet/Makefile.in
new file mode 100644
index 0000000..c691de8
--- /dev/null
+++ b/dlls/cabinet/Makefile.in
@@ -0,0 +1,16 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+MODULE    = cabinet.dll
+
+LDDLLFLAGS = @LDDLLFLAGS@
+SYMBOLFILE = $(MODULE).tmp.o
+
+C_SRCS = \
+	fci.c \
+	fdi.c
+
+@MAKE_DLL_RULES@
+
+### Dependencies:
diff --git a/dlls/cabinet/cabinet.spec b/dlls/cabinet/cabinet.spec
new file mode 100644
index 0000000..c62b705
--- /dev/null
+++ b/dlls/cabinet/cabinet.spec
@@ -0,0 +1,14 @@
+1 stub GetDllVersion
+2 stub DllGetVersion
+3 stub Extract
+4 stub DeleteExtractedFiles
+10 cdecl FCICreate(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr) FCICreate
+11 cdecl FCIAddFile(long ptr ptr long ptr ptr ptr long) FCIAddFile
+12 cdecl FCIFlushFolder(long ptr ptr) FCIFlushFolder
+13 cdecl FCIFlushCabinet(long long ptr ptr) FCIFlushCabinet
+14 cdecl FCIDestroy(long) FCIDestroy
+20 cdecl FDICreate(ptr ptr ptr ptr ptr ptr ptr long ptr) FDICreate
+21 cdecl FDIIsCabinet(long long ptr) FDIIsCabinet
+22 cdecl FDICopy(long ptr ptr long ptr ptr ptr) FDICopy
+23 cdecl FDIDestroy(long) FDIDestroy
+24 cdecl FDITruncateCabinet(long ptr long) FDITruncateCabinet
diff --git a/dlls/cabinet/fci.c b/dlls/cabinet/fci.c
new file mode 100644
index 0000000..ec3af3b
--- /dev/null
+++ b/dlls/cabinet/fci.c
@@ -0,0 +1,96 @@
+/*
+ * File Compression Interface
+ *
+ * Copyright 2002 Patrik Stridvall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "config.h"
+
+#include "windef.h"
+#include "fci.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
+
+/***********************************************************************
+ *		FCICreate (CABINET.10)
+ */
+HFCI __cdecl FCICreate(
+	PERF perf,
+	PFNFCIFILEPLACED   pfnfcifp,
+	PFNFCIALLOC        pfna,
+	PFNFCIFREE         pfnf,
+	PFNFCIOPEN         pfnopen,
+	PFNFCIREAD         pfnread,
+	PFNFCIWRITE        pfnwrite,
+	PFNFCICLOSE        pfnclose,
+	PFNFCISEEK         pfnseek,
+	PFNFCIDELETE       pfndelete,
+	PFNFCIGETTEMPFILE  pfnfcigtf,
+	PCCAB              pccab,
+	void *pv)
+{
+    return NULL;
+}
+
+/***********************************************************************
+ *		FCIAddFile (CABINET.11)
+ */
+BOOL __cdecl FCIAddFile(
+	HFCI                  hfci,
+	char                 *pszSourceFile,
+	char                 *pszFileName,
+	BOOL                  fExecute,
+	PFNFCIGETNEXTCABINET  pfnfcignc,
+	PFNFCISTATUS          pfnfcis,
+	PFNFCIGETOPENINFO     pfnfcigoi,
+	TCOMP                 typeCompress)
+{
+    return FALSE;
+}
+
+/***********************************************************************
+ *		FCIFlushCabinet (CABINET.13)
+ */
+BOOL __cdecl FCIFlushCabinet(
+	HFCI                  hfci,
+	BOOL                  fGetNextCab,
+	PFNFCIGETNEXTCABINET  pfnfcignc,
+	PFNFCISTATUS          pfnfcis)
+{
+  return FALSE;
+}
+
+/***********************************************************************
+ *		FCIFlushFolder (CABINET.12)
+ */
+BOOL __cdecl FCIFlushFolder(
+	HFCI                  hfci,
+	PFNFCIGETNEXTCABINET  pfnfcignc,
+	PFNFCISTATUS          pfnfcis)
+{
+  return FALSE;
+}
+
+/***********************************************************************
+ *		FCIDestroy (CABINET.14)
+ */
+BOOL __cdecl FCIDestroy(HFCI hfci)
+{
+  return FALSE;
+}
diff --git a/dlls/cabinet/fdi.c b/dlls/cabinet/fdi.c
new file mode 100644
index 0000000..fd98fcd
--- /dev/null
+++ b/dlls/cabinet/fdi.c
@@ -0,0 +1,91 @@
+/*
+ * File Decompression Interface
+ *
+ * Copyright 2002 Patrik Stridvall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "config.h"
+
+#include "windef.h"
+#include "fdi.h"
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
+
+/***********************************************************************
+ *		FDICreate (CABINET.20)
+ */
+HFDI __cdecl FDICreate(
+	PFNALLOC pfnalloc,
+	PFNFREE  pfnfree,
+	PFNOPEN  pfnopen,
+	PFNREAD  pfnread,
+	PFNWRITE pfnwrite,
+	PFNCLOSE pfnclose,
+	PFNSEEK  pfnseek,
+	int      cpuType,
+	PERF     perf)
+{
+    return NULL;
+}
+
+
+/***********************************************************************
+ *		FDICreate (CABINET.20)
+ */
+BOOL __cdecl FDIIsCabinet(
+	HFDI            hfdi,
+	INT_PTR         hf,
+	PFDICABINETINFO pfdici)
+{
+    return FALSE;
+}
+
+/***********************************************************************
+ *		FDICreate (CABINET.20)
+ */
+BOOL __cdecl FDICopy(
+	HFDI           hfdi,
+	char          *pszCabinet,
+	char          *pszCabPath,
+	int            flags,
+	PFNFDINOTIFY   pfnfdin,
+	PFNFDIDECRYPT  pfnfdid,
+	void          *pvUser)
+{
+    return FALSE;
+}
+
+/***********************************************************************
+ *		FDICreate (CABINET.20)
+ */
+BOOL __cdecl FDIDestroy(HFDI hfdi)
+{
+    return FALSE;
+}
+
+/***********************************************************************
+ *		FDICreate (CABINET.20)
+ */
+BOOL __cdecl FDITruncateCabinet(
+	HFDI    hfdi,
+	char   *pszCabinetName,
+	USHORT  iFolderToDelete)
+{
+    return FALSE;
+}
diff --git a/include/Makefile.in b/include/Makefile.in
index 0d19a9a..68db50e 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -37,6 +37,8 @@
 	dplobby.h \
 	dshow.h \
 	dsound.h \
+	fci.h \
+	fdi.h \
 	guiddef.h \
 	imagehlp.h \
 	imm.h \
diff --git a/include/fci.h b/include/fci.h
new file mode 100644
index 0000000..267e6ec
--- /dev/null
+++ b/include/fci.h
@@ -0,0 +1,257 @@
+/*
+ * Copyright (C) 2002 Patrik Stridvall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __WINE_FCI_H
+#define __WINE_FCI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+#include "pshpack4.h"
+
+#ifndef INCLUDED_TYPES_FCI_FDI
+#define INCLUDED_TYPES_FCI_FDI 1
+
+/***********************************************************************
+ * Common FCI/TDI declarations
+ */
+
+typedef unsigned long CHECKSUM;
+
+typedef unsigned long UOFF;
+typedef unsigned long COFF;
+
+/**********************************************************************/
+
+typedef struct {
+    int   erfOper;  /* FCI/FDI error code - see {FCI,FDI}ERROR_XXX for details. */
+    int   erfType;  /* Optional error value filled in by FCI/FDI. */
+    BOOL  fError;   /* TRUE => error present */
+} ERF, PERF;
+
+/**********************************************************************/
+
+#define CB_MAX_CHUNK         32768U
+#define CB_MAX_DISK          0x7fffffffL
+#define CB_MAX_FILENAME      256
+#define CB_MAX_CABINET_NAME  256
+#define CB_MAX_CAB_PATH      256
+#define CB_MAX_DISK_NAME     256
+
+/**********************************************************************/
+
+typedef unsigned short TCOMP;
+
+#define tcompMASK_TYPE          0x000F  /* Mask for compression type */
+#define tcompTYPE_NONE          0x0000  /* No compression */
+#define tcompTYPE_MSZIP         0x0001  /* MSZIP */
+#define tcompTYPE_QUANTUM       0x0002  /* Quantum */
+#define tcompTYPE_LZX           0x0003  /* LZX */
+#define tcompBAD                0x000F  /* Unspecified compression type */
+
+#define tcompMASK_LZX_WINDOW    0x1F00  /* Mask for LZX Compression Memory */
+#define tcompLZX_WINDOW_LO      0x0F00  /* Lowest LZX Memory (15) */
+#define tcompLZX_WINDOW_HI      0x1500  /* Highest LZX Memory (21) */
+#define tcompSHIFT_LZX_WINDOW        8  /* Amount to shift over to get int */
+
+#define tcompMASK_QUANTUM_LEVEL 0x00F0  /* Mask for Quantum Compression Level */
+#define tcompQUANTUM_LEVEL_LO   0x0010  /* Lowest Quantum Level (1) */
+#define tcompQUANTUM_LEVEL_HI   0x0070  /* Highest Quantum Level (7) */
+#define tcompSHIFT_QUANTUM_LEVEL     4  /* Amount to shift over to get int */
+
+#define tcompMASK_QUANTUM_MEM   0x1F00  /* Mask for Quantum Compression Memory */
+#define tcompQUANTUM_MEM_LO     0x0A00  /* Lowest Quantum Memory (10) */
+#define tcompQUANTUM_MEM_HI     0x1500  /* Highest Quantum Memory (21) */
+#define tcompSHIFT_QUANTUM_MEM       8  /* Amount to shift over to get int */
+
+#define tcompMASK_RESERVED      0xE000  /* Reserved bits (high 3 bits) */
+
+/**********************************************************************/
+
+#define CompressionTypeFromTCOMP(tc) \
+    ((tc) & tcompMASK_TYPE)
+
+#define CompressionLevelFromTCOMP(tc) \
+    (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL)
+
+#define CompressionMemoryFromTCOMP(tc) \
+    (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM)
+
+#define TCOMPfromTypeLevelMemory(t, l, m) \
+    (((m) << tcompSHIFT_QUANTUM_MEM  ) | \
+     ((l) << tcompSHIFT_QUANTUM_LEVEL) | \
+     ( t                             ))
+
+#define LZXCompressionWindowFromTCOMP(tc) \
+    (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW)
+
+#define TCOMPfromLZXWindow(w) \
+    (((w) << tcompSHIFT_LZX_WINDOW) | \
+     ( tcompTYPE_LZX              ))
+
+#endif /* !defined(INCLUDED_TYPES_FCI_FDI) */
+
+/***********************************************************************
+ * FCI declarations
+ */
+
+typedef enum {
+    FCIERR_NONE,
+    FCIERR_OPEN_SRC,
+    FCIERR_READ_SRC,
+    FCIERR_ALLOC_FAIL,
+    FCIERR_TEMP_FILE,
+    FCIERR_BAD_COMPR_TYPE,
+    FCIERR_CAB_FILE,
+    FCIERR_USER_ABORT,
+    FCIERR_MCI_FAIL,
+} FCIERROR;
+
+/**********************************************************************/
+
+#ifndef _A_NAME_IS_UTF
+#define _A_NAME_IS_UTF  0x80
+#endif
+
+#ifndef _A_EXEC
+#define _A_EXEC         0x40
+#endif
+
+/**********************************************************************/
+
+typedef void *HFCI;
+
+/**********************************************************************/
+
+typedef struct {
+    ULONG cb;              /* Size available for cabinet on this media */
+    ULONG cbFolderThresh;  /* Threshold for forcing a new Folder */
+
+    UINT  cbReserveCFHeader;     /* Space to reserve in CFHEADER */
+    UINT  cbReserveCFFolder;     /* Space to reserve in CFFOLDER */
+    UINT  cbReserveCFData;       /* Space to reserve in CFDATA */
+    int   iCab;                  /* Sequential numbers for cabinets */
+    int   iDisk;                 /* Disk number */
+#ifndef REMOVE_CHICAGO_M6_HACK
+    int   fFailOnIncompressible; /* TRUE => Fail if a block is incompressible */
+#endif
+
+    USHORT setID; /* Cabinet set ID */
+
+    char szDisk[CB_MAX_DISK_NAME];   /* Current disk name */
+    char szCab[CB_MAX_CABINET_NAME]; /* Current cabinet name */
+    char szCabPath[CB_MAX_CAB_PATH]; /* Path for creating cabinet */
+} CCAB, *PCCAB;
+
+/**********************************************************************/
+
+typedef void * (__cdecl *PFNFCIALLOC)(ULONG cb);
+#define FNFCIALLOC(fn) void * __cdecl fn(ULONG cb)
+
+typedef void (__cdecl *PFNFCIFREE)(void *memory);
+#define FNFCIFREE(fn) void __cdecl fn(void *memory)
+
+typedef INT_PTR (__cdecl *PFNFCIOPEN) (char *pszFile, int oflag, int pmode, int *err, void *pv);
+#define FNFCIOPEN(fn) INT_PTR __cdecl fn(char *pszFile, int oflag, int pmode, int *err, void *pv)
+
+typedef UINT (__cdecl *PFNFCIREAD) (INT_PTR hf, void *memory, UINT cb, int *err, void *pv);
+#define FNFCIREAD(fn) UINT __cdecl fn(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
+
+typedef UINT (__cdecl *PFNFCIWRITE)(INT_PTR hf, void *memory, UINT cb, int *err, void *pv);
+#define FNFCIWRITE(fn) UINT __cdecl fn(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
+
+typedef int  (__cdecl *PFNFCICLOSE)(INT_PTR hf, int *err, void *pv);
+#define FNFCICLOSE(fn) int __cdecl fn(INT_PTR hf, int *err, void *pv)
+
+typedef long (__cdecl *PFNFCISEEK) (INT_PTR hf, long dist, int seektype, int *err, void *pv);
+#define FNFCISEEK(fn) long __cdecl fn(INT_PTR hf, long dist, int seektype, int *err, void *pv)
+
+typedef int  (__cdecl *PFNFCIDELETE) (char *pszFile, int *err, void *pv);
+#define FNFCIDELETE(fn) int __cdecl fn(char *pszFile, int *err, void *pv)
+
+typedef BOOL (__cdecl *PFNFCIGETNEXTCABINET)(PCCAB pccab, ULONG  cbPrevCab, void *pv);
+#define FNFCIGETNEXTCABINET(fn) BOOL __cdecl fn(PCCAB pccab, \
+						ULONG  cbPrevCab, \
+						void *pv)
+
+typedef int (__cdecl *PFNFCIFILEPLACED)(PCCAB pccab,
+					char *pszFile,
+					long  cbFile,
+					BOOL  fContinuation,
+					void *pv);
+#define FNFCIFILEPLACED(fn) int __cdecl fn(PCCAB pccab, \
+					   char *pszFile, \
+					   long  cbFile, \
+					   BOOL  fContinuation, \
+					   void *pv)
+
+typedef INT_PTR (__cdecl *PFNFCIGETOPENINFO)(char *pszName,
+					     USHORT *pdate,
+					     USHORT *ptime,
+					     USHORT *pattribs,
+					     int *err,
+					     void *pv);
+#define FNFCIGETOPENINFO(fn) INT_PTR __cdecl fn(char *pszName, \
+						USHORT *pdate, \
+						USHORT *ptime, \
+						USHORT *pattribs, \
+						int *err, \
+						void *pv)
+
+#define statusFile     0  /* Add File to Folder callback */
+#define statusFolder   1  /* Add Folder to Cabinet callback */
+#define statusCabinet  2  /* Write out a completed cabinet callback */
+
+typedef long (__cdecl *PFNFCISTATUS)(UINT typeStatus,
+				     ULONG cb1,
+				     ULONG cb2,
+				     void *pv);
+#define FNFCISTATUS(fn) long __cdecl fn(UINT typeStatus, \
+					ULONG  cb1, \
+					ULONG  cb2, \
+					void *pv)
+
+typedef BOOL (__cdecl *PFNFCIGETTEMPFILE)(char *pszTempName,
+					  int   cbTempName,
+					  void *pv);
+#define FNFCIGETTEMPFILE(fn) BOOL __cdecl fn(char *pszTempName, \
+                                             int   cbTempName, \
+                                             void *pv)
+
+/**********************************************************************/
+
+HFCI __cdecl FCICreate(PERF, PFNFCIFILEPLACED, PFNFCIALLOC, PFNFCIFREE,
+		       PFNFCIOPEN, PFNFCIREAD, PFNFCIWRITE, PFNFCICLOSE,
+		       PFNFCISEEK, PFNFCIDELETE, PFNFCIGETTEMPFILE, PCCAB,
+		       void *);
+BOOL __cdecl FCIAddFile(HFCI, char *, char *, BOOL, PFNFCIGETNEXTCABINET,
+			PFNFCISTATUS, PFNFCIGETOPENINFO, TCOMP);
+BOOL __cdecl FCIFlushCabinet(HFCI, BOOL, PFNFCIGETNEXTCABINET, PFNFCISTATUS);
+BOOL __cdecl FCIFlushFolder(HFCI, PFNFCIGETNEXTCABINET, PFNFCISTATUS);
+BOOL __cdecl FCIDestroy(HFCI hfci);
+
+/**********************************************************************/
+
+#include "poppack.h"
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif  /* __WINE_FCI_H */
diff --git a/include/fdi.h b/include/fdi.h
new file mode 100644
index 0000000..f4f912a
--- /dev/null
+++ b/include/fdi.h
@@ -0,0 +1,291 @@
+/*
+ * Copyright (C) 2002 Patrik Stridvall
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#ifndef __WINE_FDI_H
+#define __WINE_FDI_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* defined(__cplusplus) */
+
+#include "pshpack4.h"
+
+#ifndef INCLUDED_TYPES_FCI_FDI
+#define INCLUDED_TYPES_FCI_FDI 1
+
+/***********************************************************************
+ * Common FCI/TDI declarations
+ */
+
+typedef unsigned long CHECKSUM;
+
+typedef unsigned long UOFF;
+typedef unsigned long COFF;
+
+/**********************************************************************/
+
+typedef struct {
+    int   erfOper;  /* FCI/FDI error code - see {FCI,FDI}ERROR_XXX for details. */
+    int   erfType;  /* Optional error value filled in by FCI/FDI. */
+    BOOL  fError;   /* TRUE => error present */
+} ERF, PERF;
+
+/**********************************************************************/
+
+#define CB_MAX_CHUNK         32768U
+#define CB_MAX_DISK          0x7fffffffL
+#define CB_MAX_FILENAME      256
+#define CB_MAX_CABINET_NAME  256
+#define CB_MAX_CAB_PATH      256
+#define CB_MAX_DISK_NAME     256
+
+/**********************************************************************/
+
+typedef unsigned short TCOMP;
+
+#define tcompMASK_TYPE          0x000F  /* Mask for compression type */
+#define tcompTYPE_NONE          0x0000  /* No compression */
+#define tcompTYPE_MSZIP         0x0001  /* MSZIP */
+#define tcompTYPE_QUANTUM       0x0002  /* Quantum */
+#define tcompTYPE_LZX           0x0003  /* LZX */
+#define tcompBAD                0x000F  /* Unspecified compression type */
+
+#define tcompMASK_LZX_WINDOW    0x1F00  /* Mask for LZX Compression Memory */
+#define tcompLZX_WINDOW_LO      0x0F00  /* Lowest LZX Memory (15) */
+#define tcompLZX_WINDOW_HI      0x1500  /* Highest LZX Memory (21) */
+#define tcompSHIFT_LZX_WINDOW        8  /* Amount to shift over to get int */
+
+#define tcompMASK_QUANTUM_LEVEL 0x00F0  /* Mask for Quantum Compression Level */
+#define tcompQUANTUM_LEVEL_LO   0x0010  /* Lowest Quantum Level (1) */
+#define tcompQUANTUM_LEVEL_HI   0x0070  /* Highest Quantum Level (7) */
+#define tcompSHIFT_QUANTUM_LEVEL     4  /* Amount to shift over to get int */
+
+#define tcompMASK_QUANTUM_MEM   0x1F00  /* Mask for Quantum Compression Memory */
+#define tcompQUANTUM_MEM_LO     0x0A00  /* Lowest Quantum Memory (10) */
+#define tcompQUANTUM_MEM_HI     0x1500  /* Highest Quantum Memory (21) */
+#define tcompSHIFT_QUANTUM_MEM       8  /* Amount to shift over to get int */
+
+#define tcompMASK_RESERVED      0xE000  /* Reserved bits (high 3 bits) */
+
+/**********************************************************************/
+
+#define CompressionTypeFromTCOMP(tc) \
+    ((tc) & tcompMASK_TYPE)
+
+#define CompressionLevelFromTCOMP(tc) \
+    (((tc) & tcompMASK_QUANTUM_LEVEL) >> tcompSHIFT_QUANTUM_LEVEL)
+
+#define CompressionMemoryFromTCOMP(tc) \
+    (((tc) & tcompMASK_QUANTUM_MEM) >> tcompSHIFT_QUANTUM_MEM)
+
+#define TCOMPfromTypeLevelMemory(t, l, m) \
+    (((m) << tcompSHIFT_QUANTUM_MEM  ) | \
+     ((l) << tcompSHIFT_QUANTUM_LEVEL) | \
+     ( t                             ))
+
+#define LZXCompressionWindowFromTCOMP(tc) \
+    (((tc) & tcompMASK_LZX_WINDOW) >> tcompSHIFT_LZX_WINDOW)
+
+#define TCOMPfromLZXWindow(w) \
+    (((w) << tcompSHIFT_LZX_WINDOW) | \
+     ( tcompTYPE_LZX              ))
+
+#endif /* !defined(INCLUDED_TYPES_FCI_FDI) */
+
+/***********************************************************************
+ * FDI declarations
+ */
+
+typedef enum {
+    FDIERROR_NONE,
+    FDIERROR_CABINET_NOT_FOUND,
+    FDIERROR_NOT_A_CABINET,
+    FDIERROR_UNKNOWN_CABINET_VERSION,
+    FDIERROR_CORRUPT_CABINET,
+    FDIERROR_ALLOC_FAIL,
+    FDIERROR_BAD_COMPR_TYPE,
+    FDIERROR_MDI_FAIL,
+    FDIERROR_TARGET_FILE,
+    FDIERROR_RESERVE_MISMATCH,
+    FDIERROR_WRONG_CABINET,
+    FDIERROR_USER_ABORT,
+} FDIERROR;
+
+/**********************************************************************/
+
+#ifndef _A_NAME_IS_UTF
+#define _A_NAME_IS_UTF  0x80
+#endif
+
+#ifndef _A_EXEC
+#define _A_EXEC         0x40
+#endif
+
+/**********************************************************************/
+
+typedef void *HFDI;
+
+/**********************************************************************/
+
+typedef struct {
+    long    cbCabinet;  /* Total length of cabinet file */
+    USHORT  cFolders;   /* Count of folders in cabinet */
+    USHORT  cFiles;     /* Count of files in cabinet */
+    USHORT  setID;      /* Cabinet set ID */
+    USHORT  iCabinet;   /* Cabinet number in set (0 based) */
+    BOOL    fReserve;   /* TRUE => RESERVE present in cabinet */
+    BOOL    hasprev;    /* TRUE => Cabinet is chained prev */
+    BOOL    hasnext;    /* TRUE => Cabinet is chained next */
+} FDICABINETINFO, *PFDICABINETINFO; /* pfdici */
+
+/**********************************************************************/
+
+typedef enum {
+    fdidtNEW_CABINET,  /* New cabinet */
+    fdidtNEW_FOLDER,   /* New folder */
+    fdidtDECRYPT,      /* Decrypt a data block */
+} FDIDECRYPTTYPE;
+
+/**********************************************************************/
+
+typedef struct {
+    FDIDECRYPTTYPE fdidt; /* Command type (selects union below) */
+
+    void *pvUser; /* Decryption context */
+
+    union {
+        struct {                      /* fdidtNEW_CABINET */
+	    void   *pHeaderReserve;   /* RESERVE section from CFHEADER */
+	    USHORT  cbHeaderReserve;  /* Size of pHeaderReserve */
+	    USHORT  setID;            /* Cabinet set ID */
+	    int     iCabinet;         /* Cabinet number in set (0 based) */
+        } cabinet;
+
+        struct {                      /* fdidtNEW_FOLDER */
+	    void   *pFolderReserve;   /* RESERVE section from CFFOLDER */
+	    USHORT  cbFolderReserve;  /* Size of pFolderReserve */
+	    USHORT  iFolder;          /* Folder number in cabinet (0 based) */
+        } folder;
+
+        struct {                      /* fdidtDECRYPT */
+	    void   *pDataReserve;     /* RESERVE section from CFDATA */
+	    USHORT  cbDataReserve;    /* Size of pDataReserve */
+	    void   *pbData;           /* Data buffer */
+	    USHORT  cbData;           /* Size of data buffer */
+	    BOOL    fSplit;           /* TRUE if this is a split data block */
+	    USHORT  cbPartial;        /* 0 if this is not a split block, or
+				       * the first piece of a split block;
+                                       * Greater than 0 if this is the
+                                       * second piece of a split block.
+                                       */
+        } decrypt;
+    } DUMMYUNIONNAME;
+} FDIDECRYPT, *PFDIDECRYPT;
+
+/**********************************************************************/
+
+typedef void * (__cdecl *PFNALLOC)(ULONG cb);
+#define FNALLOC(fn) void * __cdecl fn(ULONG cb)
+
+typedef void (__cdecl *PFNFREE)(void *pv);
+#define FNFREE(fn) void __cdecl fn(void *pv)
+
+typedef INT_PTR (__cdecl *PFNOPEN) (char *pszFile, int oflag, int pmode);
+#define FNOPEN(fn) INT_PTR __cdecl fn(char *pszFile, int oflag, int pmode)
+
+typedef UINT (__cdecl *PFNREAD) (INT_PTR hf, void *pv, UINT cb);
+#define FNREAD(fn) UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)
+
+typedef UINT (__cdecl *PFNWRITE)(INT_PTR hf, void *pv, UINT cb);
+#define FNWRITE(fn) UINT __cdecl fn(INT_PTR hf, void *pv, UINT cb)
+
+typedef int  (__cdecl *PFNCLOSE)(INT_PTR hf);
+#define FNCLOSE(fn) int __cdecl fn(INT_PTR hf)
+
+typedef long (__cdecl *PFNSEEK) (INT_PTR hf, long dist, int seektype);
+#define FNSEEK(fn) long __cdecl fn(INT_PTR hf, long dist, int seektype)
+
+typedef int (__cdecl *PFNFDIDECRYPT)(PFDIDECRYPT pfdid);
+#define FNFDIDECRYPT(fn) int __cdecl fn(PFDIDECRYPT pfdid)
+
+typedef struct {
+    long  cb;
+    char *psz1;
+    char *psz2;
+    char *psz3;  /* Points to a 256 character buffer */
+    void *pv;    /* Value for client */
+
+    INT_PTR hf;
+
+    USHORT date;
+    USHORT time;
+    USHORT attribs;
+
+    USHORT setID;     /* Cabinet set ID */
+    USHORT iCabinet;  /* Cabinet number (0-based) */
+    USHORT iFolder;   /* Folder number (0-based) */
+
+    FDIERROR fdie;
+} FDINOTIFICATION, *PFDINOTIFICATION;
+
+typedef enum {
+    fdintCABINET_INFO,     /* General information about cabinet */
+    fdintPARTIAL_FILE,     /* First file in cabinet is continuation */
+    fdintCOPY_FILE,        /* File to be copied */
+    fdintCLOSE_FILE_INFO,  /* Close the file, set relevant info */
+    fdintNEXT_CABINET,     /* File continued to next cabinet */
+    fdintENUMERATE,        /* Enumeration status */
+} FDINOTIFICATIONTYPE;
+
+typedef INT_PTR (__cdecl *PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint,
+					PFDINOTIFICATION  pfdin);
+#define FNFDINOTIFY(fn) INT_PTR __cdecl fn(FDINOTIFICATIONTYPE fdint, \
+					   PFDINOTIFICATION pfdin)
+
+#include "pshpack1.h"
+
+typedef struct {
+    char ach[2];  /* Set to { '*', '\0' } */
+    long cbFile;  /* Required spill file size */
+} FDISPILLFILE, *PFDISPILLFILE;
+
+#include "poppack.h"
+
+#define cpuUNKNOWN (-1)  /* FDI does detection */
+#define cpu80286   (0)   /* '286 opcodes only */
+#define cpu80386   (1)   /* '386 opcodes used */
+
+/**********************************************************************/
+
+HFDI __cdecl FDICreate(PFNALLOC, PFNFREE, PFNOPEN, PFNREAD, PFNWRITE,
+		       PFNCLOSE, PFNSEEK, int, PERF);
+BOOL __cdecl FDIIsCabinet(HFDI, INT_PTR, PFDICABINETINFO);
+BOOL __cdecl FDICopy(HFDI, char *, char *, int, PFNFDINOTIFY,
+		     PFNFDIDECRYPT, void *pvUser);
+BOOL __cdecl FDIDestroy(HFDI);
+BOOL __cdecl FDITruncateCabinet(HFDI, char *, USHORT);
+
+/**********************************************************************/
+
+#include "poppack.h"
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* defined(__cplusplus) */
+
+#endif  /* __WINE_FDI_H */