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
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 typedef enum tagMSIRUNMODE
81 MSIRUNMODE_ADVERTISE
= 1,
82 MSIRUNMODE_MAINTENANCE
= 2,
83 MSIRUNMODE_ROLLBACKENABLED
= 3,
84 MSIRUNMODE_LOGENABLED
= 4,
85 MSIRUNMODE_OPERATIONS
= 5,
86 MSIRUNMODE_REBOOTATEND
= 6,
87 MSIRUNMODE_REBOOTNOW
= 7,
88 MSIRUNMODE_CABINET
= 8,
89 MSIRUNMODE_SOURCESHORTNAMES
= 9,
90 MSIRUNMODE_TARGETSHORTNAMES
= 10,
91 MSIRUNMODE_RESERVED11
= 11,
92 MSIRUNMODE_WINDOWS9X
= 12,
93 MSIRUNMODE_ZAWENABLED
= 13,
94 MSIRUNMODE_RESERVED14
= 14,
95 MSIRUNMODE_RESERVED15
= 15,
96 MSIRUNMODE_SCHEDULED
= 16,
97 MSIRUNMODE_ROLLBACK
= 17,
98 MSIRUNMODE_COMMIT
= 18
101 typedef enum tagMSIDBERROR
103 MSIDBERROR_INVALIDARG
= -3,
104 MSIDBERROR_MOREDATA
= -2,
105 MSIDBERROR_FUNCTIONERROR
= -1,
106 MSIDBERROR_NOERROR
= 0,
107 MSIDBERROR_DUPLICATEKEY
= 1,
108 MSIDBERROR_REQUIRED
= 2,
109 MSIDBERROR_BADLINK
= 3,
110 MSIDBERROR_OVERFLOW
= 4,
111 MSIDBERROR_UNDERFLOW
= 5,
112 MSIDBERROR_NOTINSET
= 6,
113 MSIDBERROR_BADVERSION
= 7,
114 MSIDBERROR_BADCASE
= 8,
115 MSIDBERROR_BADGUID
= 9,
116 MSIDBERROR_BADWILDCARD
= 10,
117 MSIDBERROR_BADIDENTIFIER
= 11,
118 MSIDBERROR_BADLANGUAGE
= 12,
119 MSIDBERROR_BADFILENAME
= 13,
120 MSIDBERROR_BADPATH
= 14,
121 MSIDBERROR_BADCONDITION
= 15,
122 MSIDBERROR_BADFORMATTED
= 16,
123 MSIDBERROR_BADTEMPLATE
= 17,
124 MSIDBERROR_BADDEFAULTDIR
= 18,
125 MSIDBERROR_BADREGPATH
= 19,
126 MSIDBERROR_BADCUSTOMSOURCE
= 20,
127 MSIDBERROR_BADPROPERTY
= 21,
128 MSIDBERROR_MISSINGDATA
= 22,
129 MSIDBERROR_BADCATEGORY
= 23,
130 MSIDBERROR_BADKEYTABLE
= 24,
131 MSIDBERROR_BADMAXMINVALUES
= 25,
132 MSIDBERROR_BADCABINET
= 26,
133 MSIDBERROR_BADSHORTCUT
= 27,
134 MSIDBERROR_STRINGOVERFLOW
= 28,
135 MSIDBERROR_BADLOCALIZEATTRIB
= 29
138 typedef enum tagMSIDBSTATE
140 MSIDBSTATE_ERROR
= -1,
145 /* view manipulation */
146 UINT WINAPI
MsiViewFetch(MSIHANDLE
,MSIHANDLE
*);
147 UINT WINAPI
MsiViewExecute(MSIHANDLE
,MSIHANDLE
);
148 UINT WINAPI
MsiViewClose(MSIHANDLE
);
149 UINT WINAPI
MsiDatabaseOpenViewA(MSIHANDLE
,LPCSTR
,MSIHANDLE
*);
150 UINT WINAPI
MsiDatabaseOpenViewW(MSIHANDLE
,LPCWSTR
,MSIHANDLE
*);
151 #define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
152 MSIDBERROR WINAPI
MsiViewGetErrorA(MSIHANDLE
,LPSTR
,DWORD
*);
153 MSIDBERROR WINAPI
MsiViewGetErrorW(MSIHANDLE
,LPWSTR
,DWORD
*);
154 #define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
156 MSIDBSTATE WINAPI
MsiGetDatabaseState(MSIHANDLE
);
158 /* record manipulation */
159 MSIHANDLE WINAPI
MsiCreateRecord(unsigned int);
160 UINT WINAPI
MsiRecordClearData(MSIHANDLE
);
161 UINT WINAPI
MsiRecordSetInteger(MSIHANDLE
,unsigned int,int);
162 UINT WINAPI
MsiRecordSetStringA(MSIHANDLE
,unsigned int,LPCSTR
);
163 UINT WINAPI
MsiRecordSetStringW(MSIHANDLE
,unsigned int,LPCWSTR
);
164 #define MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
165 UINT WINAPI
MsiRecordGetStringA(MSIHANDLE
,unsigned int,LPSTR
,DWORD
*);
166 UINT WINAPI
MsiRecordGetStringW(MSIHANDLE
,unsigned int,LPWSTR
,DWORD
*);
167 #define MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
168 UINT WINAPI
MsiRecordGetFieldCount(MSIHANDLE
);
169 int WINAPI
MsiRecordGetInteger(MSIHANDLE
,unsigned int);
170 UINT WINAPI
MsiRecordDataSize(MSIHANDLE
,unsigned int);
171 BOOL WINAPI
MsiRecordIsNull(MSIHANDLE
,unsigned int);
172 UINT WINAPI
MsiFormatRecordA(MSIHANDLE
,MSIHANDLE
,LPSTR
,DWORD
*);
173 UINT WINAPI
MsiFormatRecordW(MSIHANDLE
,MSIHANDLE
,LPWSTR
,DWORD
*);
174 #define MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
175 UINT WINAPI
MsiRecordSetStreamA(MSIHANDLE
,unsigned int,LPCSTR
);
176 UINT WINAPI
MsiRecordSetStreamW(MSIHANDLE
,unsigned int,LPCWSTR
);
177 #define MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
178 UINT WINAPI
MsiRecordReadStream(MSIHANDLE
,unsigned int,char*,DWORD
*);
180 UINT WINAPI
MsiDatabaseGetPrimaryKeysA(MSIHANDLE
,LPCSTR
,MSIHANDLE
*);
181 UINT WINAPI
MsiDatabaseGetPrimaryKeysW(MSIHANDLE
,LPCWSTR
,MSIHANDLE
*);
182 #define MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
185 UINT WINAPI
MsiDoActionA(MSIHANDLE
,LPCSTR
);
186 UINT WINAPI
MsiDoActionW(MSIHANDLE
,LPCWSTR
);
187 #define MsiDoAction WINELIB_NAME_AW(MsiDoAction)
189 /* database transforms */
190 UINT WINAPI
MsiDatabaseApplyTransformA(MSIHANDLE
,LPCSTR
,int);
191 UINT WINAPI
MsiDatabaseApplyTransformW(MSIHANDLE
,LPCWSTR
,int);
192 #define MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
193 UINT WINAPI
MsiDatabaseGenerateTransformA(MSIHANDLE
,MSIHANDLE
,LPCSTR
,int,int);
194 UINT WINAPI
MsiDatabaseGenerateTransformW(MSIHANDLE
,MSIHANDLE
,LPCWSTR
,int,int);
195 #define MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
197 UINT WINAPI
MsiDatabaseCommit(MSIHANDLE
);
200 UINT WINAPI
MsiGetFeatureStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
201 UINT WINAPI
MsiGetFeatureStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
202 #define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
203 UINT WINAPI
MsiSetComponentStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
);
204 UINT WINAPI
MsiSetComponentStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
);
205 #define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
206 UINT WINAPI
MsiGetComponentStateA(MSIHANDLE
,LPCSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
207 UINT WINAPI
MsiGetComponentStateW(MSIHANDLE
,LPCWSTR
,INSTALLSTATE
*,INSTALLSTATE
*);
208 #define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
210 MSICONDITION WINAPI
MsiEvaluateConditionA(MSIHANDLE
,LPCSTR
);
211 MSICONDITION WINAPI
MsiEvaluateConditionW(MSIHANDLE
,LPCWSTR
);
212 #define MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)
214 /* property functions */
215 UINT WINAPI
MsiGetPropertyA(MSIHANDLE
, LPCSTR
, LPSTR
, DWORD
*);
216 UINT WINAPI
MsiGetPropertyW(MSIHANDLE
, LPCWSTR
, LPWSTR
, DWORD
*);
217 #define MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
219 UINT WINAPI
MsiSetPropertyA(MSIHANDLE
, LPCSTR
, LPCSTR
);
220 UINT WINAPI
MsiSetPropertyW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
221 #define MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)
223 UINT WINAPI
MsiGetTargetPathA(MSIHANDLE
,LPCSTR
,LPSTR
,DWORD
*);
224 UINT WINAPI
MsiGetTargetPathW(MSIHANDLE
,LPCWSTR
,LPWSTR
,DWORD
*);
225 #define MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)
227 UINT WINAPI
MsiSetTargetPathA(MSIHANDLE
, LPCSTR
, LPCSTR
);
228 UINT WINAPI
MsiSetTargetPathW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
229 #define MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)
231 UINT WINAPI
MsiGetSourcePathA(MSIHANDLE
,LPCSTR
,LPSTR
,DWORD
*);
232 UINT WINAPI
MsiGetSourcePathW(MSIHANDLE
,LPCWSTR
,LPWSTR
,DWORD
*);
233 #define MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)
235 MSIHANDLE WINAPI
MsiGetActiveDatabase(MSIHANDLE
);
237 UINT WINAPI
MsiViewGetColumnInfo(MSIHANDLE
, MSICOLINFO
, MSIHANDLE
*);
238 INT WINAPI
MsiProcessMessage(MSIHANDLE
, INSTALLMESSAGE
, MSIHANDLE
);
240 UINT WINAPI
MsiSetFeatureStateA(MSIHANDLE
, LPCSTR
, INSTALLSTATE
);
241 UINT WINAPI
MsiSetFeatureStateW(MSIHANDLE
, LPCWSTR
, INSTALLSTATE
);
242 #define MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
244 UINT WINAPI
MsiPreviewDialogA(MSIHANDLE
, LPCSTR
);
245 UINT WINAPI
MsiPreviewDialogW(MSIHANDLE
, LPCWSTR
);
246 #define MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)
248 UINT WINAPI
MsiPreviewBillboardA(MSIHANDLE
, LPCSTR
, LPCSTR
);
249 UINT WINAPI
MsiPreviewBillboardW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
250 #define MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)
252 UINT WINAPI
MsiGetSummaryInformationA(MSIHANDLE
, LPCSTR
, UINT
, MSIHANDLE
*);
253 UINT WINAPI
MsiGetSummaryInformationW(MSIHANDLE
, LPCWSTR
, UINT
, MSIHANDLE
*);
254 #define MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
256 UINT WINAPI
MsiSummaryInfoGetPropertyA(MSIHANDLE
,UINT
,UINT
*,INT
*,FILETIME
*,LPSTR
,DWORD
*);
257 UINT WINAPI
MsiSummaryInfoGetPropertyW(MSIHANDLE
,UINT
,UINT
*,INT
*,FILETIME
*,LPWSTR
,DWORD
*);
258 #define MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
260 UINT WINAPI
MsiSummaryInfoSetPropertyA(MSIHANDLE
, UINT
, UINT
, INT
, FILETIME
*, LPCSTR
);
261 UINT WINAPI
MsiSummaryInfoSetPropertyW(MSIHANDLE
, UINT
, UINT
, INT
, FILETIME
*, LPCWSTR
);
262 #define MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)
264 UINT WINAPI
MsiDatabaseExportA(MSIHANDLE
, LPCSTR
, LPCSTR
, LPCSTR
);
265 UINT WINAPI
MsiDatabaseExportW(MSIHANDLE
, LPCWSTR
, LPCWSTR
, LPCWSTR
);
266 #define MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)
268 UINT WINAPI
MsiDatabaseImportA(MSIHANDLE
, LPCSTR
, LPCSTR
);
269 UINT WINAPI
MsiDatabaseImportW(MSIHANDLE
, LPCWSTR
, LPCWSTR
);
270 #define MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)
272 UINT WINAPI
MsiOpenDatabaseW(LPCWSTR
, LPCWSTR
, MSIHANDLE
*);
273 UINT WINAPI
MsiOpenDatabaseA(LPCSTR
, LPCSTR
, MSIHANDLE
*);
274 #define MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
276 MSICONDITION WINAPI
MsiDatabaseIsTablePersistentA(MSIHANDLE
, LPCSTR
);
277 MSICONDITION WINAPI
MsiDatabaseIsTablePersistentW(MSIHANDLE
, LPCWSTR
);
278 #define MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)
280 UINT WINAPI
MsiSequenceA(MSIHANDLE
, LPCSTR
, INT
);
281 UINT WINAPI
MsiSequenceW(MSIHANDLE
, LPCWSTR
, INT
);
282 #define MsiSequence WINELIB_NAME_AW(MsiSequence)
284 UINT WINAPI
MsiSummaryInfoPersist(MSIHANDLE
);
285 UINT WINAPI
MsiSummaryInfoGetPropertyCount(MSIHANDLE
,UINT
*);
287 UINT WINAPI
MsiEnableUIPreview(MSIHANDLE
, MSIHANDLE
*);
288 BOOL WINAPI
MsiGetMode(MSIHANDLE
, MSIRUNMODE
);
289 BOOL WINAPI
MsiSetMode(MSIHANDLE
, MSIRUNMODE
, BOOL
);
291 UINT WINAPI
MsiViewModify(MSIHANDLE
, MSIMODIFY
, MSIHANDLE
);
293 UINT WINAPI
MsiGetFeatureCostA(MSIHANDLE
, LPCSTR
, MSICOSTTREE
, INSTALLSTATE
, INT
*);
294 UINT WINAPI
MsiGetFeatureCostW(MSIHANDLE
, LPCWSTR
, MSICOSTTREE
, INSTALLSTATE
, INT
*);
295 #define MsiGetFeatureCost WINELIB_NAME_AW(MsiGetFeatureCost)
297 LANGID WINAPI
MsiGetLanguage(MSIHANDLE
);
299 UINT WINAPI
MsiSetInstallLevel(MSIHANDLE
, int);
301 MSIHANDLE WINAPI
MsiGetLastErrorRecord();
303 #endif /* __WINE_MSIQUERY_H */