msi/tests: Test MsiRecordGetString on null and empty strings.
[wine/hacks.git] / include / msiquery.h
blob6a1bfa43787c0f32f13fc9472b768b0c110c72fe
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;
149 #ifdef __cplusplus
150 extern "C" {
151 #endif
153 /* view manipulation */
154 UINT WINAPI MsiViewFetch(MSIHANDLE,MSIHANDLE*);
155 UINT WINAPI MsiViewExecute(MSIHANDLE,MSIHANDLE);
156 UINT WINAPI MsiViewClose(MSIHANDLE);
157 UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE,LPCSTR,MSIHANDLE*);
158 UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
159 #define MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
160 MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,LPDWORD);
161 MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,LPDWORD);
162 #define MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
164 MSIDBSTATE WINAPI MsiGetDatabaseState(MSIHANDLE);
166 /* record manipulation */
167 MSIHANDLE WINAPI MsiCreateRecord(UINT);
168 UINT WINAPI MsiRecordClearData(MSIHANDLE);
169 UINT WINAPI MsiRecordSetInteger(MSIHANDLE,UINT,int);
170 UINT WINAPI MsiRecordSetStringA(MSIHANDLE,UINT,LPCSTR);
171 UINT WINAPI MsiRecordSetStringW(MSIHANDLE,UINT,LPCWSTR);
172 #define MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
173 UINT WINAPI MsiRecordGetStringA(MSIHANDLE,UINT,LPSTR,LPDWORD);
174 UINT WINAPI MsiRecordGetStringW(MSIHANDLE,UINT,LPWSTR,LPDWORD);
175 #define MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
176 UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE);
177 int WINAPI MsiRecordGetInteger(MSIHANDLE,UINT);
178 UINT WINAPI MsiRecordDataSize(MSIHANDLE,UINT);
179 BOOL WINAPI MsiRecordIsNull(MSIHANDLE,UINT);
180 UINT WINAPI MsiFormatRecordA(MSIHANDLE,MSIHANDLE,LPSTR,LPDWORD);
181 UINT WINAPI MsiFormatRecordW(MSIHANDLE,MSIHANDLE,LPWSTR,LPDWORD);
182 #define MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
183 UINT WINAPI MsiRecordSetStreamA(MSIHANDLE,UINT,LPCSTR);
184 UINT WINAPI MsiRecordSetStreamW(MSIHANDLE,UINT,LPCWSTR);
185 #define MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
186 UINT WINAPI MsiRecordReadStream(MSIHANDLE,UINT,char*,LPDWORD);
188 UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE,LPCSTR,MSIHANDLE*);
189 UINT WINAPI MsiDatabaseGetPrimaryKeysW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
190 #define MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
192 /* installing */
193 UINT WINAPI MsiDoActionA(MSIHANDLE,LPCSTR );
194 UINT WINAPI MsiDoActionW(MSIHANDLE,LPCWSTR );
195 #define MsiDoAction WINELIB_NAME_AW(MsiDoAction)
197 /* database transforms */
198 UINT WINAPI MsiDatabaseApplyTransformA(MSIHANDLE,LPCSTR,int);
199 UINT WINAPI MsiDatabaseApplyTransformW(MSIHANDLE,LPCWSTR,int);
200 #define MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
201 UINT WINAPI MsiDatabaseGenerateTransformA(MSIHANDLE,MSIHANDLE,LPCSTR,int,int);
202 UINT WINAPI MsiDatabaseGenerateTransformW(MSIHANDLE,MSIHANDLE,LPCWSTR,int,int);
203 #define MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
205 UINT WINAPI MsiDatabaseCommit(MSIHANDLE);
207 /* install state */
208 UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
209 UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
210 #define MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
211 UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE,LPCSTR,LPDWORD);
212 UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE,LPCWSTR,LPDWORD);
213 #define MsiGetFeatureValidStates WINELIB_NAME_AW(MsiGetFeatureValidStates)
214 UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
215 UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
216 #define MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
217 UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
218 UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
219 #define MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)
221 MSICONDITION WINAPI MsiEvaluateConditionA(MSIHANDLE,LPCSTR);
222 MSICONDITION WINAPI MsiEvaluateConditionW(MSIHANDLE,LPCWSTR);
223 #define MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)
225 /* property functions */
226 UINT WINAPI MsiGetPropertyA(MSIHANDLE, LPCSTR, LPSTR, LPDWORD);
227 UINT WINAPI MsiGetPropertyW(MSIHANDLE, LPCWSTR, LPWSTR, LPDWORD);
228 #define MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
230 UINT WINAPI MsiSetPropertyA(MSIHANDLE, LPCSTR, LPCSTR);
231 UINT WINAPI MsiSetPropertyW(MSIHANDLE, LPCWSTR, LPCWSTR);
232 #define MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)
234 UINT WINAPI MsiGetTargetPathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
235 UINT WINAPI MsiGetTargetPathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
236 #define MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)
238 UINT WINAPI MsiSetTargetPathA(MSIHANDLE, LPCSTR, LPCSTR);
239 UINT WINAPI MsiSetTargetPathW(MSIHANDLE, LPCWSTR, LPCWSTR);
240 #define MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)
242 UINT WINAPI MsiGetSourcePathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
243 UINT WINAPI MsiGetSourcePathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
244 #define MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)
246 MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE);
248 UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE, MSICOLINFO, MSIHANDLE*);
249 INT WINAPI MsiProcessMessage(MSIHANDLE, INSTALLMESSAGE, MSIHANDLE);
251 UINT WINAPI MsiSetFeatureStateA(MSIHANDLE, LPCSTR, INSTALLSTATE);
252 UINT WINAPI MsiSetFeatureStateW(MSIHANDLE, LPCWSTR, INSTALLSTATE);
253 #define MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
255 UINT WINAPI MsiPreviewDialogA(MSIHANDLE, LPCSTR);
256 UINT WINAPI MsiPreviewDialogW(MSIHANDLE, LPCWSTR);
257 #define MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)
259 UINT WINAPI MsiPreviewBillboardA(MSIHANDLE, LPCSTR, LPCSTR);
260 UINT WINAPI MsiPreviewBillboardW(MSIHANDLE, LPCWSTR, LPCWSTR);
261 #define MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)
263 UINT WINAPI MsiCreateTransformSummaryInfoA(MSIHANDLE, MSIHANDLE, LPCSTR, int, int);
264 UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE, MSIHANDLE, LPCWSTR, int, int);
265 #define MsiCreateTransformSummaryInfo WINELIB_NAME_AW(MsiCreateTransformSummaryInfo)
267 UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE, LPCSTR, UINT, MSIHANDLE *);
268 UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE, LPCWSTR, UINT, MSIHANDLE *);
269 #define MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
271 UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPSTR,LPDWORD);
272 UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPWSTR,LPDWORD);
273 #define MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
275 UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCSTR);
276 UINT WINAPI MsiSummaryInfoSetPropertyW(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCWSTR);
277 #define MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)
279 UINT WINAPI MsiDatabaseExportA(MSIHANDLE, LPCSTR, LPCSTR, LPCSTR);
280 UINT WINAPI MsiDatabaseExportW(MSIHANDLE, LPCWSTR, LPCWSTR, LPCWSTR);
281 #define MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)
283 UINT WINAPI MsiDatabaseImportA(MSIHANDLE, LPCSTR, LPCSTR);
284 UINT WINAPI MsiDatabaseImportW(MSIHANDLE, LPCWSTR, LPCWSTR);
285 #define MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)
287 UINT WINAPI MsiOpenDatabaseW(LPCWSTR, LPCWSTR, MSIHANDLE*);
288 UINT WINAPI MsiOpenDatabaseA(LPCSTR, LPCSTR, MSIHANDLE*);
289 #define MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
291 MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(MSIHANDLE, LPCSTR);
292 MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(MSIHANDLE, LPCWSTR);
293 #define MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)
295 UINT WINAPI MsiSequenceA(MSIHANDLE, LPCSTR, INT);
296 UINT WINAPI MsiSequenceW(MSIHANDLE, LPCWSTR, INT);
297 #define MsiSequence WINELIB_NAME_AW(MsiSequence)
299 UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE);
300 UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE,PUINT);
302 UINT WINAPI MsiEnableUIPreview(MSIHANDLE, MSIHANDLE*);
303 BOOL WINAPI MsiGetMode(MSIHANDLE, MSIRUNMODE);
304 BOOL WINAPI MsiSetMode(MSIHANDLE, MSIRUNMODE, BOOL);
306 UINT WINAPI MsiViewModify(MSIHANDLE, MSIMODIFY, MSIHANDLE);
308 UINT WINAPI MsiGetFeatureCostA(MSIHANDLE, LPCSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
309 UINT WINAPI MsiGetFeatureCostW(MSIHANDLE, LPCWSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
310 #define MsiGetFeatureCost WINELIB_NAME_AW(MsiGetFeatureCost)
312 LANGID WINAPI MsiGetLanguage(MSIHANDLE);
314 UINT WINAPI MsiSetInstallLevel(MSIHANDLE, int);
316 MSIHANDLE WINAPI MsiGetLastErrorRecord(void);
318 #ifdef __cplusplus
320 #endif
322 #endif /* __WINE_MSIQUERY_H */