fix compile with gcc
[reactos.git] / reactos / w32api / include / msiquery.h
1 /*
2 * Copyright (C) 2002,2003 Mike McCormack
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #ifndef __WINE_MSIQUERY_H
20 #define __WINE_MSIQUERY_H
21
22 #include <msi.h>
23
24 typedef enum tagMSICONDITION
25 {
26 MSICONDITION_FALSE = 0,
27 MSICONDITION_TRUE = 1,
28 MSICONDITION_NONE = 2,
29 MSICONDITION_ERROR = 3,
30 } MSICONDITION;
31
32 #define MSI_NULL_INTEGER 0x80000000
33
34 typedef enum tagMSICOLINFO
35 {
36 MSICOLINFO_NAMES = 0,
37 MSICOLINFO_TYPES = 1
38 } MSICOLINFO;
39
40 typedef enum tagMSIMODIFY
41 {
42 MSIMODIFY_REFRESH = 0,
43 MSIMODIFY_INSERT = 1,
44 MSIMODIFY_UPDATE = 2,
45 MSIMODIFY_ASSIGN = 3,
46 MSIMODIFY_REPLACE = 4,
47 MSIMODIFY_MERGE = 5,
48 MSIMODIFY_DELETE = 6,
49 MSIMODIFY_INSERT_TEMPORARY = 7,
50 MSIMODIFY_VALIDATE = 8,
51 MSIMODIFY_VALIDATE_NEW = 9,
52 MSIMODIFY_VALIDATE_FIELD = 10,
53 MSIMODIFY_VALIDATE_DELETE = 11
54 } MSIMODIFY;
55
56 #define MSIDBOPEN_READONLY (LPCTSTR)0
57 #define MSIDBOPEN_TRANSACT (LPCTSTR)1
58 #define MSIDBOPEN_DIRECT (LPCTSTR)2
59 #define MSIDBOPEN_CREATE (LPCTSTR)3
60 #define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4
61
62 typedef enum tagMSIRUNMODE
63 {
64 MSIRUNMODE_ADMIN = 0,
65 MSIRUNMODE_ADVERTISE = 1,
66 MSIRUNMODE_MAINTENANCE = 2,
67 MSIRUNMODE_ROLLBACKENABLED = 3,
68 MSIRUNMODE_LOGENABLED = 4,
69 MSIRUNMODE_OPERATIONS = 5,
70 MSIRUNMODE_REBOOTATEND = 6,
71 MSIRUNMODE_REBOOTNOW = 7,
72 MSIRUNMODE_CABINET = 8,
73 MSIRUNMODE_SOURCESHORTNAMES = 9,
74 MSIRUNMODE_TARGETSHORTNAMES = 10,
75 MSIRUNMODE_RESERVED11 = 11,
76 MSIRUNMODE_WINDOWS9X = 12,
77 MSIRUNMODE_ZAWENABLED = 13,
78 MSIRUNMODE_RESERVED14 = 14,
79 MSIRUNMODE_RESERVED15 = 15,
80 MSIRUNMODE_SCHEDULED = 16,
81 MSIRUNMODE_ROLLBACK = 17,
82 MSIRUNMODE_COMMIT = 18
83 } MSIRUNMODE;
84
85 typedef enum tagMSIDBERROR
86 {
87 MSIDBERROR_INVALIDARG = -3,
88 MSIDBERROR_MOREDATA = -2,
89 MSIDBERROR_FUNCTIONERROR = -1,
90 MSIDBERROR_NOERROR = 0,
91 MSIDBERROR_DUPLICATEKEY = 1,
92 MSIDBERROR_REQUIRED = 2,
93 MSIDBERROR_BADLINK = 3,
94 MSIDBERROR_OVERFLOW = 4,
95 MSIDBERROR_UNDERFLOW = 5,
96 MSIDBERROR_NOTINSET = 6,
97 MSIDBERROR_BADVERSION = 7,
98 MSIDBERROR_BADCASE = 8,
99 MSIDBERROR_BADGUID = 9,
100 MSIDBERROR_BADWILDCARD = 10,
101 MSIDBERROR_BADIDENTIFIER = 11,
102 MSIDBERROR_BADLANGUAGE = 12,
103 MSIDBERROR_BADFILENAME = 13,
104 MSIDBERROR_BADPATH = 14,
105 MSIDBERROR_BADCONDITION = 15,
106 MSIDBERROR_BADFORMATTED = 16,
107 MSIDBERROR_BADTEMPLATE = 17,
108 MSIDBERROR_BADDEFAULTDIR = 18,
109 MSIDBERROR_BADREGPATH = 19,
110 MSIDBERROR_BADCUSTOMSOURCE = 20,
111 MSIDBERROR_BADPROPERTY = 21,
112 MSIDBERROR_MISSINGDATA = 22,
113 MSIDBERROR_BADCATEGORY = 23,
114 MSIDBERROR_BADKEYTABLE = 24,
115 MSIDBERROR_BADMAXMINVALUES = 25,
116 MSIDBERROR_BADCABINET = 26,
117 MSIDBERROR_BADSHORTCUT= 27,
118 MSIDBERROR_STRINGOVERFLOW = 28,
119 MSIDBERROR_BADLOCALIZEATTRIB = 29
120 } MSIDBERROR;
121
122 /* view manipulation */
123 UINT WINAPI MsiViewFetch(MSIHANDLE,MSIHANDLE*);
124 UINT WINAPI MsiViewExecute(MSIHANDLE,MSIHANDLE);
125 UINT WINAPI MsiViewClose(MSIHANDLE);
126 UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE,LPCSTR,MSIHANDLE*);
127 UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
128 #define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
129 MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,DWORD*);
130 MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,DWORD*);
131 #define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
132
133 /* record manipulation */
134 MSIHANDLE WINAPI MsiCreateRecord(unsigned int);
135 UINT WINAPI MsiRecordClearData(MSIHANDLE);
136 UINT WINAPI MsiRecordSetInteger(MSIHANDLE,unsigned int,int);
137 UINT WINAPI MsiRecordSetStringA(MSIHANDLE,unsigned int,LPCSTR);
138 UINT WINAPI MsiRecordSetStringW(MSIHANDLE,unsigned int,LPCWSTR);
139 #define MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
140 UINT WINAPI MsiRecordGetStringA(MSIHANDLE,unsigned int,LPSTR,DWORD*);
141 UINT WINAPI MsiRecordGetStringW(MSIHANDLE,unsigned int,LPWSTR,DWORD*);
142 #define MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
143 UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE);
144 int WINAPI MsiRecordGetInteger(MSIHANDLE,unsigned int);
145 UINT WINAPI MsiRecordDataSize(MSIHANDLE,unsigned int);
146 BOOL WINAPI MsiRecordIsNull(MSIHANDLE,unsigned int);
147 UINT WINAPI MsiFormatRecordA(MSIHANDLE,MSIHANDLE,LPSTR,DWORD*);
148 UINT WINAPI MsiFormatRecordW(MSIHANDLE,MSIHANDLE,LPWSTR,DWORD*);
149 #define MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
150 UINT WINAPI MsiRecordSetStreamA(MSIHANDLE,unsigned int,LPCSTR);
151 UINT WINAPI MsiRecordSetStreamW(MSIHANDLE,unsigned int,LPCWSTR);
152 #define MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
153 UINT WINAPI MsiRecordReadStream(MSIHANDLE,unsigned int,char*,DWORD *);
154
155 UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE,LPCSTR,MSIHANDLE*);
156 UINT WINAPI MsiDatabaseGetPrimaryKeysW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
157 #define MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
158
159 /* installing */
160 UINT WINAPI MsiDoActionA(MSIHANDLE,LPCSTR );
161 UINT WINAPI MsiDoActionW(MSIHANDLE,LPCWSTR );
162 #define MsiDoAction WINELIB_NAME_AW(MsiDoAction)
163
164 /* database transforms */
165 UINT WINAPI MsiDatabaseApplyTransformA(MSIHANDLE,LPCSTR,int);
166 UINT WINAPI MsiDatabaseApplyTransformW(MSIHANDLE,LPCWSTR,int);
167 #define MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
168 UINT WINAPI MsiDatabaseGenerateTransformA(MSIHANDLE,MSIHANDLE,LPCSTR,int,int);
169 UINT WINAPI MsiDatabaseGenerateTransformW(MSIHANDLE,MSIHANDLE,LPCWSTR,int,int);
170 #define MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
171
172 UINT WINAPI MsiDatabaseCommit(MSIHANDLE);
173
174 /* install state */
175 UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
176 UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
177 #define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
178 UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
179 UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
180 #define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
181 UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPSTR,INSTALLSTATE*,INSTALLSTATE*);
182 UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPWSTR,INSTALLSTATE*,INSTALLSTATE*);
183 #define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
184
185 MSICONDITION WINAPI MsiEvaluateConditionA(MSIHANDLE,LPCSTR);
186 MSICONDITION WINAPI MsiEvaluateConditionW(MSIHANDLE,LPCWSTR);
187 #define MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)
188
189 /* property functions */
190 UINT WINAPI MsiGetPropertyA(MSIHANDLE, LPCSTR, LPSTR, DWORD*);
191 UINT WINAPI MsiGetPropertyW(MSIHANDLE, LPCWSTR, LPWSTR, DWORD*);
192 #define MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
193
194 UINT WINAPI MsiSetPropertyA(MSIHANDLE, LPCSTR, LPCSTR);
195 UINT WINAPI MsiSetPropertyW(MSIHANDLE, LPCWSTR, LPCWSTR);
196 #define MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)
197
198 UINT WINAPI MsiGetTargetPathA(MSIHANDLE,LPCSTR,LPSTR,DWORD*);
199 UINT WINAPI MsiGetTargetPathW(MSIHANDLE,LPCWSTR,LPWSTR,DWORD*);
200 #define MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)
201
202 UINT WINAPI MsiSetTargetPathA(MSIHANDLE, LPCSTR, LPCSTR);
203 UINT WINAPI MsiSetTargetPathW(MSIHANDLE, LPCWSTR, LPCWSTR);
204 #define MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)
205
206 UINT WINAPI MsiGetSourcePathA(MSIHANDLE,LPCSTR,LPSTR,DWORD*);
207 UINT WINAPI MsiGetSourcePathW(MSIHANDLE,LPCWSTR,LPWSTR,DWORD*);
208 #define MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)
209
210 MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE);
211
212 UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE, MSICOLINFO, MSIHANDLE*);
213 INT WINAPI MsiProcessMessage(MSIHANDLE, INSTALLMESSAGE, MSIHANDLE);
214
215 UINT WINAPI MsiSetFeatureStateA(MSIHANDLE, LPCSTR, INSTALLSTATE);
216 UINT WINAPI MsiSetFeatureStateW(MSIHANDLE, LPCWSTR, INSTALLSTATE);
217 #define MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
218
219 UINT WINAPI MsiPreviewDialogA(MSIHANDLE, LPCSTR);
220 UINT WINAPI MsiPreviewDialogW(MSIHANDLE, LPCWSTR);
221 #define MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)
222
223 UINT WINAPI MsiPreviewBillboardA(MSIHANDLE, LPCSTR, LPCSTR);
224 UINT WINAPI MsiPreviewBillboardW(MSIHANDLE, LPCWSTR, LPCWSTR);
225 #define MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)
226
227 UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE, LPCSTR, UINT, MSIHANDLE *);
228 UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE, LPCWSTR, UINT, MSIHANDLE *);
229 #define MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
230
231 UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE,UINT,UINT*,INT*,FILETIME*,LPSTR,DWORD*);
232 UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE,UINT,UINT*,INT*,FILETIME*,LPWSTR,DWORD*);
233 #define MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
234
235 UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCSTR);
236 UINT WINAPI MsiSummaryInfoSetPropertyW(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCWSTR);
237 #define MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)
238
239 UINT WINAPI MsiDatabaseExportA(MSIHANDLE, LPCSTR, LPCSTR, LPCSTR);
240 UINT WINAPI MsiDatabaseExportW(MSIHANDLE, LPCWSTR, LPCWSTR, LPCWSTR);
241 #define MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)
242
243 UINT WINAPI MsiDatabaseImportA(MSIHANDLE, LPCSTR, LPCSTR);
244 UINT WINAPI MsiDatabaseImportW(MSIHANDLE, LPCWSTR, LPCWSTR);
245 #define MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)
246
247 UINT WINAPI MsiOpenDatabaseW(LPCWSTR, LPCWSTR, MSIHANDLE*);
248 UINT WINAPI MsiOpenDatabaseA(LPCSTR, LPCSTR, MSIHANDLE*);
249 #define MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
250
251 UINT WINAPI MsiDatabaseIsTablePersistentA(MSIHANDLE, LPSTR);
252 UINT WINAPI MsiDatabaseIsTablePersistentW(MSIHANDLE, LPWSTR);
253 #define MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)
254
255 UINT WINAPI MsiSequenceA(MSIHANDLE, LPCSTR, INT);
256 UINT WINAPI MsiSequenceW(MSIHANDLE, LPCWSTR, INT);
257 #define MsiSequence WINELIB_NAME_AW(MsiSequence)
258
259 UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE);
260 UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE,UINT*);
261
262 UINT WINAPI MsiEnableUIPreview(MSIHANDLE, MSIHANDLE*);
263 BOOL WINAPI MsiGetMode(MSIHANDLE, MSIRUNMODE);
264
265 UINT WINAPI MsiViewModify(MSIHANDLE, MSIMODIFY, MSIHANDLE);
266
267 #endif /* __WINE_MSIQUERY_H */