From: Alexander Shaposhnikov Date: Sun, 10 Sep 2017 17:33:14 +0000 (+0000) Subject: [RAPPS] Moved cabinet.dll related definitions to separate header X-Git-Tag: backups/GSoC_2017/rapps@75905~5 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=ec69b8b62f8c985a26b2ae1540ec08d7b9f01724 [RAPPS] Moved cabinet.dll related definitions to separate header svn path=/branches/GSoC_2017/rapps/; revision=75820 --- diff --git a/reactos/base/applications/rapps/CMakeLists.txt b/reactos/base/applications/rapps/CMakeLists.txt index 9a7f7a4e306..350ead0a654 100644 --- a/reactos/base/applications/rapps/CMakeLists.txt +++ b/reactos/base/applications/rapps/CMakeLists.txt @@ -22,6 +22,7 @@ list(APPEND SOURCE include/gui.h include/dialogs.h include/installed.h + include/cabinet.h include/crichedit.h include/defines.h include/misc.h diff --git a/reactos/base/applications/rapps/include/cabinet.h b/reactos/base/applications/rapps/include/cabinet.h new file mode 100644 index 00000000000..02bbd5738d9 --- /dev/null +++ b/reactos/base/applications/rapps/include/cabinet.h @@ -0,0 +1,32 @@ +// Structs related to .cab extraction +// FIXME: they should belong to exports of cabinet.dll +#pragma once + +struct ERF +{ + INT erfOper; + INT erfType; + BOOL fError; +}; + +struct FILELIST +{ + LPSTR FileName; + FILELIST *next; + BOOL DoExtract; +}; + +struct SESSION +{ + INT FileSize; + ERF Error; + FILELIST *FileList; + INT FileCount; + INT Operation; + CHAR Destination[MAX_PATH]; + CHAR CurrentFile[MAX_PATH]; + CHAR Reserved[MAX_PATH]; + FILELIST *FilterList; +}; + +typedef HRESULT(WINAPI *fnExtract)(SESSION *dest, LPCSTR szCabName); diff --git a/reactos/base/applications/rapps/misc.cpp b/reactos/base/applications/rapps/misc.cpp index 8b61aa53b06..93a86a4e806 100644 --- a/reactos/base/applications/rapps/misc.cpp +++ b/reactos/base/applications/rapps/misc.cpp @@ -11,6 +11,7 @@ #include "gui.h" #include "misc.h" +#include "cabinet.h" /* SESSION Operation */ #define EXTRACT_FILLFILELIST 0x00000001 @@ -18,36 +19,6 @@ static HANDLE hLog = NULL; -struct ERF -{ - INT erfOper; - INT erfType; - BOOL fError; -}; - -struct FILELIST -{ - LPSTR FileName; - FILELIST *next; - BOOL DoExtract; -}; - -struct SESSION -{ - INT FileSize; - ERF Error; - FILELIST *FileList; - INT FileCount; - INT Operation; - CHAR Destination[MAX_PATH]; - CHAR CurrentFile[MAX_PATH]; - CHAR Reserved[MAX_PATH]; - FILELIST *FilterList; -}; - -typedef HRESULT(WINAPI *fnExtract)(SESSION *dest, LPCSTR szCabName); -fnExtract pfnExtract; - INT GetWindowWidth(HWND hwnd) { RECT Rect; @@ -243,7 +214,8 @@ BOOL ExtractFilesFromCab(LPCWSTR lpCabName, LPCWSTR lpOutputPath) CHAR szCabName[MAX_PATH]; SESSION Dest; HRESULT Result; - + fnExtract pfnExtract; + hCabinetDll = LoadLibraryW(L"cabinet.dll"); if (hCabinetDll) {