From 7f642e51670bc38a4ef782a363936850bc2b0ba9 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 22 Apr 2021 06:38:23 -0700 Subject: Move dutil into libs/dutil --- src/libs/dutil/WixToolset.DUtil/inc/rexutil.h | 54 +++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/libs/dutil/WixToolset.DUtil/inc/rexutil.h (limited to 'src/libs/dutil/WixToolset.DUtil/inc/rexutil.h') 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 @@ +#pragma once +// 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. + + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +// defines +#define FILETABLESIZE 40 + +// structs +struct MEM_FILE +{ + LPCBYTE vpStart; + UINT uiCurrent; + UINT uiLength; +}; + +typedef enum FAKE_FILE_TYPE { NORMAL_FILE, MEMORY_FILE } FAKE_FILE_TYPE; + +typedef HRESULT (*REX_CALLBACK_PROGRESS)(BOOL fBeginFile, LPCWSTR wzFileId, LPVOID pvContext); +typedef VOID (*REX_CALLBACK_WRITE)(UINT cb); + + +struct FAKE_FILE // used __in internal file table +{ + BOOL fUsed; + FAKE_FILE_TYPE fftType; + MEM_FILE mfFile; // State for memory file + HANDLE hFile; // Handle for disk file +}; + +// functions +HRESULT RexInitialize(); +void RexUninitialize(); + +HRESULT RexExtract( + __in_z LPCSTR szResource, + __in_z LPCWSTR wzExtractId, + __in_z LPCWSTR wzExtractDir, + __in_z LPCWSTR wzExtractName, + __in REX_CALLBACK_PROGRESS pfnProgress, + __in REX_CALLBACK_WRITE pfnWrite, + __in LPVOID pvContext + ); + +#ifdef __cplusplus +} +#endif + -- cgit v1.2.3-55-g6feb