| msdelta.h (6.1.7600.16385-Windows_7.0) | | msdelta.h (6.3.9600.17415-Windows_8.1) |
| /* Copyright (c) Microsoft Corporation. All rights reserved. */ | | /* Copyright (c) Microsoft Corporation. All rights reserved. */ |
| | |
| #pragma once | | #pragma once |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| /** Delta Compression Engine API. */ | | /** Delta Compression Engine API. */ |
| | |
| #include <windows.h> | | #include <windows.h> |
| | |
| /** For crypto algorithm identifiers, ALG_ID. */ | | /** For crypto algorithm identifiers, ALG_ID. */ |
| #include <wincrypt.h> | | #include <wincrypt.h> |
| | |
| /** Allows anonymous structs and unions. */ | | /** Allows anonymous structs and unions. */ |
| #pragma warning( disable: 4201 ) | | #pragma warning( disable: 4201 ) |
| | |
| skipping to change at line 78 | | skipping to change at line 82 |
| | |
| /** File type for I386 Portable Executable files. */ | | /** File type for I386 Portable Executable files. */ |
| #define DELTA_FILE_TYPE_I386 ( (DELTA_FILE_TYPE) 0x00000002 ) | | #define DELTA_FILE_TYPE_I386 ( (DELTA_FILE_TYPE) 0x00000002 ) |
| | |
| /** File type for for IA64 Portable Executable files. */ | | /** File type for for IA64 Portable Executable files. */ |
| #define DELTA_FILE_TYPE_IA64 ( (DELTA_FILE_TYPE) 0x00000004 ) | | #define DELTA_FILE_TYPE_IA64 ( (DELTA_FILE_TYPE) 0x00000004 ) |
| | |
| /** File type for AMD64 Portable Executable files. */ | | /** File type for AMD64 Portable Executable files. */ |
| #define DELTA_FILE_TYPE_AMD64 ( (DELTA_FILE_TYPE) 0x00000008 ) | | #define DELTA_FILE_TYPE_AMD64 ( (DELTA_FILE_TYPE) 0x00000008 ) |
| | |
|
| | /** File type for I386 Portable Executable files with CLI4 transform. */ |
| | #define DELTA_FILE_TYPE_CLI4_I386 ( (DELTA_FILE_TYPE) 0x00000010 ) |
| | |
| | /** File type for AMD64 Portable Executable files with CLI4 transform. */ |
| | #define DELTA_FILE_TYPE_CLI4_AMD64 ( (DELTA_FILE_TYPE) 0x00000020 ) |
| | |
| | /** File type for ARM Portable Executable files with CLI4 transform. */ |
| | #define DELTA_FILE_TYPE_CLI4_ARM ( (DELTA_FILE_TYPE) 0x00000040 ) |
| | |
| /** File type set that treats any file as raw. */ | | /** File type set that treats any file as raw. */ |
| #define DELTA_FILE_TYPE_SET_RAW_ONLY ( DELTA_FILE_TYPE_RAW ) | | #define DELTA_FILE_TYPE_SET_RAW_ONLY ( DELTA_FILE_TYPE_RAW ) |
| | |
| /** File type set that distinguishes I386, IA64 and AMD64 Portable Executable fi
le and treats others as raw. */ | | /** File type set that distinguishes I386, IA64 and AMD64 Portable Executable fi
le and treats others as raw. */ |
|
| #define DELTA_FILE_TYPE_SET_EXECUTABLES ( DELTA_FILE_TYPE_RAW | \ | | #define DELTA_FILE_TYPE_SET_EXECUTABLES_1 ( DELTA_FILE_TYPE_RAW | \ |
| DELTA_FILE_TYPE_I386 | \ | | DELTA_FILE_TYPE_I386 | \ |
| DELTA_FILE_TYPE_IA64 | \ | | DELTA_FILE_TYPE_IA64 | \ |
| DELTA_FILE_TYPE_AMD64 ) | | DELTA_FILE_TYPE_AMD64 ) |
| | |
|
| | #define DELTA_FILE_TYPE_SET_EXECUTABLES DELTA_FILE_TYPE_SET_EXECUTABLES_1 |
| | |
| | /** File type set that distinguishes I386, IA64, ARM, and AMD64 Portable Executa |
| | ble file and treats others as raw. */ |
| | #define DELTA_FILE_TYPE_SET_EXECUTABLES_2 ( DELTA_FILE_TYPE_RAW | \ |
| | DELTA_FILE_TYPE_CLI4_I386 | \ |
| | DELTA_FILE_TYPE_IA64 | \ |
| | DELTA_FILE_TYPE_CLI4_AMD64 | \ |
| | DELTA_FILE_TYPE_CLI4_ARM ) |
| | |
| | #define DELTA_FILE_TYPE_SET_EXECUTABLES_LATEST DELTA_FILE_TYPE_SET_EXECUTABLES_ |
| | 2 |
| | |
| /** Type for msdelta flags. */ | | /** Type for msdelta flags. */ |
| typedef __int64 DELTA_FLAG_TYPE; | | typedef __int64 DELTA_FLAG_TYPE; |
| | |
| /** No flags. */ | | /** No flags. */ |
| #define DELTA_FLAG_NONE ( (DELTA_FLAG_TYPE)0x00000000 ) | | #define DELTA_FLAG_NONE ( (DELTA_FLAG_TYPE)0x00000000 ) |
| | |
| /** Allow application of legacy PA19 deltas by mspatcha.dll. */ | | /** Allow application of legacy PA19 deltas by mspatcha.dll. */ |
| #define DELTA_APPLY_FLAG_ALLOW_PA19 ( (DELTA_FLAG_TYPE)0x00000001 ) | | #define DELTA_APPLY_FLAG_ALLOW_PA19 ( (DELTA_FLAG_TYPE)0x00000001 ) |
| | |
| /** Transform E8 pieces (relative calls in x86) of target file . */ | | /** Transform E8 pieces (relative calls in x86) of target file . */ |
| | |
| skipping to change at line 153 | | skipping to change at line 177 |
| | |
| /** Transform headers of source PE. */ | | /** Transform headers of source PE. */ |
| #define DELTA_FLAG_HEADERS ( (DELTA_FLAG_TYPE)0x00010000 ) /* f
lags[ 16 ] */ | | #define DELTA_FLAG_HEADERS ( (DELTA_FLAG_TYPE)0x00010000 ) /* f
lags[ 16 ] */ |
| | |
| /** Allow source or target file or buffer to exceed its default size limit. */ | | /** Allow source or target file or buffer to exceed its default size limit. */ |
| #define DELTA_FLAG_IGNORE_FILE_SIZE_LIMIT ( (DELTA_FLAG_TYPE)0x00020000 ) /* f
lags[ 17 ] */ | | #define DELTA_FLAG_IGNORE_FILE_SIZE_LIMIT ( (DELTA_FLAG_TYPE)0x00020000 ) /* f
lags[ 17 ] */ |
| | |
| /** Allow options buffer or file to exceeed its default size limit. */ | | /** Allow options buffer or file to exceeed its default size limit. */ |
| #define DELTA_FLAG_IGNORE_OPTIONS_SIZE_LIMIT ((DELTA_FLAG_TYPE)0x00040000 ) /* f
lags[ 18 ] */ | | #define DELTA_FLAG_IGNORE_OPTIONS_SIZE_LIMIT ((DELTA_FLAG_TYPE)0x00040000 ) /* f
lags[ 18 ] */ |
| | |
|
| | /** Transform instructions of source ARM PE. */ |
| | #define DELTA_FLAG_ARM_DISASM ( (DELTA_FLAG_TYPE)0x00080000 ) /* f |
| | lags[ 19 ] */ |
| | |
| | /** Transform pdata of source ARM PE. */ |
| | #define DELTA_FLAG_ARM_PDATA ( (DELTA_FLAG_TYPE)0x00100000 ) /* f |
| | lags[ 20 ] */ |
| | |
| | /** Transform CLI4 Metadata of source PE. */ |
| | #define DELTA_FLAG_CLI4_METADATA ( (DELTA_FLAG_TYPE)0x00200000 ) /* f |
| | lags[ 21 ] */ |
| | |
| | /** Transform CLI4 instructions of source PE. */ |
| | #define DELTA_FLAG_CLI4_DISASM ( (DELTA_FLAG_TYPE)0x00400000 ) /* f |
| | lags[ 22 ] */ |
| | |
| | /** List the default transform combination for individule ISA */ |
| #define DELTA_DEFAULT_FLAGS_RAW ( DELTA_FLAG_NONE ) | | #define DELTA_DEFAULT_FLAGS_RAW ( DELTA_FLAG_NONE ) |
| | |
| #define DELTA_DEFAULT_FLAGS_I386 ( DELTA_FLAG_MARK | \ | | #define DELTA_DEFAULT_FLAGS_I386 ( DELTA_FLAG_MARK | \ |
| DELTA_FLAG_IMPORTS | \ | | DELTA_FLAG_IMPORTS | \ |
| DELTA_FLAG_EXPORTS | \ | | DELTA_FLAG_EXPORTS | \ |
| DELTA_FLAG_RESOURCES | \ | | DELTA_FLAG_RESOURCES | \ |
| DELTA_FLAG_RELOCS | \ | | DELTA_FLAG_RELOCS | \ |
| DELTA_FLAG_I386_SMASHLOCK | \ | | DELTA_FLAG_I386_SMASHLOCK | \ |
| DELTA_FLAG_I386_JMPS | \ | | DELTA_FLAG_I386_JMPS | \ |
| DELTA_FLAG_I386_CALLS | \ | | DELTA_FLAG_I386_CALLS | \ |
| | |
| skipping to change at line 189 | | skipping to change at line 226 |
| DELTA_FLAG_IMPORTS | \ | | DELTA_FLAG_IMPORTS | \ |
| DELTA_FLAG_EXPORTS | \ | | DELTA_FLAG_EXPORTS | \ |
| DELTA_FLAG_RESOURCES | \ | | DELTA_FLAG_RESOURCES | \ |
| DELTA_FLAG_RELOCS | \ | | DELTA_FLAG_RELOCS | \ |
| DELTA_FLAG_AMD64_DISASM | \ | | DELTA_FLAG_AMD64_DISASM | \ |
| DELTA_FLAG_AMD64_PDATA | \ | | DELTA_FLAG_AMD64_PDATA | \ |
| DELTA_FLAG_UNBIND | \ | | DELTA_FLAG_UNBIND | \ |
| DELTA_FLAG_CLI_DISASM | \ | | DELTA_FLAG_CLI_DISASM | \ |
| DELTA_FLAG_CLI_METADATA ) | | DELTA_FLAG_CLI_METADATA ) |
| | |
|
| | #define DELTA_CLI4_FLAGS_I386 ( DELTA_FLAG_MARK | \ |
| | DELTA_FLAG_IMPORTS | \ |
| | DELTA_FLAG_EXPORTS | \ |
| | DELTA_FLAG_RESOURCES | \ |
| | DELTA_FLAG_RELOCS | \ |
| | DELTA_FLAG_I386_SMASHLOCK | \ |
| | DELTA_FLAG_I386_JMPS | \ |
| | DELTA_FLAG_I386_CALLS | \ |
| | DELTA_FLAG_UNBIND | \ |
| | DELTA_FLAG_CLI4_DISASM | \ |
| | DELTA_FLAG_CLI4_METADATA ) |
| | |
| | #define DELTA_CLI4_FLAGS_AMD64 ( DELTA_FLAG_MARK | \ |
| | DELTA_FLAG_IMPORTS | \ |
| | DELTA_FLAG_EXPORTS | \ |
| | DELTA_FLAG_RESOURCES | \ |
| | DELTA_FLAG_RELOCS | \ |
| | DELTA_FLAG_AMD64_DISASM | \ |
| | DELTA_FLAG_AMD64_PDATA | \ |
| | DELTA_FLAG_UNBIND | \ |
| | DELTA_FLAG_CLI4_DISASM | \ |
| | DELTA_FLAG_CLI4_METADATA ) |
| | |
| | #define DELTA_CLI4_FLAGS_ARM ( DELTA_FLAG_MARK | \ |
| | DELTA_FLAG_IMPORTS | \ |
| | DELTA_FLAG_EXPORTS | \ |
| | DELTA_FLAG_RESOURCES | \ |
| | DELTA_FLAG_RELOCS | \ |
| | DELTA_FLAG_ARM_DISASM | \ |
| | DELTA_FLAG_ARM_PDATA | \ |
| | DELTA_FLAG_UNBIND | \ |
| | DELTA_FLAG_CLI4_DISASM | \ |
| | DELTA_FLAG_CLI4_METADATA ) |
| | |
| /** Maximal allowed size of hash in bytes. */ | | /** Maximal allowed size of hash in bytes. */ |
| #define DELTA_MAX_HASH_SIZE 32 | | #define DELTA_MAX_HASH_SIZE 32 |
| | |
| /** Hash structure. */ | | /** Hash structure. */ |
| typedef struct _DELTA_HASH | | typedef struct _DELTA_HASH |
| { | | { |
| /** Size of hash in bytes. Does not exceed DELTA_MAX_HASH_SIZE. */ | | /** Size of hash in bytes. Does not exceed DELTA_MAX_HASH_SIZE. */ |
| DWORD HashSize; | | DWORD HashSize; |
| | |
| /** Hash value. */ | | /** Hash value. */ |
| | |
| skipping to change at line 245 | | skipping to change at line 316 |
| | |
| /** | | /** |
| * Gets header information for a delta in memory. | | * Gets header information for a delta in memory. |
| * @param Delta Delta memory block. | | * @param Delta Delta memory block. |
| * @param lpHeaderInfo Header information for given Delta. | | * @param lpHeaderInfo Header information for given Delta. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaInfoB( | | GetDeltaInfoB( |
|
| __in DELTA_INPUT Delta, | | _In_ DELTA_INPUT Delta, |
| __out LPDELTA_HEADER_INFO lpHeaderInfo | | _Out_ LPDELTA_HEADER_INFO lpHeaderInfo |
| ); | | ); |
| | |
| /** | | /** |
| * Gets header information for a delta accessed by ASCII file name. | | * Gets header information for a delta accessed by ASCII file name. |
| * @param lpDeltaName Delta file name, ASCII. | | * @param lpDeltaName Delta file name, ASCII. |
| * @param lpHeaderInfo Header information for given Delta. | | * @param lpHeaderInfo Header information for given Delta. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaInfoA( | | GetDeltaInfoA( |
|
| __in LPCSTR lpDeltaName, | | _In_ LPCSTR lpDeltaName, |
| __out LPDELTA_HEADER_INFO lpHeaderInfo | | _Out_ LPDELTA_HEADER_INFO lpHeaderInfo |
| ); | | ); |
| | |
| /** | | /** |
| * Gets header information for a delta accessed by Unicode file name. | | * Gets header information for a delta accessed by Unicode file name. |
| * @param lpDeltaName Delta file name, Unicode. | | * @param lpDeltaName Delta file name, Unicode. |
| * @param lpHeaderInfo Header information for given Delta. | | * @param lpHeaderInfo Header information for given Delta. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaInfoW( | | GetDeltaInfoW( |
|
| __in LPCWSTR lpDeltaName, | | _In_ LPCWSTR lpDeltaName, |
| __out LPDELTA_HEADER_INFO lpHeaderInfo | | _Out_ LPDELTA_HEADER_INFO lpHeaderInfo |
| ); | | ); |
| | |
| #ifdef _UNICODE | | #ifdef _UNICODE |
| #define GetDeltaInfo GetDeltaInfoW | | #define GetDeltaInfo GetDeltaInfoW |
| #else | | #else |
| #define GetDeltaInfo GetDeltaInfoA | | #define GetDeltaInfo GetDeltaInfoA |
| #endif /* _UNICODE */ | | #endif /* _UNICODE */ |
| | |
| /** | | /** |
| * Applies a given delta to a given source file. | | * Applies a given delta to a given source file. |
| * The resultant target file is put into allocated memory. | | * The resultant target file is put into allocated memory. |
| * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. | | * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. |
| * @param Source Source memory block. | | * @param Source Source memory block. |
| * @param Delta Delta memory block. | | * @param Delta Delta memory block. |
| * @param lpTarget Target memory block. Caller DeltaFree. | | * @param lpTarget Target memory block. Caller DeltaFree. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ApplyDeltaB( | | ApplyDeltaB( |
|
| __in DELTA_FLAG_TYPE ApplyFlags, | | _In_ DELTA_FLAG_TYPE ApplyFlags, |
| __in DELTA_INPUT Source, | | _In_ DELTA_INPUT Source, |
| __in DELTA_INPUT Delta, | | _In_ DELTA_INPUT Delta, |
| __out LPDELTA_OUTPUT lpTarget | | _Out_ LPDELTA_OUTPUT lpTarget |
| ); | | ); |
| | |
| /** | | /** |
| * Applies a given delta to a given source file. | | * Applies a given delta to a given source file. |
| * The resultant target file is put into caller-provided memory. | | * The resultant target file is put into caller-provided memory. |
| * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. | | * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. |
| * @param Source Source memory block. | | * @param Source Source memory block. |
| * @param Delta Delta memory block. | | * @param Delta Delta memory block. |
| * @param lpTarget Pointer to caller-allocated target memory block. | | * @param lpTarget Pointer to caller-allocated target memory block. |
| * @param uTargetSize Size of target memory block in bytes, caller needs to ca
ll GetDeltaInfo to obtain it. | | * @param uTargetSize Size of target memory block in bytes, caller needs to ca
ll GetDeltaInfo to obtain it. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ApplyDeltaProvidedB( | | ApplyDeltaProvidedB( |
|
| __in DELTA_FLAG_TYPE ApplyFlags, | | _In_ DELTA_FLAG_TYPE ApplyFlags, |
| __in DELTA_INPUT Source, | | _In_ DELTA_INPUT Source, |
| __in DELTA_INPUT Delta, | | _In_ DELTA_INPUT Delta, |
| __inout_bcount( uTargetSize ) LPVOID lpTarget, | | _Inout_updates_bytes_( uTargetSize ) LPVOID lpTarget, |
| __in SIZE_T uTargetSize | | _In_ SIZE_T uTargetSize |
| ); | | ); |
| | |
| /** | | /** |
| * Applies a given delta to a given source file. The resultant target file is wr
itten to disk. | | * Applies a given delta to a given source file. The resultant target file is wr
itten to disk. |
| * All files accessed by ASCII file names. | | * All files accessed by ASCII file names. |
| * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. | | * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. |
| * @param lpSourceName Source file name, ASCII. | | * @param lpSourceName Source file name, ASCII. |
| * @param lpDeltaName Delta file name, ASCII. | | * @param lpDeltaName Delta file name, ASCII. |
| * @param lpTargetName Target file name, ASCII. | | * @param lpTargetName Target file name, ASCII. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ApplyDeltaA( | | ApplyDeltaA( |
|
| __in DELTA_FLAG_TYPE ApplyFlags, | | _In_ DELTA_FLAG_TYPE ApplyFlags, |
| __in LPCSTR lpSourceName, | | _In_ LPCSTR lpSourceName, |
| __in LPCSTR lpDeltaName, | | _In_ LPCSTR lpDeltaName, |
| __in LPCSTR lpTargetName | | _In_ LPCSTR lpTargetName |
| ); | | ); |
| | |
| /** | | /** |
| * Applies a given delta to a given source file. The resultant target file is wr
itten to disk. | | * Applies a given delta to a given source file. The resultant target file is wr
itten to disk. |
| * All files accessed by Unicode file names. | | * All files accessed by Unicode file names. |
| * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. | | * @param ApplyFlags Apply-specific flags, such as DELTA_APPLY_FLAG_ALLOW_PA1
9. |
| * @param lpSourceName Source file name, Unicode. | | * @param lpSourceName Source file name, Unicode. |
| * @param lpDeltaName Delta file name, Unicode. | | * @param lpDeltaName Delta file name, Unicode. |
| * @param lpTargetName Target file name, Unicode. | | * @param lpTargetName Target file name, Unicode. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| ApplyDeltaW( | | ApplyDeltaW( |
|
| __in DELTA_FLAG_TYPE ApplyFlags, | | _In_ DELTA_FLAG_TYPE ApplyFlags, |
| __in LPCWSTR lpSourceName, | | _In_ LPCWSTR lpSourceName, |
| __in LPCWSTR lpDeltaName, | | _In_ LPCWSTR lpDeltaName, |
| __in LPCWSTR lpTargetName | | _In_ LPCWSTR lpTargetName |
| ); | | ); |
| | |
| #ifdef _UNICODE | | #ifdef _UNICODE |
| #define ApplyDelta ApplyDeltaW | | #define ApplyDelta ApplyDeltaW |
| #else | | #else |
| #define ApplyDelta ApplyDeltaA | | #define ApplyDelta ApplyDeltaA |
| #endif /* _UNICODE */ | | #endif /* _UNICODE */ |
| | |
| /** | | /** |
| * Creates a delta from a given source file to a given target file in memory. | | * Creates a delta from a given source file to a given target file in memory. |
| | |
| skipping to change at line 380 | | skipping to change at line 451 |
| * @param TargetOptions Memory block with target-specific options. | | * @param TargetOptions Memory block with target-specific options. |
| * @param GlobalOptions Memory block with global options. | | * @param GlobalOptions Memory block with global options. |
| * @param lpTargetFileTime Target file time to use, null to use current time. | | * @param lpTargetFileTime Target file time to use, null to use current time. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param lpDelta Result delta memory block. | | * @param lpDelta Result delta memory block. |
| * @return TRUE if sucess, FALSE otherwise. | | * @return TRUE if sucess, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| CreateDeltaB( | | CreateDeltaB( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in DELTA_FLAG_TYPE SetFlags, | | _In_ DELTA_FLAG_TYPE SetFlags, |
| __in DELTA_FLAG_TYPE ResetFlags, | | _In_ DELTA_FLAG_TYPE ResetFlags, |
| __in DELTA_INPUT Source, | | _In_ DELTA_INPUT Source, |
| __in DELTA_INPUT Target, | | _In_ DELTA_INPUT Target, |
| __in DELTA_INPUT SourceOptions, | | _In_ DELTA_INPUT SourceOptions, |
| __in DELTA_INPUT TargetOptions, | | _In_ DELTA_INPUT TargetOptions, |
| __in DELTA_INPUT GlobalOptions, | | _In_ DELTA_INPUT GlobalOptions, |
| __in_opt const FILETIME *lpTargetFileTime, | | _In_opt_ const FILETIME *lpTargetFileTime, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __out LPDELTA_OUTPUT lpDelta | | _Out_ LPDELTA_OUTPUT lpDelta |
| ); | | ); |
| | |
| /** | | /** |
| * Creates a delta from a given source file to a given target file. The resultan
t delta is written to disk | | * Creates a delta from a given source file to a given target file. The resultan
t delta is written to disk |
| * All files accessed by ASCII file names. | | * All files accessed by ASCII file names. |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param SetFlags Set these flags. | | * @param SetFlags Set these flags. |
| * @param ResetFlags Reset (supress) these flags. | | * @param ResetFlags Reset (supress) these flags. |
| * @param lpSourceName Source file name, ASCII. | | * @param lpSourceName Source file name, ASCII. |
| * @param lpTargetName Target file name, ASCII. | | * @param lpTargetName Target file name, ASCII. |
| | |
| skipping to change at line 412 | | skipping to change at line 483 |
| * @param lpTargetOptionsName Name of file with target-specific options, ASCII
. | | * @param lpTargetOptionsName Name of file with target-specific options, ASCII
. |
| * @param GlobalOptions Memory block with global options. | | * @param GlobalOptions Memory block with global options. |
| * @param lpTargetFileTime Target file time to use, null to use actual target f
ile time. | | * @param lpTargetFileTime Target file time to use, null to use actual target f
ile time. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param lpDeltaName Result delta file name, ASCII. | | * @param lpDeltaName Result delta file name, ASCII. |
| * @return TRUE if sucess, FALSE otherwise. | | * @return TRUE if sucess, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| CreateDeltaA( | | CreateDeltaA( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in DELTA_FLAG_TYPE SetFlags, | | _In_ DELTA_FLAG_TYPE SetFlags, |
| __in DELTA_FLAG_TYPE ResetFlags, | | _In_ DELTA_FLAG_TYPE ResetFlags, |
| __in LPCSTR lpSourceName, | | _In_ LPCSTR lpSourceName, |
| __in LPCSTR lpTargetName, | | _In_ LPCSTR lpTargetName, |
| __in_opt LPCSTR lpSourceOptionsName, | | _In_opt_ LPCSTR lpSourceOptionsName, |
| __in_opt LPCSTR lpTargetOptionsName, | | _In_opt_ LPCSTR lpTargetOptionsName, |
| __in DELTA_INPUT GlobalOptions, | | _In_ DELTA_INPUT GlobalOptions, |
| __in_opt const FILETIME *lpTargetFileTime, | | _In_opt_ const FILETIME *lpTargetFileTime, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __in LPCSTR lpDeltaName | | _In_ LPCSTR lpDeltaName |
| ); | | ); |
| | |
| /** | | /** |
| * Creates a delta from a given source file to a given target file. The resultan
t delta is written to disk | | * Creates a delta from a given source file to a given target file. The resultan
t delta is written to disk |
| * All files accessed by Unicode file names. | | * All files accessed by Unicode file names. |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param SetFlags Set these flags. | | * @param SetFlags Set these flags. |
| * @param ResetFlags Reset (supress) these flags. | | * @param ResetFlags Reset (supress) these flags. |
| * @param lpSourceName Source file name, Unicode. | | * @param lpSourceName Source file name, Unicode. |
| * @param lpTargetName Target file name, Unicode. | | * @param lpTargetName Target file name, Unicode. |
| | |
| skipping to change at line 444 | | skipping to change at line 515 |
| * @param lpTargetOptionsName Name of file with target-specific options, Unico
de. | | * @param lpTargetOptionsName Name of file with target-specific options, Unico
de. |
| * @param GlobalOptions Memory block with global options. | | * @param GlobalOptions Memory block with global options. |
| * @param lpTargetFileTime Target file time to use, null to use actual target f
ile time. | | * @param lpTargetFileTime Target file time to use, null to use actual target f
ile time. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param lpDeltaName Result delta file name, Unicode. | | * @param lpDeltaName Result delta file name, Unicode. |
| * @return TRUE if sucess, FALSE otherwise. | | * @return TRUE if sucess, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| CreateDeltaW( | | CreateDeltaW( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in DELTA_FLAG_TYPE SetFlags, | | _In_ DELTA_FLAG_TYPE SetFlags, |
| __in DELTA_FLAG_TYPE ResetFlags, | | _In_ DELTA_FLAG_TYPE ResetFlags, |
| __in LPCWSTR lpSourceName, | | _In_ LPCWSTR lpSourceName, |
| __in LPCWSTR lpTargetName, | | _In_ LPCWSTR lpTargetName, |
| __in_opt LPCWSTR lpSourceOptionsName, | | _In_opt_ LPCWSTR lpSourceOptionsName, |
| __in_opt LPCWSTR lpTargetOptionsName, | | _In_opt_ LPCWSTR lpTargetOptionsName, |
| __in DELTA_INPUT GlobalOptions, | | _In_ DELTA_INPUT GlobalOptions, |
| __in_opt const FILETIME *lpTargetFileTime, | | _In_opt_ const FILETIME *lpTargetFileTime, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __in LPCWSTR lpDeltaName | | _In_ LPCWSTR lpDeltaName |
| ); | | ); |
| | |
| #ifdef _UNICODE | | #ifdef _UNICODE |
| #define CreateDelta CreateDeltaW | | #define CreateDelta CreateDeltaW |
| #else | | #else |
| #define CreateDelta CreateDeltaA | | #define CreateDelta CreateDeltaA |
| #endif /* _UNICODE */ | | #endif /* _UNICODE */ |
| | |
| /** | | /** |
| * Calculates a hash for normalized source file in memory. | | * Calculates a hash for normalized source file in memory. |
| | |
| skipping to change at line 476 | | skipping to change at line 547 |
| * which is determined automatically according to the given file type set. | | * which is determined automatically according to the given file type set. |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param Source Source memory block. | | * @param Source Source memory block. |
| * @param lpHash Result hash. | | * @param lpHash Result hash. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaSignatureB( | | GetDeltaSignatureB( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __in DELTA_INPUT Source, | | _In_ DELTA_INPUT Source, |
| __out LPDELTA_HASH lpHash | | _Out_ LPDELTA_HASH lpHash |
| ); | | ); |
| | |
| /** | | /** |
| * Calculates a hash for normalized source file accessed by ASCII file name. | | * Calculates a hash for normalized source file accessed by ASCII file name. |
| * Normalization is based on source file type, | | * Normalization is based on source file type, |
| * which is determined automatically according to the given file type set. | | * which is determined automatically according to the given file type set. |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param lpSourceName Source file name, ASCII. | | * @param lpSourceName Source file name, ASCII. |
| * @param lpHash Result hash. | | * @param lpHash Result hash. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaSignatureA( | | GetDeltaSignatureA( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __in LPCSTR lpSourceName, | | _In_ LPCSTR lpSourceName, |
| __out LPDELTA_HASH lpHash | | _Out_ LPDELTA_HASH lpHash |
| ); | | ); |
| | |
| /** | | /** |
| * Calculates a hash for normalized source file accessed by Unicode file name. | | * Calculates a hash for normalized source file accessed by Unicode file name. |
| * Normalization is based on source file type, | | * Normalization is based on source file type, |
| * which is determined automatically according to the given file type set. | | * which is determined automatically according to the given file type set. |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param HashAlgId Algorithm for hashing. | | * @param HashAlgId Algorithm for hashing. |
| * @param lpSourceName Source file name, Unicode. | | * @param lpSourceName Source file name, Unicode. |
| * @param lpHash Result hash. | | * @param lpHash Result hash. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| GetDeltaSignatureW( | | GetDeltaSignatureW( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in ALG_ID HashAlgId, | | _In_ ALG_ID HashAlgId, |
| __in LPCWSTR lpSourceName, | | _In_ LPCWSTR lpSourceName, |
| __out LPDELTA_HASH lpHash | | _Out_ LPDELTA_HASH lpHash |
| ); | | ); |
| | |
| #ifdef _UNICODE | | #ifdef _UNICODE |
| #define GetDeltaSignature GetDeltaSignatureW | | #define GetDeltaSignature GetDeltaSignatureW |
| #else | | #else |
| #define GetDeltaSignature GetDeltaSignatureA | | #define GetDeltaSignature GetDeltaSignatureA |
| #endif /* _UNICODE */ | | #endif /* _UNICODE */ |
| | |
| /** | | /** |
| * Normalizes source buffer, normalization is based on source file type, which
is | | * Normalizes source buffer, normalization is based on source file type, which
is |
| | |
| skipping to change at line 539 | | skipping to change at line 610 |
| * @param FileTypeSet File type set. | | * @param FileTypeSet File type set. |
| * @param NormalizeFlags Normalization flags. | | * @param NormalizeFlags Normalization flags. |
| * @param NormalizeOptions Normalization options. | | * @param NormalizeOptions Normalization options. |
| * @param lpSource Pointer to source buffer. | | * @param lpSource Pointer to source buffer. |
| * @param uSourceSize Size of source buffer in bytes. | | * @param uSourceSize Size of source buffer in bytes. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| DeltaNormalizeProvidedB( | | DeltaNormalizeProvidedB( |
|
| __in DELTA_FILE_TYPE FileTypeSet, | | _In_ DELTA_FILE_TYPE FileTypeSet, |
| __in DELTA_FLAG_TYPE NormalizeFlags, | | _In_ DELTA_FLAG_TYPE NormalizeFlags, |
| __in DELTA_INPUT NormalizeOptions, | | _In_ DELTA_INPUT NormalizeOptions, |
| __inout_bcount( uSourceSize ) LPVOID lpSource, | | _Inout_updates_bytes_( uSourceSize ) LPVOID lpSource, |
| __in SIZE_T uSourceSize | | _In_ SIZE_T uSourceSize |
| ); | | ); |
| | |
| /** | | /** |
| * Frees memory block allocated by msdelta. | | * Frees memory block allocated by msdelta. |
| * @param lpMemory Pointer to memory block, previously allocated by msdelta. | | * @param lpMemory Pointer to memory block, previously allocated by msdelta. |
| * @return TRUE if success, FALSE otherwise. | | * @return TRUE if success, FALSE otherwise. |
| */ | | */ |
| BOOL | | BOOL |
| WINAPI | | WINAPI |
| DeltaFree( | | DeltaFree( |
|
| __in LPVOID lpMemory | | _In_ LPVOID lpMemory |
| ); | | ); |
| | |
| #ifdef __cplusplus | | #ifdef __cplusplus |
| } | | } |
| #endif /* __cplusplus */ | | #endif /* __cplusplus */ |
|
| | |
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| End of changes. 22 change blocks. |
| 75 lines changed or deleted | | 152 lines changed or added |
|