diff options
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/cabutil.h')
-rw-r--r-- | src/libs/dutil/WixToolset.DUtil/inc/cabutil.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/cabutil.h b/src/libs/dutil/WixToolset.DUtil/inc/cabutil.h new file mode 100644 index 00000000..0bedba80 --- /dev/null +++ b/src/libs/dutil/WixToolset.DUtil/inc/cabutil.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #pragma once | ||
2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
3 | |||
4 | |||
5 | #include <fdi.h> | ||
6 | #include <sys\stat.h> | ||
7 | |||
8 | #ifdef __cplusplus | ||
9 | extern "C" { | ||
10 | #endif | ||
11 | |||
12 | // structs | ||
13 | |||
14 | |||
15 | // callback function prototypes | ||
16 | typedef HRESULT (*CAB_CALLBACK_OPEN_FILE)(LPCWSTR wzFile, INT_PTR* ppFile); | ||
17 | typedef HRESULT (*CAB_CALLBACK_READ_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead); | ||
18 | typedef HRESULT (*CAB_CALLBACK_WRITE_FILE)(INT_PTR pFile, LPVOID pvData, DWORD cbData, DWORD* pcbRead); | ||
19 | typedef LONG (*CAB_CALLBACK_SEEK_FILE)(INT_PTR pFile, DWORD dwMove, DWORD dwMoveMethod); | ||
20 | typedef HRESULT (*CAB_CALLBACK_CLOSE_FILE)(INT_PTR pFile); | ||
21 | |||
22 | typedef HRESULT (*CAB_CALLBACK_BEGIN_FILE)(LPCWSTR wzFileId, FILETIME* pftFileTime, DWORD cbFileSize, LPVOID pvContext, INT_PTR* ppFile); | ||
23 | typedef HRESULT (*CAB_CALLBACK_END_FILE)(LPCWSTR wzFileId, LPVOID pvContext, INT_PTR pFile); | ||
24 | typedef HRESULT (*CAB_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext); | ||
25 | |||
26 | // function type with calling convention of __stdcall that .NET 1.1 understands only | ||
27 | // .NET 2.0 will not need this | ||
28 | typedef INT_PTR (FAR __stdcall *STDCALL_PFNFDINOTIFY)(FDINOTIFICATIONTYPE fdint, PFDINOTIFICATION pfdin); | ||
29 | |||
30 | |||
31 | // functions | ||
32 | HRESULT DAPI CabInitialize( | ||
33 | __in BOOL fDelayLoad | ||
34 | ); | ||
35 | void DAPI CabUninitialize( | ||
36 | ); | ||
37 | |||
38 | HRESULT DAPI CabExtract( | ||
39 | __in_z LPCWSTR wzCabinet, | ||
40 | __in_z LPCWSTR wzExtractFile, | ||
41 | __in_z LPCWSTR wzExtractDir, | ||
42 | __in_opt CAB_CALLBACK_PROGRESS pfnProgress, | ||
43 | __in_opt LPVOID pvContext, | ||
44 | __in DWORD64 dw64EmbeddedOffset | ||
45 | ); | ||
46 | |||
47 | HRESULT DAPI CabEnumerate( | ||
48 | __in_z LPCWSTR wzCabinet, | ||
49 | __in_z LPCWSTR wzEnumerateFile, | ||
50 | __in STDCALL_PFNFDINOTIFY pfnNotify, | ||
51 | __in DWORD64 dw64EmbeddedOffset | ||
52 | ); | ||
53 | |||
54 | #ifdef __cplusplus | ||
55 | } | ||
56 | #endif | ||