aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/WixToolset.DUtil/inc/rexutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dutil/WixToolset.DUtil/inc/rexutil.h')
-rw-r--r--src/libs/dutil/WixToolset.DUtil/inc/rexutil.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/inc/rexutil.h b/src/libs/dutil/WixToolset.DUtil/inc/rexutil.h
new file mode 100644
index 00000000..77f5604a
--- /dev/null
+++ b/src/libs/dutil/WixToolset.DUtil/inc/rexutil.h
@@ -0,0 +1,54 @@
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 <sys\stat.h>
6#include <fdi.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif
11
12// defines
13#define FILETABLESIZE 40
14
15// structs
16struct MEM_FILE
17{
18 LPCBYTE vpStart;
19 UINT uiCurrent;
20 UINT uiLength;
21};
22
23typedef enum FAKE_FILE_TYPE { NORMAL_FILE, MEMORY_FILE } FAKE_FILE_TYPE;
24
25typedef HRESULT (*REX_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext);
26typedef VOID (*REX_CALLBACK_WRITE)(UINT cb);
27
28
29struct FAKE_FILE // used __in internal file table
30{
31 BOOL fUsed;
32 FAKE_FILE_TYPE fftType;
33 MEM_FILE mfFile; // State for memory file
34 HANDLE hFile; // Handle for disk file
35};
36
37// functions
38HRESULT RexInitialize();
39void RexUninitialize();
40
41HRESULT RexExtract(
42 __in_z LPCSTR szResource,
43 __in_z LPCWSTR wzExtractId,
44 __in_z LPCWSTR wzExtractDir,
45 __in_z LPCWSTR wzExtractName,
46 __in REX_CALLBACK_PROGRESS pfnProgress,
47 __in REX_CALLBACK_WRITE pfnWrite,
48 __in LPVOID pvContext
49 );
50
51#ifdef __cplusplus
52}
53#endif
54