ReactOS 0.4.15-dev-8116-gf69e256
patchapi.h
Go to the documentation of this file.
1/*
2 * Copyright 2011 Hans Leidekker for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#ifndef _PATCHAPI_H_
20#define _PATCHAPI_H_
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26#define APPLY_OPTION_FAIL_IF_EXACT 0x00000001
27#define APPLY_OPTION_FAIL_IF_CLOSE 0x00000002
28#define APPLY_OPTION_TEST_ONLY 0x00000004
29#define APPLY_OPTION_VALID_FLAGS 0x00000007
30
31
32//
33// apply error codes
34//
35#define ERROR_PATCH_DECODE_FAILURE 0xC00E4101
36#define ERROR_PATCH_CORRUPT 0xC00E4102
37#define ERROR_PATCH_NEWER_FORMAT 0xC00E4103
38#define ERROR_PATCH_WRONG_FILE 0xC00E4104
39#define ERROR_PATCH_NOT_NECESSARY 0xC00E4105
40#define ERROR_PATCH_NOT_AVAILABLE 0xC00E4106
41
42
43typedef struct _PATCH_IGNORE_RANGE
44{
48
49typedef struct _PATCH_RETAIN_RANGE
50{
55
56
58typedef PATCH_PROGRESS_CALLBACK *PPATCH_PROGRESS_CALLBACK;
59
60
61BOOL WINAPI TestApplyPatchToFileA(LPCSTR PatchFileName, LPCSTR OldFileName, ULONG ApplyOptionFlags);
62BOOL WINAPI TestApplyPatchToFileW(LPCWSTR PatchFileName, LPCWSTR OldFileName, ULONG ApplyOptionFlags);
63#define TestApplyPatchToFile WINELIB_NAME_AW(TestApplyPatchToFile)
64BOOL WINAPI TestApplyPatchToFileByHandles(HANDLE PatchFileHandle, HANDLE OldFileHandle, ULONG ApplyOptionFlags);
65
66
67BOOL WINAPI ApplyPatchToFileA(LPCSTR PatchFileName, LPCSTR OldFileName, LPCSTR NewFileName, ULONG ApplyOptionFlags);
68BOOL WINAPI ApplyPatchToFileW(LPCWSTR PatchFileName, LPCWSTR OldFileName, LPCWSTR NewFileName, ULONG ApplyOptionFlags);
69#define ApplyPatchToFile WINELIB_NAME_AW(ApplyPatchToFile)
70BOOL WINAPI ApplyPatchToFileByHandles(HANDLE PatchFileHandle, HANDLE OldFileHandle, HANDLE NewFileHandle, ULONG ApplyOptionFlags);
71
72
73BOOL WINAPI GetFilePatchSignatureA(LPCSTR FileName, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount,
74 PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount,
75 PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize,
76 PVOID SignatureBuffer);
77BOOL WINAPI GetFilePatchSignatureW(LPCWSTR FileName, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount,
78 PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount,
79 PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize,
80 PVOID SignatureBuffer);
81#define GetFilePatchSignature WINELIB_NAME_AW(GetFilePatchSignature)
82BOOL WINAPI GetFilePatchSignatureByHandle(HANDLE FileHandle, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount,
83 PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount,
84 PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize,
85 PVOID SignatureBuffer);
86
87#ifdef __cplusplus
88}
89#endif
90
91#endif /* _PATCHAPI_H_ */
#define CALLBACK
Definition: compat.h:35
unsigned int BOOL
Definition: ntddk_ex.h:94
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
BOOL WINAPI GetFilePatchSignatureW(LPCWSTR FileName, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount, PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount, PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize, PVOID SignatureBuffer)
BOOL WINAPI TestApplyPatchToFileW(LPCWSTR PatchFileName, LPCWSTR OldFileName, ULONG ApplyOptionFlags)
BOOL WINAPI GetFilePatchSignatureA(LPCSTR FileName, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount, PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount, PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize, PVOID SignatureBuffer)
ULONG CurrentPosition
Definition: patchapi.h:57
ULONG ULONG MaximumPosition
Definition: patchapi.h:57
struct _PATCH_RETAIN_RANGE PATCH_RETAIN_RANGE
struct _PATCH_IGNORE_RANGE * PPATCH_IGNORE_RANGE
BOOL WINAPI ApplyPatchToFileA(LPCSTR PatchFileName, LPCSTR OldFileName, LPCSTR NewFileName, ULONG ApplyOptionFlags)
struct _PATCH_RETAIN_RANGE * PPATCH_RETAIN_RANGE
BOOL WINAPI TestApplyPatchToFileByHandles(HANDLE PatchFileHandle, HANDLE OldFileHandle, ULONG ApplyOptionFlags)
BOOL WINAPI ApplyPatchToFileByHandles(HANDLE PatchFileHandle, HANDLE OldFileHandle, HANDLE NewFileHandle, ULONG ApplyOptionFlags)
BOOL WINAPI TestApplyPatchToFileA(LPCSTR PatchFileName, LPCSTR OldFileName, ULONG ApplyOptionFlags)
PATCH_PROGRESS_CALLBACK * PPATCH_PROGRESS_CALLBACK
Definition: patchapi.h:58
BOOL WINAPI ApplyPatchToFileW(LPCWSTR PatchFileName, LPCWSTR OldFileName, LPCWSTR NewFileName, ULONG ApplyOptionFlags)
BOOL WINAPI GetFilePatchSignatureByHandle(HANDLE FileHandle, ULONG OptionFlags, PVOID OptionData, ULONG IgnoreRangeCount, PPATCH_IGNORE_RANGE IgnoreRangeArray, ULONG RetainRangeCount, PPATCH_RETAIN_RANGE RetainRangeArray, ULONG SignatureBufferSize, PVOID SignatureBuffer)
struct _PATCH_IGNORE_RANGE PATCH_IGNORE_RANGE
ULONG OffsetInOldFile
Definition: patchapi.h:45
ULONG OffsetInNewFile
Definition: patchapi.h:53
ULONG OffsetInOldFile
Definition: patchapi.h:51
int32_t WINBOOL
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
Definition: wmitypes.h:60
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185