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
24 typedef enum tagMSICONDITION
26 MSICONDITION_FALSE
= 0,
27 MSICONDITION_TRUE
= 1,
28 MSICONDITION_NONE
= 2,
29 MSICONDITION_ERROR
= 3,
32 #define MSI_NULL_INTEGER 0x80000000
34 typedef enum tagMSICOLINFO
40 typedef enum tagMSICOSTTREE
42 MSICOSTTREE_SELFONLY
= 0,
43 MSICOSTTREE_CHILDREN
= 1,
44 MSICOSTTREE_PARENTS
= 2,
45 MSICOSTTREE_PRODUCT
= 3,
48 typedef enum tagMSIMODIFY
50 MSIMODIFY_REFRESH
= 0,
54 MSIMODIFY_REPLACE
= 4,
57 MSIMODIFY_INSERT_TEMPORARY
= 7,
58 MSIMODIFY_VALIDATE
= 8,
59 MSIMODIFY_VALIDATE_NEW
= 9,
60 MSIMODIFY_VALIDATE_FIELD
= 10,
61 MSIMODIFY_VALIDATE_DELETE
= 11
64 #ifndef WINE_NO_UNICODE_MACROS
65 #define MSIDBOPEN_READONLY (LPCTSTR)0
66 #define MSIDBOPEN_TRANSACT (LPCTSTR)1
67 #define MSIDBOPEN_DIRECT (LPCTSTR)2
68 #define MSIDBOPEN_CREATE (LPCTSTR)3
69 #define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4
71 #define MSIDBOPEN_READONLY (LPCWSTR)0
72 #define MSIDBOPEN_TRANSACT (LPCWSTR)1
73 #define MSIDBOPEN_DIRECT (LPCWSTR)2
74 #define MSIDBOPEN_CREATE (LPCWSTR)3
75 #define MSIDBOPEN_CREATEDIRECT (LPCWSTR)4
78 #define MSIDBOPEN_PATCHFILE 32 / sizeof(*MSIDBOPEN_READONLY)
80 typedef enum tagMSIRUNMODE
83 MSIRUNMODE_ADVERTISE
= 1,
84 MSIRUNMODE_MAINTENANCE
= 2,
85 MSIRUNMODE_ROLLBACKENABLED
= 3,
86 MSIRUNMODE_LOGENABLED
= 4,
87 MSIRUNMODE_OPERATIONS
= 5,
88 MSIRUNMODE_REBOOTATEND
= 6,
89 MSIRUNMODE_REBOOTNOW
= 7,
90 MSIRUNMODE_CABINET
= 8,
91 MSIRUNMODE_SOURCESHORTNAMES
= 9,
92 MSIRUNMODE_TARGETSHORTNAMES
= 10,
93 MSIRUNMODE_RESERVED11
= 11,
94 MSIRUNMODE_WINDOWS9X
= 12,
95 MSIRUNMODE_ZAWENABLED
= 13,
96 MSIRUNMODE_RESERVED14
= 14,
97 MSIRUNMODE_RESERVED15
= 15,
98 MSIRUNMODE_SCHEDULED
= 16,
99 MSIRUNMODE_ROLLBACK
= 17,
100 MSIRUNMODE_COMMIT
= 18
103 typedef enum tagMSIDBERROR
105 MSIDBERROR_INVALIDARG
= -3,
106 MSIDBERROR_MOREDATA
= -2,
107 MSIDBERROR_FUNCTIONERROR
= -1,
108 MSIDBERROR_NOERROR
= 0,
109 MSIDBERROR_DUPLICATEKEY
= 1,
110 MSIDBERROR_REQUIRED
= 2,
111 MSIDBERROR_BADLINK
= 3,
112 MSIDBERROR_OVERFLOW
= 4,
113 MSIDBERROR_UNDERFLOW
= 5,
114 MSIDBERROR_NOTINSET
= 6,
115 MSIDBERROR_BADVERSION
= 7,
116 MSIDBERROR_BADCASE
= 8,
117 MSIDBERROR_BADGUID
= 9,
118 MSIDBERROR_BADWILDCARD
= 10,
119 MSIDBERROR_BADIDENTIFIER
= 11,
120 MSIDBERROR_BADLANGUAGE
= 12,
121 MSIDBERROR_BADFILENAME
= 13,
122 MSIDBERROR_BADPATH
= 14,
123 MSIDBERROR_BADCONDITION
= 15,
124 MSIDBERROR_BADFORMATTED
= 16,
125 MSIDBERROR_BADTEMPLATE
= 17,
126 MSIDBERROR_BADDEFAULTDIR
= 18,
127 MSIDBERROR_BADREGPATH
= 19,
128 MSIDBERROR_BADCUSTOMSOURCE
= 20,
129 MSIDBERROR_BADPROPERTY
= 21,
130 MSIDBERROR_MISSINGDATA
= 22,
131 MSIDBERROR_BADCATEGORY
= 23,
132 MSIDBERROR_BADKEYTABLE
= 24,
133 MSIDBERROR_BADMAXMINVALUES
= 25,
134 MSIDBERROR_BADCABINET
= 26,
135 MSIDBERROR_BADSHORTCUT
= 27,
136 MSIDBERROR_STRINGOVERFLOW
= 28,
137 MSIDBERROR_BADLOCALIZEATTRIB
= 29
140 typedef enum tagMSIDBSTATE
142 MSIDBSTATE_ERROR
= -1,
152 /* view manipulation */
153 UINT WINAPI
MsiViewFetch(MSIHANDLE
,MSIHANDLE
*);
154 UINT WINAPI
MsiViewExecute(MSIHANDLE
,MSIHANDLE
);
155 UINT WINAPI
MsiViewClose(MSIHANDLE
);
156 UINT WINAPI
MsiDatabaseOpenViewA(MSIHANDLE
,LPCSTR
,MSIHANDLE
*);
157 UINT WINAPI
MsiDatabaseOpenViewW(MSIHANDLE
,LPCWSTR
,MSIHANDLE
*);
158 #define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
159 MSIDBERROR WINAPI
MsiViewGetErrorA(MSIHANDLE
,LPSTR
,LPDWORD
);
160 MSIDBERROR WINAPI
MsiViewGetErrorW(MSIHANDLE
,LPWSTR
,LPDWORD
);
161 #define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
163 MSIDBSTATE WINAPI
MsiGetDatabaseState(MSIHANDLE
);
165 /* record manipulation */
166 MSIHANDLE WINAPI
MsiCreateRecord(UINT
);
167 UINT WINAPI
MsiRecordClearData(MSIHANDLE
);
168 UINT WINAPI
MsiRecordSetInteger(MSIHANDLE
,UINT
,int);
169 UINT WINAPI
MsiRecordSetStringA(MSIHANDLE
,UINT
,LPCSTR
);
170 UINT WINAPI
MsiRecordSetStringW(MSIHANDLE
,UINT
,LPCWSTR
);
171 #define MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
172 UINT WINAPI
MsiRecordGetStringA(MSIHANDLE
,UINT
,LPSTR
,LPDWORD
);
173 UINT WINAPI
MsiRecordGetStringW(MSIHANDLE
,UINT
,LPWSTR
,LPDWORD
);
174 #define MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
175 UINT WINAPI
MsiRecordGetFieldCount(MSIHANDLE
);
176 int WINAPI
MsiRecordGetInteger(MSIHANDLE
,UINT
);
177 UINT WINAPI
MsiRecordDataSize(MSIHANDLE
,UINT
);
178 BOOL WINAPI
MsiRecordIsNull(MSIHANDLE
,UINT
);
179 UINT WINAPI
MsiFormatRecordA(MSIHANDLE
,MSIHANDLE
,LPSTR
,LPDWORD
);
180 UINT WINAPI
MsiFormatRecordW(MSIHANDLE
,MSIHANDLE
,LPWSTR
,LPDWORD
);
181 #define MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
182 UINT WINAPI
MsiRecordSetStreamA(MSIHANDLE
,UINT
,LPCSTR
);
183 UINT WINAPI
MsiRecordSetStreamW(MSIHANDLE
,UINT
,LPCWSTR
);
184 #define MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
185 UINT WINAPI
MsiRecordReadStream(MSIHANDLE
,UINT
,char*,LPDWORD
);
187 UINT WINAPI
MsiDatabaseGetPrimaryKeysA(MSIHANDLE
,LPCSTR
,MSIHANDLE
*);
188 UINT WINAPI
MsiDatabaseGetPrimaryKeysW(MSIHANDLE
,LPCWSTR
,MSIHANDLE
*);
189 #define MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
192 UINT WINAPI
MsiDoActionA(MSIHANDLE
,LPCSTR
);
193 UINT WINAPI
MsiDoActionW(MSIHANDLE
,LPCWSTR
);
194 #define MsiDoAction WINELIB_NAME_AW(MsiDoAction)
196 /* database transforms */
197 UINT WINAPI
MsiDatabaseApplyTransformA(MSIHANDLE
,LPCSTR
,int);
198 UINT WINAPI
MsiDatabaseApplyTransformW(MSIHANDLE
,LPCWSTR
,int);
199 #define MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
200 UINT WINAPI
MsiDatabaseGenerateTransformA(MSIHANDLE
,MSIHANDLE
,LPCSTR
,int,int);
201 UINT WINAPI
MsiDatabaseGenerateTransformW(MSIHANDLE
,MSIHANDLE
,LPCWSTR
,int,int);
202 #define MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
204 UINT WINAPI
MsiDatabaseCommit(MSIHANDLE
);
207 UINT WINAPI
MsiGetFeatureStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
208 UINT WINAPI
MsiGetFeatureStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
209 #define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
210 UINT WINAPI
MsiGetFeatureValidStatesA(MSIHANDLE
,LPCSTR
,LPDWORD
);
211 UINT WINAPI
MsiGetFeatureValidStatesW(MSIHANDLE
,LPCWSTR
,LPDWORD
);
212 #define MsiGetFeatureValidStates WINELIB_NAME_AW(MsiGetFeatureValidStates)
213 UINT WINAPI
MsiSetComponentStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
);
214 UINT WINAPI
MsiSetComponentStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
);
215 #define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
216 UINT WINAPI
MsiGetComponentStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
217 UINT WINAPI
MsiGetComponentStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
218 #define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
220 MSICONDITION WINAPI
MsiEvaluateConditionA(MSIHANDLE
,LPCSTR
);
221 MSICONDITION WINAPI
MsiEvaluateConditionW(MSIHANDLE
,LPCWSTR
);
222 #define MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)
224 /* property functions */
225 UINT WINAPI
MsiGetPropertyA(MSIHANDLE
, LPCSTR
, LPSTR
, LPDWORD
);
226 UINT WINAPI
MsiGetPropertyW(MSIHANDLE
, LPCWSTR
, LPWSTR
, LPDWORD
);
227 #define MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
229 UINT WINAPI
MsiSetPropertyA(MSIHANDLE
, LPCSTR
, LPCSTR
);
230 UINT WINAPI
MsiSetPropertyW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
231 #define MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)
233 UINT WINAPI
MsiGetTargetPathA(MSIHANDLE
,LPCSTR
,LPSTR
,LPDWORD
);
234 UINT WINAPI
MsiGetTargetPathW(MSIHANDLE
,LPCWSTR
,LPWSTR
,LPDWORD
);
235 #define MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)
237 UINT WINAPI
MsiSetTargetPathA(MSIHANDLE
, LPCSTR
, LPCSTR
);
238 UINT WINAPI
MsiSetTargetPathW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
239 #define MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)
241 UINT WINAPI
MsiGetSourcePathA(MSIHANDLE
,LPCSTR
,LPSTR
,LPDWORD
);
242 UINT WINAPI
MsiGetSourcePathW(MSIHANDLE
,LPCWSTR
,LPWSTR
,LPDWORD
);
243 #define MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)
245 MSIHANDLE WINAPI
MsiGetActiveDatabase(MSIHANDLE
);
247 UINT WINAPI
MsiViewGetColumnInfo(MSIHANDLE
, MSICOLINFO
, MSIHANDLE
*);
248 INT WINAPI
MsiProcessMessage(MSIHANDLE
, INSTALLMESSAGE
, MSIHANDLE
);
250 UINT WINAPI
MsiSetFeatureStateA(MSIHANDLE
, LPCSTR
, INSTALLSTATE
);
251 UINT WINAPI
MsiSetFeatureStateW(MSIHANDLE
, LPCWSTR
, INSTALLSTATE
);
252 #define MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
254 UINT WINAPI
MsiPreviewDialogA(MSIHANDLE
, LPCSTR
);
255 UINT WINAPI
MsiPreviewDialogW(MSIHANDLE
, LPCWSTR
);
256 #define MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)
258 UINT WINAPI
MsiPreviewBillboardA(MSIHANDLE
, LPCSTR
, LPCSTR
);
259 UINT WINAPI
MsiPreviewBillboardW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
260 #define MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)
262 UINT WINAPI
MsiCreateTransformSummaryInfoA(MSIHANDLE
, MSIHANDLE
, LPCSTR
, int, int);
263 UINT WINAPI
MsiCreateTransformSummaryInfoW(MSIHANDLE
, MSIHANDLE
, LPCWSTR
, int, int);
264 #define MsiCreateTransformSummaryInfo WINELIB_NAME_AW(MsiCreateTransformSummaryInfo)
266 UINT WINAPI
MsiGetSummaryInformationA(MSIHANDLE
, LPCSTR
, UINT
, MSIHANDLE
*);
267 UINT WINAPI
MsiGetSummaryInformationW(MSIHANDLE
, LPCWSTR
, UINT
, MSIHANDLE
*);
268 #define MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
270 UINT WINAPI
MsiSummaryInfoGetPropertyA(MSIHANDLE
,UINT
,PUINT
,LPINT
,FILETIME
*,LPSTR
,LPDWORD
);
271 UINT WINAPI
MsiSummaryInfoGetPropertyW(MSIHANDLE
,UINT
,PUINT
,LPINT
,FILETIME
*,LPWSTR
,LPDWORD
);
272 #define MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
274 UINT WINAPI
MsiSummaryInfoSetPropertyA(MSIHANDLE
, UINT
, UINT
, INT
, FILETIME
*, LPCSTR
);
275 UINT WINAPI
MsiSummaryInfoSetPropertyW(MSIHANDLE
, UINT
, UINT
, INT
, FILETIME
*, LPCWSTR
);
276 #define MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)
278 UINT WINAPI
MsiDatabaseExportA(MSIHANDLE
, LPCSTR
, LPCSTR
, LPCSTR
);
279 UINT WINAPI
MsiDatabaseExportW(MSIHANDLE
, LPCWSTR
, LPCWSTR
, LPCWSTR
);
280 #define MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)
282 UINT WINAPI
MsiDatabaseImportA(MSIHANDLE
, LPCSTR
, LPCSTR
);
283 UINT WINAPI
MsiDatabaseImportW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
284 #define MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)
286 UINT WINAPI
MsiOpenDatabaseW(LPCWSTR
, LPCWSTR
, MSIHANDLE
*);
287 UINT WINAPI
MsiOpenDatabaseA(LPCSTR
, LPCSTR
, MSIHANDLE
*);
288 #define MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
290 MSICONDITION WINAPI
MsiDatabaseIsTablePersistentA(MSIHANDLE
, LPCSTR
);
291 MSICONDITION WINAPI
MsiDatabaseIsTablePersistentW(MSIHANDLE
, LPCWSTR
);
292 #define MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)
294 UINT WINAPI
MsiSequenceA(MSIHANDLE
, LPCSTR
, INT
);
295 UINT WINAPI
MsiSequenceW(MSIHANDLE
, LPCWSTR
, INT
);
296 #define MsiSequence WINELIB_NAME_AW(MsiSequence)
298 UINT WINAPI
MsiSummaryInfoPersist(MSIHANDLE
);
299 UINT WINAPI
MsiSummaryInfoGetPropertyCount(MSIHANDLE
,PUINT
);
301 UINT WINAPI
MsiEnableUIPreview(MSIHANDLE
, MSIHANDLE
*);
302 BOOL WINAPI
MsiGetMode(MSIHANDLE
, MSIRUNMODE
);
303 BOOL WINAPI
MsiSetMode(MSIHANDLE
, MSIRUNMODE
, BOOL
);
305 UINT WINAPI
MsiViewModify(MSIHANDLE
, MSIMODIFY
, MSIHANDLE
);
307 UINT WINAPI
MsiGetFeatureCostA(MSIHANDLE
, LPCSTR
, MSICOSTTREE
, INSTALLSTATE
, LPINT
);
308 UINT WINAPI
MsiGetFeatureCostW(MSIHANDLE
, LPCWSTR
, MSICOSTTREE
, INSTALLSTATE
, LPINT
);
309 #define MsiGetFeatureCost WINELIB_NAME_AW(MsiGetFeatureCost)
311 LANGID WINAPI
MsiGetLanguage(MSIHANDLE
);
313 UINT WINAPI
MsiSetInstallLevel(MSIHANDLE
, int);
315 MSIHANDLE WINAPI
MsiGetLastErrorRecord(void);
321 #endif /* __WINE_MSIQUERY_H */