42#define PID_DICTIONARY 0
50#define PID_LASTAUTHOR 8
51#define PID_REVNUMBER 9
52#define PID_EDITTINE 10
53#define PID_LASTPRINTED 11
54#define PID_CREATE_DTM 12
55#define PID_LASTSAVE_DTM 13
56#define PID_PAGECOUNT 14
57#define PID_WORDCOUNT 15
58#define PID_CHARCOUNT 16
59#define PID_THUMBNAIL 17
61#define PID_SECURITY 19
62#define PID_MSIVERSION PID_PAGECOUNT
63#define PID_MSISOURCE PID_WORDCOUNT
64#define PID_MSIRESTRICT PID_CHARCOUNT
66static const char *
msifile =
"winetest-suminfo.msi";
96 "MsiGetSummaryInformation failed %u\n",
r);
110 ok(
count == 0,
"count should be zero\n");
124 ok(
type == 0,
"wrong type\n");
130 ok(
type == 0,
"wrong type\n");
131 ok(
val == 1234,
"wrong val\n");
138 ok(
buf[0]==
'x',
"cleared buffer\n");
139 ok(sz == 0x10,
"count wasn't zero\n");
204 ok(sz == 4,
"count was wrong\n");
212 ok(sz == 4,
"count was wrong\n");
282 ok(
r,
"DeleteFile failed\n");
285static const WCHAR tb[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 };
286static const WCHAR sd[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 };
287static const WCHAR sp[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 };
289#define LOSE_CONST(x) ((LPSTR)(UINT_PTR)(x))
293 static const CLSID CLSID_MsiDatabase =
294 { 0xc1084, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
295 static const CLSID IID_IPropertySetStorage =
296 { 0x13a, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
298 { 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}};
305 PROPSPEC propspec[10];
306 PROPVARIANT propvar[10];
310 ok(
r ==
S_OK,
"failed to create database\n");
312 r = IStorage_SetClass( stg, &CLSID_MsiDatabase );
313 ok(
r ==
S_OK,
"failed to set clsid\n");
317 ok(
r ==
S_OK,
"failed to create stream\n");
319 IStream_Release( stm );
323 ok(
r ==
S_OK,
"failed to create stream\n");
326 ok(
r ==
S_OK,
"failed to write stream\n");
328 IStream_Release( stm );
332 ok(
r ==
S_OK,
"failed to create stream\n");
334 IStream_Release( stm );
336 r = IStorage_QueryInterface( stg, &IID_IPropertySetStorage, (
void**) &pss );
337 ok(
r ==
S_OK,
"failed to set clsid\n");
340 ok(
r ==
S_OK,
"failed to create property set\n");
343 ok(
r ==
S_OK,
"failed to set class\n");
345 propspec[0].ulKind = PRSPEC_PROPID;
350 propspec[1].ulKind = PRSPEC_PROPID;
353 propvar[1].pszVal =
LOSE_CONST(
"msi suminfo / property storage test");
355 propspec[2].ulKind = PRSPEC_PROPID;
360 propspec[3].ulKind = PRSPEC_PROPID;
365 propspec[4].ulKind = PRSPEC_PROPID;
368 propvar[4].pszVal =
LOSE_CONST(
"{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}");
370 propspec[5].ulKind = PRSPEC_PROPID;
372 propvar[5].vt =
VT_I4;
373 propvar[5].lVal = 100;
375 propspec[6].ulKind = PRSPEC_PROPID;
377 propvar[6].vt =
VT_I4;
381 propspec[7].ulKind = PRSPEC_PROPID;
384 propvar[7].pszVal =
LOSE_CONST(
"7/1/1999 5:17");
386 r = IPropertyStorage_WriteMultiple( ps, 8, propspec, propvar,
PID_FIRST_USABLE );
387 ok(
r ==
S_OK,
"failed to write properties\n");
389 IPropertyStorage_Commit( ps, STGC_DEFAULT );
391 IPropertyStorage_Release( ps );
392 IPropertySetStorage_Release( pss );
394 IStorage_Commit( stg, STGC_DEFAULT );
395 IStorage_Release( stg );
431 "Expected empty string or \"7\", got \"%s\"\n", sval);
434 ok(sz == 0 || sz == 1,
"Expected 0 or 1, got %lu\n", sz);
int strcmp(const char *String1, const char *String2)
char * strcpy(char *DstString, const char *SrcString)
static const CHAR suminfo[]
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phDB)
UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf)
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, UINT *pCount)
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName, DWORD grfMode, DWORD reserved, IStorage **ppstgOpen)
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
static const WCHAR msifileW[]
static void test_summary_binary(void)
static void test_suminfo(void)
static void test_create_database_binary(void)
static const char * msifile
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
#define MSIDBOPEN_READONLY
#define STGM_SHARE_EXCLUSIVE
const FMTID FMTID_SummaryInformation
#define INVALID_FILE_ATTRIBUTES
#define ERROR_INSTALL_PACKAGE_INVALID
#define ERROR_INSTALL_PACKAGE_OPEN_FAILED
#define ERROR_FUNCTION_FAILED
#define ERROR_UNKNOWN_PROPERTY
#define ERROR_DATATYPE_MISMATCH