xmllite/tests: Fix a memory leak (Valgrind).
[wine.git] / include / msiquery.h
bloba1f3c6c9fd65d37b0293db1a2c53ad62a3f926a9
1 /*
2 * Copyright (C) 2002,2003 Mike McCormack
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.
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.
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
19 #ifndef __WINE_MSIQUERY_H
20 #define __WINE_MSIQUERY_H
22 #include <msi.h>
24 typedef enum tagMSICONDITION
26 MSICONDITION_FALSE = 0,
27 MSICONDITION_TRUE = 1,
28 MSICONDITION_NONE = 2,
29 MSICONDITION_ERROR = 3,
30 } MSICONDITION;
32 #define MSI_NULL_INTEGER 0x80000000
34 typedef enum tagMSICOLINFO
36 MSICOLINFO_NAMES = 0,
37 MSICOLINFO_TYPES = 1
38 } MSICOLINFO;
40 typedef enum tagMSICOSTTREE
42 MSICOSTTREE_SELFONLY = 0,
43 MSICOSTTREE_CHILDREN = 1,
44 MSICOSTTREE_PARENTS = 2,
45 MSICOSTTREE_PRODUCT = 3,
46 } MSICOSTTREE;
48 typedef enum tagMSIMODIFY
50 MSIMODIFY_SEEK = -1,
51 MSIMODIFY_REFRESH = 0,
52 MSIMODIFY_INSERT = 1,
53 MSIMODIFY_UPDATE = 2,
54 MSIMODIFY_ASSIGN = 3,
55 MSIMODIFY_REPLACE = 4,
56 MSIMODIFY_MERGE = 5,
57 MSIMODIFY_DELETE = 6,
58 MSIMODIFY_INSERT_TEMPORARY = 7,
59 MSIMODIFY_VALIDATE = 8,
60 MSIMODIFY_VALIDATE_NEW = 9,
61 MSIMODIFY_VALIDATE_FIELD = 10,
62 MSIMODIFY_VALIDATE_DELETE = 11
63 } MSIMODIFY;
65 #ifndef WINE_NO_UNICODE_MACROS
66 #define MSIDBOPEN_READONLY (LPCTSTR)0
67 #define MSIDBOPEN_TRANSACT (LPCTSTR)1
68 #define MSIDBOPEN_DIRECT (LPCTSTR)2
69 #define MSIDBOPEN_CREATE (LPCTSTR)3
70 #define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4
71 #else
72 #define MSIDBOPEN_READONLY (LPCWSTR)0
73 #define MSIDBOPEN_TRANSACT (LPCWSTR)1
74 #define MSIDBOPEN_DIRECT (LPCWSTR)2
75 #define MSIDBOPEN_CREATE (LPCWSTR)3
76 #define MSIDBOPEN_CREATEDIRECT (LPCWSTR)4
77 #endif
79 #define MSIDBOPEN_PATCHFILE 32 / sizeof(*MSIDBOPEN_READONLY)
81 typedef enum tagMSIRUNMODE
83 MSIRUNMODE_ADMIN = 0,
84 MSIRUNMODE_ADVERTISE = 1,
85 MSIRUNMODE_MAINTENANCE = 2,
86 MSIRUNMODE_ROLLBACKENABLED = 3,
87 MSIRUNMODE_LOGENABLED = 4,
88 MSIRUNMODE_OPERATIONS = 5,
89 MSIRUNMODE_REBOOTATEND = 6,
90 MSIRUNMODE_REBOOTNOW = 7,
91 MSIRUNMODE_CABINET = 8,
92 MSIRUNMODE_SOURCESHORTNAMES = 9,
93 MSIRUNMODE_TARGETSHORTNAMES = 10,
94 MSIRUNMODE_RESERVED11 = 11,
95 MSIRUNMODE_WINDOWS9X = 12,
96 MSIRUNMODE_ZAWENABLED = 13,
97 MSIRUNMODE_RESERVED14 = 14,
98 MSIRUNMODE_RESERVED15 = 15,
99 MSIRUNMODE_SCHEDULED = 16,
100 MSIRUNMODE_ROLLBACK = 17,
101 MSIRUNMODE_COMMIT = 18
102 } MSIRUNMODE;
104 typedef enum tagMSIDBERROR
106 MSIDBERROR_INVALIDARG = -3,
107 MSIDBERROR_MOREDATA = -2,
108 MSIDBERROR_FUNCTIONERROR = -1,
109 MSIDBERROR_NOERROR = 0,
110 MSIDBERROR_DUPLICATEKEY = 1,
111 MSIDBERROR_REQUIRED = 2,
112 MSIDBERROR_BADLINK = 3,
113 MSIDBERROR_OVERFLOW = 4,
114 MSIDBERROR_UNDERFLOW = 5,
115 MSIDBERROR_NOTINSET = 6,
116 MSIDBERROR_BADVERSION = 7,
117 MSIDBERROR_BADCASE = 8,
118 MSIDBERROR_BADGUID = 9,
119 MSIDBERROR_BADWILDCARD = 10,
120 MSIDBERROR_BADIDENTIFIER = 11,
121 MSIDBERROR_BADLANGUAGE = 12,
122 MSIDBERROR_BADFILENAME = 13,
123 MSIDBERROR_BADPATH = 14,
124 MSIDBERROR_BADCONDITION = 15,
125 MSIDBERROR_BADFORMATTED = 16,
126 MSIDBERROR_BADTEMPLATE = 17,
127 MSIDBERROR_BADDEFAULTDIR = 18,
128 MSIDBERROR_BADREGPATH = 19,
129 MSIDBERROR_BADCUSTOMSOURCE = 20,
130 MSIDBERROR_BADPROPERTY = 21,
131 MSIDBERROR_MISSINGDATA = 22,
132 MSIDBERROR_BADCATEGORY = 23,
133 MSIDBERROR_BADKEYTABLE = 24,
134 MSIDBERROR_BADMAXMINVALUES = 25,
135 MSIDBERROR_BADCABINET = 26,
136 MSIDBERROR_BADSHORTCUT= 27,
137 MSIDBERROR_STRINGOVERFLOW = 28,
138 MSIDBERROR_BADLOCALIZEATTRIB = 29
139 } MSIDBERROR;
141 typedef enum tagMSIDBSTATE
143 MSIDBSTATE_ERROR = -1,
144 MSIDBSTATE_READ = 0,
145 MSIDBSTATE_WRITE = 1
146 } MSIDBSTATE;
148 typedef enum tagMSITRANSFORM_VALIDATE
150 MSITRANSFORM_VALIDATE_LANGUAGE = 0x00000001,
151 MSITRANSFORM_VALIDATE_PRODUCT = 0x00000002,
152 MSITRANSFORM_VALIDATE_PLATFORM = 0x00000004,
153 MSITRANSFORM_VALIDATE_MAJORVERSION = 0x00000008,
154 MSITRANSFORM_VALIDATE_MINORVERSION = 0x00000010,
155 MSITRANSFORM_VALIDATE_UPDATEVERSION = 0x00000020,
156 MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION = 0x00000040,
157 MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION = 0x00000080,
158 MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION = 0x00000100,
159 MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION = 0x00000200,
160 MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION = 0x00000400,
161 MSITRANSFORM_VALIDATE_UPGRADECODE = 0x00000800
162 } MSITRANSFORM_VALIDATE;
164 #ifdef __cplusplus
165 extern "C" {
166 #endif
168 /* view manipulation */
169 UINT WINAPI MsiViewFetch(MSIHANDLE,MSIHANDLE*);
170 UINT WINAPI MsiViewExecute(MSIHANDLE,MSIHANDLE);
171 UINT WINAPI MsiViewClose(MSIHANDLE);
172 UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE,LPCSTR,MSIHANDLE*);
173 UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
174 #define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
175 MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,LPDWORD);
176 MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,LPDWORD);
177 #define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
179 MSIDBSTATE WINAPI MsiGetDatabaseState(MSIHANDLE);
181 /* record manipulation */
182 MSIHANDLE WINAPI MsiCreateRecord(UINT);
183 UINT WINAPI MsiRecordClearData(MSIHANDLE);
184 UINT WINAPI MsiRecordSetInteger(MSIHANDLE,UINT,int);
185 UINT WINAPI MsiRecordSetStringA(MSIHANDLE,UINT,LPCSTR);
186 UINT WINAPI MsiRecordSetStringW(MSIHANDLE,UINT,LPCWSTR);
187 #define MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
188 UINT WINAPI MsiRecordGetStringA(MSIHANDLE,UINT,LPSTR,LPDWORD);
189 UINT WINAPI MsiRecordGetStringW(MSIHANDLE,UINT,LPWSTR,LPDWORD);
190 #define MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
191 UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE);
192 int WINAPI MsiRecordGetInteger(MSIHANDLE,UINT);
193 UINT WINAPI MsiRecordDataSize(MSIHANDLE,UINT);
194 BOOL WINAPI MsiRecordIsNull(MSIHANDLE,UINT);
195 UINT WINAPI MsiFormatRecordA(MSIHANDLE,MSIHANDLE,LPSTR,LPDWORD);
196 UINT WINAPI MsiFormatRecordW(MSIHANDLE,MSIHANDLE,LPWSTR,LPDWORD);
197 #define MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
198 UINT WINAPI MsiRecordSetStreamA(MSIHANDLE,UINT,LPCSTR);
199 UINT WINAPI MsiRecordSetStreamW(MSIHANDLE,UINT,LPCWSTR);
200 #define MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
201 UINT WINAPI MsiRecordReadStream(MSIHANDLE,UINT,char*,LPDWORD);
203 UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE,LPCSTR,MSIHANDLE*);
204 UINT WINAPI MsiDatabaseGetPrimaryKeysW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
205 #define MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
207 /* installing */
208 UINT WINAPI MsiDoActionA(MSIHANDLE,LPCSTR );
209 UINT WINAPI MsiDoActionW(MSIHANDLE,LPCWSTR );
210 #define MsiDoAction WINELIB_NAME_AW(MsiDoAction)
212 /* database transforms */
213 UINT WINAPI MsiDatabaseApplyTransformA(MSIHANDLE,LPCSTR,int);
214 UINT WINAPI MsiDatabaseApplyTransformW(MSIHANDLE,LPCWSTR,int);
215 #define MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
216 UINT WINAPI MsiDatabaseGenerateTransformA(MSIHANDLE,MSIHANDLE,LPCSTR,int,int);
217 UINT WINAPI MsiDatabaseGenerateTransformW(MSIHANDLE,MSIHANDLE,LPCWSTR,int,int);
218 #define MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
220 UINT WINAPI MsiDatabaseCommit(MSIHANDLE);
222 /* install state */
223 UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
224 UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
225 #define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
226 UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE,LPCSTR,LPDWORD);
227 UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE,LPCWSTR,LPDWORD);
228 #define MsiGetFeatureValidStates WINELIB_NAME_AW(MsiGetFeatureValidStates)
229 UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
230 UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
231 #define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
232 UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
233 UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
234 #define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
236 MSICONDITION WINAPI MsiEvaluateConditionA(MSIHANDLE,LPCSTR);
237 MSICONDITION WINAPI MsiEvaluateConditionW(MSIHANDLE,LPCWSTR);
238 #define MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)
240 /* property functions */
241 UINT WINAPI MsiGetPropertyA(MSIHANDLE, LPCSTR, LPSTR, LPDWORD);
242 UINT WINAPI MsiGetPropertyW(MSIHANDLE, LPCWSTR, LPWSTR, LPDWORD);
243 #define MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
245 UINT WINAPI MsiSetPropertyA(MSIHANDLE, LPCSTR, LPCSTR);
246 UINT WINAPI MsiSetPropertyW(MSIHANDLE, LPCWSTR, LPCWSTR);
247 #define MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)
249 UINT WINAPI MsiGetTargetPathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
250 UINT WINAPI MsiGetTargetPathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
251 #define MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)
253 UINT WINAPI MsiSetTargetPathA(MSIHANDLE, LPCSTR, LPCSTR);
254 UINT WINAPI MsiSetTargetPathW(MSIHANDLE, LPCWSTR, LPCWSTR);
255 #define MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)
257 UINT WINAPI MsiGetSourcePathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
258 UINT WINAPI MsiGetSourcePathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
259 #define MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)
261 MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE);
263 UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE, MSICOLINFO, MSIHANDLE*);
264 INT WINAPI MsiProcessMessage(MSIHANDLE, INSTALLMESSAGE, MSIHANDLE);
266 UINT WINAPI MsiSetFeatureAttributesA(MSIHANDLE, LPCSTR, DWORD);
267 UINT WINAPI MsiSetFeatureAttributesW(MSIHANDLE, LPCWSTR, DWORD);
268 #define MsiSetFeatureAttributes WINELIB_NAME_AW(MsiSetFeatureAttributes)
270 UINT WINAPI MsiSetFeatureStateA(MSIHANDLE, LPCSTR, INSTALLSTATE);
271 UINT WINAPI MsiSetFeatureStateW(MSIHANDLE, LPCWSTR, INSTALLSTATE);
272 #define MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
274 UINT WINAPI MsiPreviewDialogA(MSIHANDLE, LPCSTR);
275 UINT WINAPI MsiPreviewDialogW(MSIHANDLE, LPCWSTR);
276 #define MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)
278 UINT WINAPI MsiPreviewBillboardA(MSIHANDLE, LPCSTR, LPCSTR);
279 UINT WINAPI MsiPreviewBillboardW(MSIHANDLE, LPCWSTR, LPCWSTR);
280 #define MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)
282 UINT WINAPI MsiCreateTransformSummaryInfoA(MSIHANDLE, MSIHANDLE, LPCSTR, int, int);
283 UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE, MSIHANDLE, LPCWSTR, int, int);
284 #define MsiCreateTransformSummaryInfo WINELIB_NAME_AW(MsiCreateTransformSummaryInfo)
286 UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE, LPCSTR, UINT, MSIHANDLE *);
287 UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE, LPCWSTR, UINT, MSIHANDLE *);
288 #define MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
290 UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPSTR,LPDWORD);
291 UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPWSTR,LPDWORD);
292 #define MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
294 UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCSTR);
295 UINT WINAPI MsiSummaryInfoSetPropertyW(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCWSTR);
296 #define MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)
298 UINT WINAPI MsiDatabaseExportA(MSIHANDLE, LPCSTR, LPCSTR, LPCSTR);
299 UINT WINAPI MsiDatabaseExportW(MSIHANDLE, LPCWSTR, LPCWSTR, LPCWSTR);
300 #define MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)
302 UINT WINAPI MsiDatabaseImportA(MSIHANDLE, LPCSTR, LPCSTR);
303 UINT WINAPI MsiDatabaseImportW(MSIHANDLE, LPCWSTR, LPCWSTR);
304 #define MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)
306 UINT WINAPI MsiOpenDatabaseW(LPCWSTR, LPCWSTR, MSIHANDLE*);
307 UINT WINAPI MsiOpenDatabaseA(LPCSTR, LPCSTR, MSIHANDLE*);
308 #define MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
310 MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(MSIHANDLE, LPCSTR);
311 MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(MSIHANDLE, LPCWSTR);
312 #define MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)
314 UINT WINAPI MsiSequenceA(MSIHANDLE, LPCSTR, INT);
315 UINT WINAPI MsiSequenceW(MSIHANDLE, LPCWSTR, INT);
316 #define MsiSequence WINELIB_NAME_AW(MsiSequence)
318 UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE);
319 UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE,PUINT);
321 UINT WINAPI MsiEnableUIPreview(MSIHANDLE, MSIHANDLE*);
322 BOOL WINAPI MsiGetMode(MSIHANDLE, MSIRUNMODE);
323 UINT WINAPI MsiSetMode(MSIHANDLE, MSIRUNMODE, BOOL);
325 UINT WINAPI MsiViewModify(MSIHANDLE, MSIMODIFY, MSIHANDLE);
327 UINT WINAPI MsiGetFeatureCostA(MSIHANDLE, LPCSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
328 UINT WINAPI MsiGetFeatureCostW(MSIHANDLE, LPCWSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
329 #define MsiGetFeatureCost WINELIB_NAME_AW(MsiGetFeatureCost)
331 LANGID WINAPI MsiGetLanguage(MSIHANDLE);
333 UINT WINAPI MsiSetInstallLevel(MSIHANDLE, int);
335 MSIHANDLE WINAPI MsiGetLastErrorRecord(void);
337 #ifdef __cplusplus
339 #endif
341 #endif /* __WINE_MSIQUERY_H */