msiquery.h 13.1 KB
Newer Older
1
/*
2
 * Copyright (C) 2002,2003 Mike McCormack
3 4 5 6 7 8 9 10 11 12 13 14 15
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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
17 18 19 20 21
 */

#ifndef __WINE_MSIQUERY_H
#define __WINE_MSIQUERY_H

22
#include <msi.h>
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39

typedef enum tagMSICONDITION
{
    MSICONDITION_FALSE = 0,
    MSICONDITION_TRUE  = 1,
    MSICONDITION_NONE  = 2,
    MSICONDITION_ERROR = 3,
} MSICONDITION;

#define MSI_NULL_INTEGER 0x80000000

typedef enum tagMSICOLINFO
{
    MSICOLINFO_NAMES = 0,
    MSICOLINFO_TYPES = 1
} MSICOLINFO;

40 41 42 43 44 45 46 47
typedef enum tagMSICOSTTREE
{
    MSICOSTTREE_SELFONLY = 0,
    MSICOSTTREE_CHILDREN = 1,
    MSICOSTTREE_PARENTS  = 2,
    MSICOSTTREE_PRODUCT  = 3,
} MSICOSTTREE;

48 49
typedef enum tagMSIMODIFY
{
50
    MSIMODIFY_SEEK = -1,
51 52 53 54 55 56 57 58 59 60 61 62 63 64
    MSIMODIFY_REFRESH = 0,
    MSIMODIFY_INSERT = 1,
    MSIMODIFY_UPDATE = 2,
    MSIMODIFY_ASSIGN = 3,
    MSIMODIFY_REPLACE = 4,
    MSIMODIFY_MERGE = 5,
    MSIMODIFY_DELETE = 6,
    MSIMODIFY_INSERT_TEMPORARY = 7,
    MSIMODIFY_VALIDATE = 8,
    MSIMODIFY_VALIDATE_NEW = 9,
    MSIMODIFY_VALIDATE_FIELD = 10,
    MSIMODIFY_VALIDATE_DELETE = 11
} MSIMODIFY;

65
#ifndef WINE_NO_UNICODE_MACROS
66 67 68 69
#define MSIDBOPEN_READONLY (LPCTSTR)0
#define MSIDBOPEN_TRANSACT (LPCTSTR)1
#define MSIDBOPEN_DIRECT   (LPCTSTR)2
#define MSIDBOPEN_CREATE   (LPCTSTR)3
70
#define MSIDBOPEN_CREATEDIRECT (LPCTSTR)4
71 72 73 74 75 76 77
#else
#define MSIDBOPEN_READONLY (LPCWSTR)0
#define MSIDBOPEN_TRANSACT (LPCWSTR)1
#define MSIDBOPEN_DIRECT   (LPCWSTR)2
#define MSIDBOPEN_CREATE   (LPCWSTR)3
#define MSIDBOPEN_CREATEDIRECT (LPCWSTR)4
#endif
78

79 80
#define MSIDBOPEN_PATCHFILE 32 / sizeof(*MSIDBOPEN_READONLY)

81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
typedef enum tagMSIRUNMODE
{
    MSIRUNMODE_ADMIN = 0,
    MSIRUNMODE_ADVERTISE = 1,
    MSIRUNMODE_MAINTENANCE = 2,
    MSIRUNMODE_ROLLBACKENABLED = 3,
    MSIRUNMODE_LOGENABLED = 4,
    MSIRUNMODE_OPERATIONS = 5,
    MSIRUNMODE_REBOOTATEND = 6,
    MSIRUNMODE_REBOOTNOW = 7,
    MSIRUNMODE_CABINET = 8,
    MSIRUNMODE_SOURCESHORTNAMES = 9,
    MSIRUNMODE_TARGETSHORTNAMES = 10,
    MSIRUNMODE_RESERVED11 = 11,
    MSIRUNMODE_WINDOWS9X = 12,
    MSIRUNMODE_ZAWENABLED = 13,
    MSIRUNMODE_RESERVED14 = 14,
    MSIRUNMODE_RESERVED15 = 15,
    MSIRUNMODE_SCHEDULED = 16,
    MSIRUNMODE_ROLLBACK = 17,
    MSIRUNMODE_COMMIT = 18
} MSIRUNMODE;
103

104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
typedef enum tagMSIDBERROR
{
    MSIDBERROR_INVALIDARG = -3,
    MSIDBERROR_MOREDATA = -2,
    MSIDBERROR_FUNCTIONERROR = -1,
    MSIDBERROR_NOERROR = 0,
    MSIDBERROR_DUPLICATEKEY = 1,
    MSIDBERROR_REQUIRED = 2,
    MSIDBERROR_BADLINK = 3,
    MSIDBERROR_OVERFLOW = 4,
    MSIDBERROR_UNDERFLOW = 5,
    MSIDBERROR_NOTINSET = 6,
    MSIDBERROR_BADVERSION = 7,
    MSIDBERROR_BADCASE = 8,
    MSIDBERROR_BADGUID = 9,
    MSIDBERROR_BADWILDCARD = 10,
    MSIDBERROR_BADIDENTIFIER = 11,
    MSIDBERROR_BADLANGUAGE = 12,
    MSIDBERROR_BADFILENAME = 13,
    MSIDBERROR_BADPATH = 14,
    MSIDBERROR_BADCONDITION = 15,
    MSIDBERROR_BADFORMATTED = 16,
    MSIDBERROR_BADTEMPLATE = 17,
    MSIDBERROR_BADDEFAULTDIR = 18,
    MSIDBERROR_BADREGPATH = 19,
    MSIDBERROR_BADCUSTOMSOURCE = 20,
    MSIDBERROR_BADPROPERTY = 21,
    MSIDBERROR_MISSINGDATA = 22,
    MSIDBERROR_BADCATEGORY = 23,
    MSIDBERROR_BADKEYTABLE = 24,
    MSIDBERROR_BADMAXMINVALUES = 25,
    MSIDBERROR_BADCABINET = 26,
    MSIDBERROR_BADSHORTCUT= 27,
    MSIDBERROR_STRINGOVERFLOW = 28,
    MSIDBERROR_BADLOCALIZEATTRIB = 29
} MSIDBERROR; 

141 142 143 144 145 146 147
typedef enum tagMSIDBSTATE
{
    MSIDBSTATE_ERROR = -1,
    MSIDBSTATE_READ = 0,
    MSIDBSTATE_WRITE = 1
} MSIDBSTATE;

148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
typedef enum tagMSITRANSFORM_VALIDATE
{
    MSITRANSFORM_VALIDATE_LANGUAGE                   = 0x00000001,
    MSITRANSFORM_VALIDATE_PRODUCT                    = 0x00000002,
    MSITRANSFORM_VALIDATE_PLATFORM                   = 0x00000004,
    MSITRANSFORM_VALIDATE_MAJORVERSION               = 0x00000008,
    MSITRANSFORM_VALIDATE_MINORVERSION               = 0x00000010,
    MSITRANSFORM_VALIDATE_UPDATEVERSION              = 0x00000020,
    MSITRANSFORM_VALIDATE_NEWLESSBASEVERSION         = 0x00000040,
    MSITRANSFORM_VALIDATE_NEWLESSEQUALBASEVERSION    = 0x00000080,
    MSITRANSFORM_VALIDATE_NEWEQUALBASEVERSION        = 0x00000100,
    MSITRANSFORM_VALIDATE_NEWGREATEREQUALBASEVERSION = 0x00000200,
    MSITRANSFORM_VALIDATE_NEWGREATERBASEVERSION      = 0x00000400,
    MSITRANSFORM_VALIDATE_UPGRADECODE                = 0x00000800
} MSITRANSFORM_VALIDATE;
163 164 165 166 167

#ifdef __cplusplus
extern "C" {
#endif

168 169 170 171 172 173
/* view manipulation */
UINT WINAPI MsiViewFetch(MSIHANDLE,MSIHANDLE*);
UINT WINAPI MsiViewExecute(MSIHANDLE,MSIHANDLE);
UINT WINAPI MsiViewClose(MSIHANDLE);
UINT WINAPI MsiDatabaseOpenViewA(MSIHANDLE,LPCSTR,MSIHANDLE*);
UINT WINAPI MsiDatabaseOpenViewW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
174
#define     MsiDatabaseOpenView WINELIB_NAME_AW(MsiDatabaseOpenView)
175 176
MSIDBERROR WINAPI MsiViewGetErrorA(MSIHANDLE,LPSTR,LPDWORD);
MSIDBERROR WINAPI MsiViewGetErrorW(MSIHANDLE,LPWSTR,LPDWORD);
177
#define     MsiViewGetError WINELIB_NAME_AW(MsiViewGetError)
178

179 180
MSIDBSTATE WINAPI MsiGetDatabaseState(MSIHANDLE);

181
/* record manipulation */
182
MSIHANDLE WINAPI MsiCreateRecord(UINT);
183
UINT WINAPI MsiRecordClearData(MSIHANDLE);
184 185 186
UINT WINAPI MsiRecordSetInteger(MSIHANDLE,UINT,int);
UINT WINAPI MsiRecordSetStringA(MSIHANDLE,UINT,LPCSTR);
UINT WINAPI MsiRecordSetStringW(MSIHANDLE,UINT,LPCWSTR);
187
#define     MsiRecordSetString WINELIB_NAME_AW(MsiRecordSetString)
188 189
UINT WINAPI MsiRecordGetStringA(MSIHANDLE,UINT,LPSTR,LPDWORD);
UINT WINAPI MsiRecordGetStringW(MSIHANDLE,UINT,LPWSTR,LPDWORD);
190
#define     MsiRecordGetString WINELIB_NAME_AW(MsiRecordGetString)
191
UINT WINAPI MsiRecordGetFieldCount(MSIHANDLE);
192 193 194 195 196
int WINAPI MsiRecordGetInteger(MSIHANDLE,UINT);
UINT WINAPI MsiRecordDataSize(MSIHANDLE,UINT);
BOOL WINAPI MsiRecordIsNull(MSIHANDLE,UINT);
UINT WINAPI MsiFormatRecordA(MSIHANDLE,MSIHANDLE,LPSTR,LPDWORD);
UINT WINAPI MsiFormatRecordW(MSIHANDLE,MSIHANDLE,LPWSTR,LPDWORD);
197
#define     MsiFormatRecord WINELIB_NAME_AW(MsiFormatRecord)
198 199
UINT WINAPI MsiRecordSetStreamA(MSIHANDLE,UINT,LPCSTR);
UINT WINAPI MsiRecordSetStreamW(MSIHANDLE,UINT,LPCWSTR);
200
#define     MsiRecordSetStream WINELIB_NAME_AW(MsiRecordSetStream)
201
UINT WINAPI MsiRecordReadStream(MSIHANDLE,UINT,char*,LPDWORD);
202 203 204

UINT WINAPI MsiDatabaseGetPrimaryKeysA(MSIHANDLE,LPCSTR,MSIHANDLE*);
UINT WINAPI MsiDatabaseGetPrimaryKeysW(MSIHANDLE,LPCWSTR,MSIHANDLE*);
205
#define     MsiDatabaseGetPrimaryKeys WINELIB_NAME_AW(MsiDatabaseGetPrimaryKeys)
206 207 208 209

/* installing */
UINT WINAPI MsiDoActionA(MSIHANDLE,LPCSTR );
UINT WINAPI MsiDoActionW(MSIHANDLE,LPCWSTR );
210
#define     MsiDoAction WINELIB_NAME_AW(MsiDoAction)
211 212 213 214

/* database transforms */
UINT WINAPI MsiDatabaseApplyTransformA(MSIHANDLE,LPCSTR,int);
UINT WINAPI MsiDatabaseApplyTransformW(MSIHANDLE,LPCWSTR,int);
215
#define     MsiDatabaseApplyTransform WINELIB_NAME_AW(MsiDatabaseApplyTransform)
216 217
UINT WINAPI MsiDatabaseGenerateTransformA(MSIHANDLE,MSIHANDLE,LPCSTR,int,int);
UINT WINAPI MsiDatabaseGenerateTransformW(MSIHANDLE,MSIHANDLE,LPCWSTR,int,int);
218
#define     MsiDatabaseGenerateTransform WINELIB_NAME_AW(MsiDatabaseGenerateTransform)
219 220 221

UINT WINAPI MsiDatabaseCommit(MSIHANDLE);

222
/* install state */
223 224
UINT WINAPI MsiGetFeatureStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
UINT WINAPI MsiGetFeatureStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
225
#define     MsiGetFeatureState WINELIB_NAME_AW(MsiGetFeatureState)
226 227 228
UINT WINAPI MsiGetFeatureValidStatesA(MSIHANDLE,LPCSTR,LPDWORD);
UINT WINAPI MsiGetFeatureValidStatesW(MSIHANDLE,LPCWSTR,LPDWORD);
#define     MsiGetFeatureValidStates WINELIB_NAME_AW(MsiGetFeatureValidStates)
229 230 231
UINT WINAPI MsiSetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE);
UINT WINAPI MsiSetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE);
#define     MsiSetComponentState WINELIB_NAME_AW(MsiSetComponentState)
232 233
UINT WINAPI MsiGetComponentStateA(MSIHANDLE,LPCSTR,INSTALLSTATE*,INSTALLSTATE*);
UINT WINAPI MsiGetComponentStateW(MSIHANDLE,LPCWSTR,INSTALLSTATE*,INSTALLSTATE*);
234 235
#define     MsiGetComponentState WINELIB_NAME_AW(MsiGetComponentState)

236 237 238 239
MSICONDITION WINAPI MsiEvaluateConditionA(MSIHANDLE,LPCSTR);
MSICONDITION WINAPI MsiEvaluateConditionW(MSIHANDLE,LPCWSTR);
#define     MsiEvaluateCondition WINELIB_NAME_AW(MsiEvaluateCondition)

240
/* property functions */
241 242
UINT WINAPI MsiGetPropertyA(MSIHANDLE, LPCSTR, LPSTR, LPDWORD);
UINT WINAPI MsiGetPropertyW(MSIHANDLE, LPCWSTR, LPWSTR, LPDWORD);
243 244
#define     MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)

Mike McCormack's avatar
Mike McCormack committed
245 246
UINT WINAPI MsiSetPropertyA(MSIHANDLE, LPCSTR, LPCSTR);
UINT WINAPI MsiSetPropertyW(MSIHANDLE, LPCWSTR, LPCWSTR);
247 248
#define     MsiSetProperty WINELIB_NAME_AW(MsiSetProperty)

249 250
UINT WINAPI MsiGetTargetPathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
UINT WINAPI MsiGetTargetPathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
251 252 253 254 255 256
#define     MsiGetTargetPath WINELIB_NAME_AW(MsiGetTargetPath)

UINT WINAPI MsiSetTargetPathA(MSIHANDLE, LPCSTR, LPCSTR);
UINT WINAPI MsiSetTargetPathW(MSIHANDLE, LPCWSTR, LPCWSTR);
#define     MsiSetTargetPath WINELIB_NAME_AW(MsiSetTargetPath)

257 258
UINT WINAPI MsiGetSourcePathA(MSIHANDLE,LPCSTR,LPSTR,LPDWORD);
UINT WINAPI MsiGetSourcePathW(MSIHANDLE,LPCWSTR,LPWSTR,LPDWORD);
259 260 261 262
#define     MsiGetSourcePath WINELIB_NAME_AW(MsiGetSourcePath)

MSIHANDLE WINAPI MsiGetActiveDatabase(MSIHANDLE);

Mike McCormack's avatar
Mike McCormack committed
263 264
UINT WINAPI MsiViewGetColumnInfo(MSIHANDLE, MSICOLINFO, MSIHANDLE*);
INT WINAPI MsiProcessMessage(MSIHANDLE, INSTALLMESSAGE, MSIHANDLE);
265

266 267 268 269
UINT WINAPI MsiSetFeatureAttributesA(MSIHANDLE, LPCSTR, DWORD);
UINT WINAPI MsiSetFeatureAttributesW(MSIHANDLE, LPCWSTR, DWORD);
#define     MsiSetFeatureAttributes WINELIB_NAME_AW(MsiSetFeatureAttributes)

Mike McCormack's avatar
Mike McCormack committed
270 271
UINT WINAPI MsiSetFeatureStateA(MSIHANDLE, LPCSTR, INSTALLSTATE);
UINT WINAPI MsiSetFeatureStateW(MSIHANDLE, LPCWSTR, INSTALLSTATE);
272
#define     MsiSetFeatureState WINELIB_NAME_AW(MsiSetFeatureState)
273

274 275 276 277 278 279 280 281
UINT WINAPI MsiPreviewDialogA(MSIHANDLE, LPCSTR);
UINT WINAPI MsiPreviewDialogW(MSIHANDLE, LPCWSTR);
#define     MsiPreviewDialog WINELIB_NAME_AW(MsiPreviewDialog)

UINT WINAPI MsiPreviewBillboardA(MSIHANDLE, LPCSTR, LPCSTR);
UINT WINAPI MsiPreviewBillboardW(MSIHANDLE, LPCWSTR, LPCWSTR);
#define     MsiPreviewBillboard WINELIB_NAME_AW(MsiPreviewBillboard)

282 283 284 285
UINT WINAPI MsiCreateTransformSummaryInfoA(MSIHANDLE, MSIHANDLE, LPCSTR, int, int);
UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE, MSIHANDLE, LPCWSTR, int, int);
#define     MsiCreateTransformSummaryInfo WINELIB_NAME_AW(MsiCreateTransformSummaryInfo)

286 287 288 289
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE, LPCSTR, UINT, MSIHANDLE *);
UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE, LPCWSTR, UINT, MSIHANDLE *);
#define     MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)

290 291
UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPSTR,LPDWORD);
UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE,UINT,PUINT,LPINT,FILETIME*,LPWSTR,LPDWORD);
292 293
#define     MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)

294 295
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCSTR);
UINT WINAPI MsiSummaryInfoSetPropertyW(MSIHANDLE, UINT, UINT, INT, FILETIME*, LPCWSTR);
296 297
#define     MsiSummaryInfoSetProperty WINELIB_NAME_AW(MsiSummaryInfoSetProperty)

298 299 300 301 302 303 304 305 306 307 308 309
UINT WINAPI MsiDatabaseExportA(MSIHANDLE, LPCSTR, LPCSTR, LPCSTR);
UINT WINAPI MsiDatabaseExportW(MSIHANDLE, LPCWSTR, LPCWSTR, LPCWSTR);
#define     MsiDatabaseExport WINELIB_NAME_AW(MsiDatabaseExport)

UINT WINAPI MsiDatabaseImportA(MSIHANDLE, LPCSTR, LPCSTR);
UINT WINAPI MsiDatabaseImportW(MSIHANDLE, LPCWSTR, LPCWSTR);
#define     MsiDatabaseImport WINELIB_NAME_AW(MsiDatabaseImport)

UINT WINAPI MsiOpenDatabaseW(LPCWSTR, LPCWSTR, MSIHANDLE*);
UINT WINAPI MsiOpenDatabaseA(LPCSTR, LPCSTR, MSIHANDLE*);
#define     MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)

310 311
MSICONDITION WINAPI MsiDatabaseIsTablePersistentA(MSIHANDLE, LPCSTR);
MSICONDITION WINAPI MsiDatabaseIsTablePersistentW(MSIHANDLE, LPCWSTR);
312 313
#define     MsiDatabaseIsTablePersistent WINELIB_NAME_AW(MsiDatabaseIsTablePersistent)

314 315 316 317
UINT WINAPI MsiSequenceA(MSIHANDLE, LPCSTR, INT);
UINT WINAPI MsiSequenceW(MSIHANDLE, LPCWSTR, INT);
#define     MsiSequence WINELIB_NAME_AW(MsiSequence)

318
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE);
319
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE,PUINT);
320

321
UINT WINAPI MsiEnableUIPreview(MSIHANDLE, MSIHANDLE*);
322
BOOL WINAPI MsiGetMode(MSIHANDLE, MSIRUNMODE);
323
UINT WINAPI MsiSetMode(MSIHANDLE, MSIRUNMODE, BOOL);
324

325 326
UINT WINAPI MsiViewModify(MSIHANDLE, MSIMODIFY, MSIHANDLE);

327 328
UINT WINAPI MsiGetFeatureCostA(MSIHANDLE, LPCSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
UINT WINAPI MsiGetFeatureCostW(MSIHANDLE, LPCWSTR, MSICOSTTREE, INSTALLSTATE, LPINT);
329 330 331 332 333 334
#define     MsiGetFeatureCost WINELIB_NAME_AW(MsiGetFeatureCost)

LANGID WINAPI MsiGetLanguage(MSIHANDLE);

UINT WINAPI MsiSetInstallLevel(MSIHANDLE, int);

335
MSIHANDLE WINAPI MsiGetLastErrorRecord(void);
336

337 338 339 340
#ifdef __cplusplus
}
#endif

341
#endif /* __WINE_MSIQUERY_H */