xref: /reactos/dll/shellext/zipfldr/precomp.h (revision 84344399)
1 #ifndef ZIPFLDR_PRECOMP_H
2 #define ZIPFLDR_PRECOMP_H
3 
4 #define COBJMACROS
5 #define COM_NO_WINDOWS_H
6 #define NTOS_MODE_USER
7 
8 #include <windef.h>
9 #include <winbase.h>
10 #include <shlobj.h>
11 #include <atlbase.h>
12 #include <atlcom.h>
13 #include <atlcoll.h>
14 #include <atlconv.h>
15 #include <atlstr.h>
16 #include <ui/rosdlgs.h>
17 #include <shlwapi.h>
18 #include <shellapi.h>
19 #include <strsafe.h>
20 // debug.h needs this:
21 #define NTSTATUS LONG
22 #include <reactos/debug.h>
23 #include <shellutils.h>
24 
25 #define EXTRACT_VERBA "extract"
26 #define EXTRACT_VERBW L"extract"
27 
28 EXTERN_C const GUID CLSID_ZipFolderStorageHandler;
29 EXTERN_C const GUID CLSID_ZipFolderSendTo;
30 EXTERN_C const GUID CLSID_ZipFolderContextMenu;
31 EXTERN_C const GUID CLSID_ZipFolderRightDragHandler;
32 EXTERN_C const GUID CLSID_ZipFolderDropHandler;
33 
34 EXTERN_C const GUID CLSID_ZipFolderExtractAllCommand;
35 
36 extern LONG g_ModuleRefCnt;
37 
38 UINT GetZipCodePage(BOOL bUnZip);
39 WCHAR* guid2string(REFCLSID iid);
40 
41 #define MINIZIP_COMPATIBLE_VERSION 36
42 #define MINIZIP_PASSWORD_FLAG   1
43 #define MINIZIP_UTF8_FLAG       (1 << 11)
44 
45 #include "minizip/unzip.h"
46 #include "minizip/ioapi.h"
47 
48 extern zlib_filefunc64_def g_FFunc;
49 
50 #include "resource.h"
51 
52 #include "zippidl.hpp"
53 #include "IZip.hpp"
54 
55 HRESULT _CEnumZipContents_CreateInstance(IZip* zip, DWORD flags, PCWSTR prefix, REFIID riid, LPVOID * ppvOut);
56 HRESULT _CExplorerCommandProvider_CreateInstance(IContextMenu* zipObject, REFIID riid, LPVOID * ppvOut);
57 HRESULT _CFolderViewCB_CreateInstance(REFIID riid, LPVOID * ppvOut);
58 void _CZipExtract_runWizard(PCWSTR Filename);
59 
60 enum eZipPasswordResponse
61 {
62     eAbort,
63     eSkip,
64     eAccept,
65 };
66 
67 eZipPasswordResponse _CZipAskPassword(HWND hDlg, PCWSTR filename, CStringA& Password);
68 
69 enum eZipConfirmResponse
70 {
71     eYes,
72     eYesToAll,
73     eNo,
74     eCancel
75 };
76 
77 eZipConfirmResponse _CZipAskReplace(HWND hDlg, PCWSTR FullPath);
78 
79 enum eZipExtractError
80 {
81     eNoError,
82     eExtractAbort,
83     eDirectoryError,
84     eFileError,
85     eOpenError,
86     eUnpackError,
87 };
88 
89 #include "CZipEnumerator.hpp"
90 #include "CZipFolder.hpp"
91 #include "CZipCreator.hpp"
92 #include "CSendToZip.hpp"
93 
94 #endif /* ZIPFLDR_PRECOMP_H */
95