42 #define PID_DICTIONARY 0 43 #define PID_CODEPAGE 1 47 #define PID_KEYWORDS 5 48 #define PID_COMMENTS 6 49 #define PID_TEMPLATE 7 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 60 #define PID_APPNAME 18 61 #define PID_SECURITY 19 62 #define PID_MSIVERSION PID_PAGECOUNT 63 #define PID_MSISOURCE PID_WORDCOUNT 64 #define PID_MSIRESTRICT PID_CHARCOUNT 66 static const char *
msifile =
"winetest-suminfo.msi";
68 'w',
'i',
'n',
'e',
't',
'e',
's',
't',
'-',
's',
'u',
'm',
'i',
'n',
'f',
'o',
'.',
'm',
's',
'i',0 };
97 "MsiGetSummaryInformation failed %u\n",
r);
111 ok(
count == 0,
"count should be zero\n");
125 ok(
type == 0,
"wrong type\n");
131 ok(
type == 0,
"wrong type\n");
132 ok(
val == 1234,
"wrong val\n");
139 ok(
buf[0]==
'x',
"cleared buffer\n");
140 ok(sz == 0x10,
"count wasn't zero\n");
205 ok(sz == 4,
"count was wrong\n");
213 ok(sz == 4,
"count was wrong\n");
283 ok(
r,
"DeleteFile failed\n");
286 static const WCHAR tb[] = { 0x4840, 0x3f7f, 0x4164, 0x422f, 0x4836, 0 };
287 static const WCHAR sd[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3b6a, 0x45e4, 0x4824, 0 };
288 static const WCHAR sp[] = { 0x4840, 0x3f3f, 0x4577, 0x446c, 0x3e6a, 0x44b2, 0x482f, 0 };
290 #define LOSE_CONST(x) ((LPSTR)(UINT_PTR)(x)) 294 static const CLSID CLSID_MsiDatabase =
295 { 0xc1084, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
296 static const CLSID IID_IPropertySetStorage =
297 { 0x13a, 0, 0, {0xc0, 0, 0, 0, 0, 0, 0, 0x46 } };
299 { 0xf29f85e0, 0x4ff9, 0x1068, {0xab, 0x91, 0x08, 0x00, 0x2b, 0x27, 0xb3, 0xd9}};
306 PROPSPEC propspec[10];
307 PROPVARIANT propvar[10];
311 ok(
r ==
S_OK,
"failed to create database\n");
313 r = IStorage_SetClass( stg, &CLSID_MsiDatabase );
314 ok(
r ==
S_OK,
"failed to set clsid\n");
318 ok(
r ==
S_OK,
"failed to create stream\n");
320 IStream_Release( stm );
324 ok(
r ==
S_OK,
"failed to create stream\n");
327 ok(
r ==
S_OK,
"failed to write stream\n");
329 IStream_Release( stm );
333 ok(
r ==
S_OK,
"failed to create stream\n");
335 IStream_Release( stm );
337 r = IStorage_QueryInterface( stg, &IID_IPropertySetStorage, (
void**) &pss );
338 ok(
r ==
S_OK,
"failed to set clsid\n");
341 ok(
r ==
S_OK,
"failed to create property set\n");
344 ok(
r ==
S_OK,
"failed to set class\n");
346 propspec[0].ulKind = PRSPEC_PROPID;
351 propspec[1].ulKind = PRSPEC_PROPID;
354 U(propvar[1]).pszVal =
LOSE_CONST(
"msi suminfo / property storage test");
356 propspec[2].ulKind = PRSPEC_PROPID;
361 propspec[3].ulKind = PRSPEC_PROPID;
366 propspec[4].ulKind = PRSPEC_PROPID;
369 U(propvar[4]).pszVal =
LOSE_CONST(
"{913B8D18-FBB6-4CAC-A239-C74C11E3FA74}");
371 propspec[5].ulKind = PRSPEC_PROPID;
373 propvar[5].vt =
VT_I4;
374 U(propvar[5]).lVal = 100;
376 propspec[6].ulKind = PRSPEC_PROPID;
378 propvar[6].vt =
VT_I4;
379 U(propvar[6]).lVal = 0;
382 propspec[7].ulKind = PRSPEC_PROPID;
385 U(propvar[7]).pszVal =
LOSE_CONST(
"7/1/1999 5:17");
387 r = IPropertyStorage_WriteMultiple( ps, 8, propspec, propvar,
PID_FIRST_USABLE );
388 ok(
r ==
S_OK,
"failed to write properties\n");
390 IPropertyStorage_Commit( ps, STGC_DEFAULT );
392 IPropertyStorage_Release( ps );
393 IPropertySetStorage_Release( pss );
395 IStorage_Commit( stg, STGC_DEFAULT );
396 IStorage_Release( stg );
432 "Expected empty string or \"7\", got \"%s\"\n", sval);
435 ok(sz == 0 || sz == 1,
"Expected 0 or 1, got %d\n", sz);
#define ERROR_INVALID_PARAMETER
#define MSIDBOPEN_READONLY
#define ERROR_UNKNOWN_PROPERTY
static const WCHAR msifileW[]
#define STGM_SHARE_EXCLUSIVE
GLdouble GLdouble GLdouble r
GLuint GLuint GLsizei count
#define ERROR_INVALID_HANDLE
#define ERROR_DATATYPE_MISMATCH
int WINAPI lstrcmpA(LPCSTR lpString1, LPCSTR lpString2)
static void test_suminfo(void)
static const char * msifile
static const CHAR suminfo[]
const FMTID FMTID_SummaryInformation
GLenum GLuint GLenum GLsizei const GLchar * buf
#define ERROR_FUNCTION_FAILED
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, LPCSTR szValue)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
#define ERROR_INSTALL_PACKAGE_INVALID
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, PUINT pCount)
#define INVALID_FILE_ATTRIBUTES
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, LPCSTR szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
HRESULT WINAPI StgCreateDocfile(LPCOLESTR pwcsName, DWORD grfMode, DWORD reserved, IStorage **ppstgOpen)
UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE handle, UINT uiProperty, PUINT puiDataType, LPINT piValue, FILETIME *pftValue, LPSTR szValueBuf, LPDWORD pcchValueBuf)
static void test_create_database_binary(void)
UINT WINAPI MsiCloseHandle(MSIHANDLE handle)
static void test_summary_binary(void)
UINT WINAPI MsiDatabaseCommit(MSIHANDLE hdb)
UINT WINAPI MsiOpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIHANDLE *phDB)
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
char * strcpy(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
GLuint GLuint GLsizei GLenum type
#define ERROR_INSTALL_PACKAGE_OPEN_FAILED