Better function parameter checking.
[wine] / include / msi.h
1 /*
2  * Copyright (C) 2002,2003 Mike McCormack
3  *
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.
8  *
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.
13  *
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17  */
18
19 #ifndef __WINE_MSI_H
20 #define __WINE_MSI_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 typedef unsigned long MSIHANDLE;
27
28 typedef enum tagINSTALLSTATE
29 {
30     INSTALLSTATE_BADCONFIG = -6,
31     INSTALLSTATE_INCOMPLETE = -5,
32     INSTALLSTATE_SOURCEABSENT = -4,
33     INSTALLSTATE_MOREDATA = -3,
34     INSTALLSTATE_INVALIDARG = -2,
35     INSTALLSTATE_UNKNOWN = -1,
36     INSTALLSTATE_BROKEN = 0,
37     INSTALLSTATE_ADVERTISED = 1,
38     INSTALLSTATE_ABSENT = 2,
39     INSTALLSTATE_LOCAL = 3,
40     INSTALLSTATE_SOURCE = 4,
41     INSTALLSTATE_DEFAULT = 5
42 } INSTALLSTATE;
43
44 typedef enum tagINSTALLUILEVEL
45 {
46     INSTALLUILEVEL_NOCHANGE = 0,
47     INSTALLUILEVEL_DEFAULT = 1,
48     INSTALLUILEVEL_NONE = 2,
49     INSTALLUILEVEL_BASIC = 3,
50     INSTALLUILEVEL_REDUCED = 4,
51     INSTALLUILEVEL_FULL = 5
52 } INSTALLUILEVEL;
53
54 typedef enum tagINSTALLLEVEL
55 {
56     INSTALLLEVEL_DEFAULT = 0,
57     INSTALLLEVEL_MINIMUM = 1,
58     INSTALLLEVEL_MAXIMUM = 0xFFFF
59 } INSTALLLEVEL;
60
61
62 #define MAX_FEATURE_CHARS 38
63
64
65 UINT WINAPI MsiInstallProductA(LPCSTR, LPCSTR);
66 UINT WINAPI MsiInstallProductW(LPCWSTR, LPCWSTR);
67 #define     MsiInstallProduct WINELIB_NAME_AW(MsiInstallProduct)
68
69 UINT WINAPI MsiEnumProductsA(DWORD index, LPSTR lpguid);
70 UINT WINAPI MsiEnumProductsW(DWORD index, LPWSTR lpguid);
71 #define     MsiEnumProducts WINELIB_NAME_AW(MsiEnumProducts)
72
73 UINT WINAPI MsiEnumFeaturesA(LPCSTR, DWORD, LPSTR, LPSTR);
74 UINT WINAPI MsiEnumFeaturesW(LPCWSTR, DWORD, LPWSTR, LPWSTR);
75 #define     MsiEnumFeatures WINELIB_NAME_AW(MsiEnumFeatures)
76
77 UINT WINAPI MsiEnumComponentsA(DWORD, LPSTR);
78 UINT WINAPI MsiEnumComponentsW(DWORD, LPWSTR);
79 #define     MsiEnumComponents WINELIB_NAME_AW(MsiEnumComponents)
80
81 UINT WINAPI MsiEnumClientsA(LPCSTR, DWORD, LPSTR);
82 UINT WINAPI MsiEnumClientsW(LPCWSTR, DWORD, LPWSTR);
83 #define     MsiEnumClients WINELIB_NAME_AW(MsiEnumClients)
84
85 UINT WINAPI MsiOpenDatabaseA(LPCSTR, LPCSTR, MSIHANDLE *);
86 UINT WINAPI MsiOpenDatabaseW(LPCWSTR, LPCWSTR, MSIHANDLE *);
87 #define     MsiOpenDatabase WINELIB_NAME_AW(MsiOpenDatabase)
88
89 UINT WINAPI MsiOpenPackageA(LPCSTR, MSIHANDLE*);
90 UINT WINAPI MsiOpenPackageW(LPCWSTR, MSIHANDLE*);
91 #define     MsiOpenPackage WINELIB_NAME_AW(MsiOpenPackage)
92
93 UINT WINAPI MsiOpenPackageExA(LPCSTR, DWORD, MSIHANDLE*);
94 UINT WINAPI MsiOpenPackageExW(LPCWSTR, DWORD, MSIHANDLE*);
95 #define     MsiOpenPackageEx WINELIB_NAME_AW(MsiOpenPackageEx)
96
97 UINT WINAPI MsiOpenProductA(LPCSTR, MSIHANDLE*);
98 UINT WINAPI MsiOpenProductW(LPCWSTR, MSIHANDLE*);
99 #define     MsiOpenProduct WINELIB_NAME_AW(MsiOpenProduct)
100
101 UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE, LPCSTR, UINT, MSIHANDLE *);
102 UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE, LPCWSTR, UINT, MSIHANDLE *);
103 #define     MsiGetSummaryInformation WINELIB_NAME_AW(MsiGetSummaryInformation)
104
105 UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE,UINT,UINT*,INT*,FILETIME*,LPSTR,DWORD*);
106 UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE,UINT,UINT*,INT*,FILETIME*,LPWSTR,DWORD*);
107 #define     MsiSummaryInfoGetProperty WINELIB_NAME_AW(MsiSummaryInfoGetProperty)
108
109 UINT WINAPI MsiProvideComponentFromDescriptorA(LPCSTR,LPSTR,DWORD*,DWORD*);
110 UINT WINAPI MsiProvideComponentFromDescriptorW(LPCWSTR,LPWSTR,DWORD*,DWORD*);
111 #define     MsiProvideComponentFromDescriptor WINELIB_NAME_AW(MsiProvideComponentFromDescriptor)
112
113 UINT WINAPI MsiGetProductPropertyA(MSIHANDLE,LPCSTR,LPSTR,DWORD*);
114 UINT WINAPI MsiGetProductPropertyW(MSIHANDLE,LPCWSTR,LPWSTR,DWORD*);
115 #define     MsiGetProductProperty WINELIB_NAME_AW(MsiGetProductProperty)
116
117 UINT WINAPI MsiGetPropertyA(MSIHANDLE, LPCSTR, LPSTR, DWORD*);
118 UINT WINAPI MsiGetPropertyW(MSIHANDLE, LPCWSTR, LPWSTR, DWORD*);
119 #define     MsiGetProperty WINELIB_NAME_AW(MsiGetProperty)
120
121 UINT WINAPI MsiVerifyPackageA(LPCSTR);
122 UINT WINAPI MsiVerifyPackageW(LPCWSTR);
123 #define     MsiVerifyPackage WINELIB_NAME_AW(MsiVerifyPackage)
124
125 INSTALLSTATE WINAPI MsiQueryProductStateA(LPCSTR);
126 INSTALLSTATE WINAPI MsiQueryProductStateW(LPCWSTR);
127 #define      MsiQueryProductState WINELIB_NAME_AW(MsiQueryProductState)
128
129 UINT WINAPI MsiConfigureProductA(LPCSTR szProduct, int iInstallLevel, INSTALLSTATE eInstallState);
130 UINT WINAPI MsiConfigureProductW(LPCWSTR szProduct, int iInstallLevel, INSTALLSTATE eInstallState);
131 #define     MsiConfigureProduct WINELIB_NAME_AW(MsiConfigureProduct);
132
133 UINT WINAPI MsiGetProductCodeA(LPCSTR szComponent, LPSTR szBuffer);
134 UINT WINAPI MsiGetProductCodeW(LPCWSTR szComponent, LPWSTR szBuffer);
135 #define     MsiGetProductCode WINELIB_NAME_AW(MsiGetProductCode)
136
137 UINT WINAPI MsiGetProductInfoA(LPCSTR szProduct, LPCSTR szAttribute, LPSTR szBuffer, DWORD *pcchValueBuf);
138 UINT WINAPI MsiGetProductInfoW(LPCWSTR szProduct, LPCWSTR szAttribute, LPWSTR szBuffer, DWORD *pcchValueBuf);
139 #define     MsiGetProductInfo WINELIB_NAME_AW(MsiGetProductInfo)
140
141 UINT WINAPI MsiEnableLogA(DWORD dwLogMode, LPCSTR szLogFile, BOOL fAppend);
142 UINT WINAPI MsiEnableLogW(DWORD dwLogMode, LPCWSTR szLogFile, BOOL fAppend);
143 #define     MsiEnableLog WINELIB_NAME_AW(MsiEnableLog)
144
145 /**
146  * Non Unicode
147  */
148 UINT WINAPI MsiCloseHandle(MSIHANDLE);
149 UINT WINAPI MsiCloseAllHandles();
150
151 #ifdef __cplusplus
152 }
153 #endif
154
155 #endif /* __WINE_MSI_H */