mirror of
https://github.com/reactos/reactos.git
synced 2025-01-08 07:11:16 +00:00
[RAPPS] Moved cabinet.dll related definitions to separate header
svn path=/branches/GSoC_2017/rapps/; revision=75820
This commit is contained in:
parent
050d268e04
commit
ec69b8b62f
3 changed files with 36 additions and 31 deletions
|
@ -22,6 +22,7 @@ list(APPEND SOURCE
|
||||||
include/gui.h
|
include/gui.h
|
||||||
include/dialogs.h
|
include/dialogs.h
|
||||||
include/installed.h
|
include/installed.h
|
||||||
|
include/cabinet.h
|
||||||
include/crichedit.h
|
include/crichedit.h
|
||||||
include/defines.h
|
include/defines.h
|
||||||
include/misc.h
|
include/misc.h
|
||||||
|
|
32
reactos/base/applications/rapps/include/cabinet.h
Normal file
32
reactos/base/applications/rapps/include/cabinet.h
Normal file
|
@ -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);
|
|
@ -11,6 +11,7 @@
|
||||||
|
|
||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "cabinet.h"
|
||||||
|
|
||||||
/* SESSION Operation */
|
/* SESSION Operation */
|
||||||
#define EXTRACT_FILLFILELIST 0x00000001
|
#define EXTRACT_FILLFILELIST 0x00000001
|
||||||
|
@ -18,36 +19,6 @@
|
||||||
|
|
||||||
static HANDLE hLog = NULL;
|
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)
|
INT GetWindowWidth(HWND hwnd)
|
||||||
{
|
{
|
||||||
RECT Rect;
|
RECT Rect;
|
||||||
|
@ -243,6 +214,7 @@ BOOL ExtractFilesFromCab(LPCWSTR lpCabName, LPCWSTR lpOutputPath)
|
||||||
CHAR szCabName[MAX_PATH];
|
CHAR szCabName[MAX_PATH];
|
||||||
SESSION Dest;
|
SESSION Dest;
|
||||||
HRESULT Result;
|
HRESULT Result;
|
||||||
|
fnExtract pfnExtract;
|
||||||
|
|
||||||
hCabinetDll = LoadLibraryW(L"cabinet.dll");
|
hCabinetDll = LoadLibraryW(L"cabinet.dll");
|
||||||
if (hCabinetDll)
|
if (hCabinetDll)
|
||||||
|
|
Loading…
Reference in a new issue