1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
/*++
Copyright (c) 1992 Microsoft Corporation
Module Name:
instutil.h
Abstract:
Header file for common definition for programs that manipulate the output of
the INSTALER.EXE program (e.g. DISPINST.EXE, COMPINST.EXE, UNDOINST.EXE)
Author:
Steve Wood (stevewo) 14-Jan-1996
Revision History:
--*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <tchar.h>
WCHAR InstalerDirectory[ MAX_PATH ];
PWSTR InstallationName;
PWSTR ImlPath;
BOOLEAN DebugOutput;
//
// Useful rounding macros that the rounding amount is always a
// power of two.
//
#define ROUND_DOWN( Size, Amount ) ((DWORD)(Size) & ~((Amount) - 1))
#define ROUND_UP( Size, Amount ) (((DWORD)(Size) + ((Amount) - 1)) & ~((Amount) - 1))
void
InitCommonCode(
LPSTR ModuleName,
LPSTR ModuleUsage1,
LPSTR ModuleUsage2
);
void
Usage(
LPSTR Message,
ULONG MessageParameter
);
void
FatalError(
LPSTR Message,
ULONG MessageParameter1,
ULONG MessageParameter2
);
void
InputMessage(
PWSTR FileName,
ULONG LineNumber,
BOOLEAN Error,
LPSTR Message,
ULONG MessageParameter1,
ULONG MessageParameter2
);
PWSTR
GetArgAsUnicode(
LPSTR s
);
void
CommonSwitchProcessing(
PULONG argc,
PCHAR **argv,
CHAR c
);
BOOLEAN
CommonArgProcessing(
PULONG argc,
PCHAR **argv
);
PWSTR
FormatTempFileName(
PWSTR Directory,
PUSHORT TempFileUniqueId
);
PWSTR
CreateBackupFileName(
PUSHORT TempFileUniqueId
);
typedef struct _ENUM_TYPE_NAMES {
ULONG Value;
LPSTR Name;
} ENUM_TYPE_NAMES, *PENUM_TYPE_NAMES;
LPSTR
FormatEnumType(
ULONG BufferIndex,
PENUM_TYPE_NAMES Table,
ULONG Value,
BOOLEAN FlagFormat
);
ENUM_TYPE_NAMES ValueDataTypeNames[];
|