ReactOS 0.4.17-dev-966-gf06eace
suminfo.c File Reference
#include <stdarg.h>
#include "stdio.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
#include "shlwapi.h"
#include "wine/debug.h"
#include "wine/exception.h"
#include "msi.h"
#include "msiquery.h"
#include "msidefs.h"
#include "objidl.h"
#include "propvarutil.h"
#include "msipriv.h"
#include "winemsi.h"
#include "pshpack1.h"
#include "poppack.h"
Include dependency graph for suminfo.c:

Go to the source code of this file.

Classes

struct  property_set_header
 
struct  format_id_offset
 
struct  property_section_header
 
struct  property_id_offset
 
struct  property_data
 

Macros

#define COBJMACROS
 
#define SECT_HDR_SIZE   (sizeof(struct property_section_header))
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (msi)
 
static HRESULT (WINAPI *pPropVariantChangeType)(PROPVARIANT *ppropvarDest
 
static void free_prop (PROPVARIANT *prop)
 
static void MSI_CloseSummaryInfo (MSIOBJECTHDR *arg)
 
static UINT get_type (UINT uiProperty)
 
static UINT get_property_count (const PROPVARIANT *property)
 
static UINT propvar_changetype (PROPVARIANT *changed, PROPVARIANT *property, VARTYPE vt)
 
static void read_properties_from_data (PROPVARIANT *prop, LPBYTE data, DWORD sz)
 
static UINT load_summary_info (MSISUMMARYINFO *si, IStream *stm)
 
static DWORD write_dword (LPBYTE data, DWORD ofs, DWORD val)
 
static DWORD write_filetime (LPBYTE data, DWORD ofs, const FILETIME *ft)
 
static DWORD write_string (LPBYTE data, DWORD ofs, LPCSTR str)
 
static UINT write_property_to_data (const PROPVARIANT *prop, LPBYTE data)
 
static UINT save_summary_info (const MSISUMMARYINFO *si, IStream *stm)
 
static MSISUMMARYINFO * create_suminfo (IStorage *stg, UINT update_count)
 
UINT msi_get_suminfo (IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret)
 
UINT msi_get_db_suminfo (MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret)
 
UINT WINAPI MsiGetSummaryInformationW (MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
 
UINT WINAPI MsiGetSummaryInformationA (MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
 
UINT WINAPI MsiSummaryInfoGetPropertyCount (MSIHANDLE hSummaryInfo, UINT *pCount)
 
UINT msi_suminfo_get_prop (MSISUMMARYINFO *si, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, awstring *str, DWORD *pcchValueBuf)
 
LPWSTR msi_suminfo_dup_string (MSISUMMARYINFO *si, UINT uiProperty)
 
INT msi_suminfo_get_int32 (MSISUMMARYINFO *si, UINT uiProperty)
 
LPWSTR msi_get_suminfo_product (IStorage *stg)
 
UINT WINAPI MsiSummaryInfoGetPropertyA (MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf)
 
UINT WINAPI MsiSummaryInfoGetPropertyW (MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf)
 
static UINT set_prop (MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
 
UINT msi_suminfo_set_prop (MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, awcstring *str)
 
UINT WINAPI MsiSummaryInfoSetPropertyW (MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const WCHAR *szValue)
 
UINT WINAPI MsiSummaryInfoSetPropertyA (MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
 
UINT msi_suminfo_persist (MSISUMMARYINFO *si)
 
static void parse_filetime (LPCWSTR str, FILETIME *ft)
 
static UINT parse_prop (LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value, FILETIME *ft_value, awcstring *str_value)
 
UINT msi_add_suminfo (MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns)
 
static UINT save_prop (MSISUMMARYINFO *si, HANDLE handle, UINT row)
 
UINT msi_export_suminfo (MSIDATABASE *db, HANDLE handle)
 
UINT WINAPI MsiSummaryInfoPersist (MSIHANDLE handle)
 
UINT WINAPI MsiCreateTransformSummaryInfoA (MSIHANDLE db, MSIHANDLE db_ref, const char *transform, int error, int validation)
 
UINT WINAPI MsiCreateTransformSummaryInfoW (MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error, int validation)
 
UINT msi_load_suminfo_properties (MSIPACKAGE *package)
 
UINT __cdecl s_remote_SummaryInfoGetPropertyCount (MSIHANDLE suminfo, UINT *count)
 
UINT __cdecl s_remote_SummaryInfoGetProperty (MSIHANDLE suminfo, UINT property, UINT *type, INT *value, FILETIME *ft, LPWSTR *buf)
 

Variables

static REFPROPVARIANT propvarSrc
 
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS flags
 
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 23 of file suminfo.c.

◆ SECT_HDR_SIZE

#define SECT_HDR_SIZE   (sizeof(struct property_section_header))

Definition at line 92 of file suminfo.c.

Function Documentation

◆ create_suminfo()

static MSISUMMARYINFO * create_suminfo ( IStorage *  stg,
UINT  update_count 
)
static

Definition at line 447 of file suminfo.c.

448{
450
452 return NULL;
453
454 si->update_count = update_count;
455 IStorage_AddRef( stg );
456 si->storage = stg;
457
458 return si;
459}
#define NULL
Definition: types.h:112
void * alloc_msiobject(UINT type, UINT size, msihandledestructor destroy)
Definition: handle.c:201
static void MSI_CloseSummaryInfo(MSIOBJECTHDR *arg)
Definition: suminfo.c:101
static SYSTEM_INFO si
Definition: virtual.c:39
#define MSIHANDLETYPE_SUMMARYINFO
Definition: msipriv.h:747

Referenced by msi_add_suminfo(), msi_get_db_suminfo(), msi_get_suminfo(), and MsiGetSummaryInformationW().

◆ free_prop()

static void free_prop ( PROPVARIANT *  prop)
static

Definition at line 94 of file suminfo.c.

95{
96 if (prop->vt == VT_LPSTR )
97 free( prop->pszVal );
98 prop->vt = VT_EMPTY;
99}
#define free
Definition: debug_ros.c:5
@ VT_LPSTR
Definition: compat.h:2324
@ VT_EMPTY
Definition: compat.h:2295

Referenced by MSI_CloseSummaryInfo(), and set_prop().

◆ get_property_count()

static UINT get_property_count ( const PROPVARIANT *  property)
static

Definition at line 157 of file suminfo.c.

158{
159 UINT i, n = 0;
160
161 if( !property )
162 return n;
163 for( i = 0; i < MSI_MAX_PROPS; i++ )
164 if( property[i].vt != VT_EMPTY )
165 n++;
166 return n;
167}
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
Definition: suminfo.c:90
GLdouble n
Definition: glext.h:7729
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: sysinfo.c:13
#define MSI_MAX_PROPS
Definition: msipriv.h:496

Referenced by msi_export_suminfo(), MsiSummaryInfoGetPropertyCount(), and save_summary_info().

◆ get_type()

static UINT get_type ( UINT  uiProperty)
static

Definition at line 117 of file suminfo.c.

118{
119 switch( uiProperty )
120 {
121#ifdef __REACTOS__
122 case PID_CODEPAGE_MSI:
123#else
124 case PID_CODEPAGE:
125#endif
126 return VT_I2;
127
128 case PID_SUBJECT:
129 case PID_AUTHOR:
130 case PID_KEYWORDS:
131 case PID_COMMENTS:
132 case PID_TEMPLATE:
133 case PID_LASTAUTHOR:
134 case PID_REVNUMBER:
135 case PID_APPNAME:
136 case PID_TITLE:
137 return VT_LPSTR;
138
139 case PID_LASTPRINTED:
140 case PID_CREATE_DTM:
141 case PID_LASTSAVE_DTM:
142 return VT_FILETIME;
143
144 case PID_WORDCOUNT:
145 case PID_CHARCOUNT:
146#ifdef __REACTOS__
147 case PID_SECURITY_MSI:
148#else
149 case PID_SECURITY:
150#endif
151 case PID_PAGECOUNT:
152 return VT_I4;
153 }
154 return VT_EMPTY;
155}
@ VT_I4
Definition: compat.h:2298
@ VT_FILETIME
Definition: compat.h:2329
@ VT_I2
Definition: compat.h:2297
#define PID_TEMPLATE
Definition: suminfo.c:49
#define PID_KEYWORDS
Definition: suminfo.c:47
#define PID_CHARCOUNT
Definition: suminfo.c:58
#define PID_PAGECOUNT
Definition: suminfo.c:56
#define PID_WORDCOUNT
Definition: suminfo.c:57
#define PID_SECURITY
Definition: suminfo.c:61
#define PID_COMMENTS
Definition: suminfo.c:48
#define PID_TITLE
Definition: suminfo.c:44
#define PID_LASTAUTHOR
Definition: suminfo.c:50
#define PID_AUTHOR
Definition: suminfo.c:46
#define PID_REVNUMBER
Definition: suminfo.c:51
#define PID_LASTPRINTED
Definition: suminfo.c:53
#define PID_CREATE_DTM
Definition: suminfo.c:54
#define PID_APPNAME
Definition: suminfo.c:60
#define PID_SUBJECT
Definition: suminfo.c:45
#define PID_CODEPAGE
Definition: suminfo.c:43
#define PID_LASTSAVE_DTM
Definition: suminfo.c:55

Referenced by msi_add_suminfo(), msi_suminfo_set_prop(), read_properties_from_data(), type_apicontract_declare(), type_coclass_declare(), type_delegate_declare(), type_dispinterface_declare(), type_interface_declare(), type_module_declare(), type_parameterized_delegate_declare(), type_parameterized_interface_declare(), and type_runtimeclass_declare().

◆ HRESULT()

static HRESULT ( WINAPI *  pPropVariantChangeType)
static

◆ load_summary_info()

static UINT load_summary_info ( MSISUMMARYINFO *  si,
IStream *  stm 
)
static

Definition at line 255 of file suminfo.c.

256{
257 struct property_set_header set_hdr;
258 struct format_id_offset format_hdr;
259 struct property_section_header section_hdr;
260 LPBYTE data = NULL;
261 LARGE_INTEGER ofs;
262 ULONG count, sz;
263 HRESULT r;
264
265 TRACE("%p %p\n", si, stm);
266
267 /* read the header */
268 sz = sizeof set_hdr;
269 r = IStream_Read( stm, &set_hdr, sz, &count );
270 if( FAILED(r) || count != sz )
272
273 if( set_hdr.wByteOrder != 0xfffe )
274 {
275 ERR("property set not big-endian %04X\n", set_hdr.wByteOrder);
277 }
278
279 sz = sizeof format_hdr;
280 r = IStream_Read( stm, &format_hdr, sz, &count );
281 if( FAILED(r) || count != sz )
283
284 /* check the format id is correct */
285 if( !IsEqualGUID( &FMTID_SummaryInformation, &format_hdr.fmtid ) )
287
288 /* seek to the location of the section */
289 ofs.QuadPart = format_hdr.dwOffset;
290 r = IStream_Seek( stm, ofs, STREAM_SEEK_SET, NULL );
291 if( FAILED(r) )
293
294 /* read the section itself */
295 sz = SECT_HDR_SIZE;
296 r = IStream_Read( stm, &section_hdr, sz, &count );
297 if( FAILED(r) || count != sz )
299
300 if( section_hdr.cProperties > MSI_MAX_PROPS )
301 {
302 ERR( "too many properties %lu\n", section_hdr.cProperties );
304 }
305
306 data = malloc( section_hdr.cbSection );
307 if( !data )
309
310 memcpy( data, &section_hdr, SECT_HDR_SIZE );
311
312 /* read all the data in one go */
313 sz = section_hdr.cbSection - SECT_HDR_SIZE;
314 r = IStream_Read( stm, &data[ SECT_HDR_SIZE ], sz, &count );
315 if( SUCCEEDED(r) && count == sz )
317 else
318 ERR( "failed to read properties %lu %lu\n", count, sz );
319
320 free( data );
321 return ERROR_SUCCESS;
322}
#define ERR(fmt,...)
Definition: precomp.h:57
#define malloc
Definition: debug_ros.c:4
#define ERROR_SUCCESS
Definition: deptool.c:10
static void read_properties_from_data(PROPVARIANT *prop, LPBYTE data, DWORD sz)
Definition: suminfo.c:186
#define SECT_HDR_SIZE
Definition: suminfo.c:92
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
const FMTID FMTID_SummaryInformation
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define TRACE(s)
Definition: solgame.cpp:4
unsigned char * LPBYTE
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:1333

Referenced by msi_get_db_suminfo(), and msi_get_suminfo().

◆ msi_add_suminfo()

UINT msi_add_suminfo ( MSIDATABASE *  db,
LPWSTR **  records,
int  num_records,
int  num_columns 
)

Definition at line 1077 of file suminfo.c.

1078{
1079 UINT r;
1080 int i, j;
1082
1083 r = msi_get_suminfo( db->storage, num_records * (num_columns / 2), &si );
1084 if (r != ERROR_SUCCESS)
1085 {
1086 if (!(si = create_suminfo( db->storage, num_records * (num_columns / 2) )))
1087 return ERROR_OUTOFMEMORY;
1088 r = ERROR_SUCCESS;
1089 }
1090
1091 for (i = 0; i < num_records; i++)
1092 {
1093 for (j = 0; j < num_columns; j += 2)
1094 {
1095 UINT pid;
1096 INT int_value = 0;
1097 FILETIME ft_value;
1098 awcstring str_value;
1099
1100 r = parse_prop( records[i][j], records[i][j + 1], &pid, &int_value, &ft_value, &str_value );
1101 if (r != ERROR_SUCCESS)
1102 goto end;
1103
1104 r = set_prop( si, pid, get_type(pid), int_value, &ft_value, &str_value );
1105 if (r != ERROR_SUCCESS)
1106 goto end;
1107 }
1108 }
1109
1110end:
1111 if (r == ERROR_SUCCESS)
1113
1114 msiobj_release( &si->hdr );
1115 return r;
1116}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
UINT msi_get_suminfo(IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret)
Definition: suminfo.c:461
UINT msi_suminfo_persist(MSISUMMARYINFO *si)
Definition: suminfo.c:971
static UINT parse_prop(LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value, FILETIME *ft_value, awcstring *str_value)
Definition: suminfo.c:1028
static MSISUMMARYINFO * create_suminfo(IStorage *stg, UINT update_count)
Definition: suminfo.c:447
static UINT set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:841
static UINT get_type(UINT uiProperty)
Definition: suminfo.c:117
GLuint GLuint end
Definition: gl.h:1545
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
IStorage * storage
Definition: msipriv.h:109
int32_t INT
Definition: typedefs.h:58
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837

Referenced by MSI_DatabaseImport().

◆ MSI_CloseSummaryInfo()

static void MSI_CloseSummaryInfo ( MSIOBJECTHDR *  arg)
static

Definition at line 101 of file suminfo.c.

102{
104 DWORD i;
105
106 for( i = 0; i < MSI_MAX_PROPS; i++ )
107 free_prop( &si->property[i] );
108 IStorage_Release( si->storage );
109}
static void free_prop(PROPVARIANT *prop)
Definition: suminfo.c:94
unsigned long DWORD
Definition: ntddk_ex.h:95

Referenced by create_suminfo().

◆ msi_export_suminfo()

UINT msi_export_suminfo ( MSIDATABASE *  db,
HANDLE  handle 
)

Definition at line 1194 of file suminfo.c.

1195{
1196 UINT i, r, num_rows;
1198
1199 r = msi_get_suminfo( db->storage, 0, &si );
1200 if (r != ERROR_SUCCESS)
1201 r = msi_get_db_suminfo( db, 0, &si );
1202 if (r != ERROR_SUCCESS)
1203 return r;
1204
1205 num_rows = get_property_count( si->property );
1206 if (!num_rows)
1207 {
1208 msiobj_release( &si->hdr );
1209 return ERROR_FUNCTION_FAILED;
1210 }
1211
1212 for (i = 0; i < num_rows; i++)
1213 {
1214 r = save_prop( si, handle, i );
1215 if (r != ERROR_SUCCESS)
1216 {
1217 msiobj_release( &si->hdr );
1218 return r;
1219 }
1220 }
1221
1222 msiobj_release( &si->hdr );
1223 return ERROR_SUCCESS;
1224}
UINT msi_get_db_suminfo(MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret)
Definition: suminfo.c:491
static UINT save_prop(MSISUMMARYINFO *si, HANDLE handle, UINT row)
Definition: suminfo.c:1118
static UINT get_property_count(const PROPVARIANT *property)
Definition: suminfo.c:157
JSAMPARRAY int num_rows
Definition: jpegint.h:420

Referenced by export_summaryinformation().

◆ msi_get_db_suminfo()

UINT msi_get_db_suminfo ( MSIDATABASE *  db,
UINT  uiUpdateCount,
MSISUMMARYINFO **  ret 
)

Definition at line 491 of file suminfo.c.

492{
493 IStream *stm;
495 UINT r;
496
497 if (!(si = create_suminfo( db->storage, uiUpdateCount ))) return ERROR_OUTOFMEMORY;
498
499 r = msi_get_stream( db, L"\5SummaryInformation", &stm );
500 if (r != ERROR_SUCCESS)
501 {
502 msiobj_release( &si->hdr );
503 return r;
504 }
505
506 r = load_summary_info( si, stm );
507 IStream_Release( stm );
508 if (r != ERROR_SUCCESS)
509 {
510 msiobj_release( &si->hdr );
511 return r;
512 }
513
514 *ret = si;
515 return ERROR_SUCCESS;
516}
static UINT load_summary_info(MSISUMMARYINFO *si, IStream *stm)
Definition: suminfo.c:255
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
UINT msi_get_stream(MSIDATABASE *, const WCHAR *, IStream **)
Definition: streams.c:499

Referenced by msi_export_suminfo(), msi_get_package_code(), msi_load_suminfo_properties(), MSI_OpenPackageW(), and MsiGetSummaryInformationW().

◆ msi_get_suminfo()

UINT msi_get_suminfo ( IStorage *  stg,
UINT  uiUpdateCount,
MSISUMMARYINFO **  ret 
)

Definition at line 461 of file suminfo.c.

462{
463 IStream *stm;
465 HRESULT hr;
466 UINT r;
467
468 TRACE("%p, %u\n", stg, uiUpdateCount);
469
470 if (!(si = create_suminfo( stg, uiUpdateCount ))) return ERROR_OUTOFMEMORY;
471
472 hr = IStorage_OpenStream( si->storage, L"\5SummaryInformation", 0, STGM_READ|STGM_SHARE_EXCLUSIVE, 0, &stm );
473 if (FAILED( hr ))
474 {
475 msiobj_release( &si->hdr );
477 }
478
479 r = load_summary_info( si, stm );
480 IStream_Release( stm );
481 if (r != ERROR_SUCCESS)
482 {
483 msiobj_release( &si->hdr );
484 return r;
485 }
486
487 *ret = si;
488 return ERROR_SUCCESS;
489}
HRESULT hr
Definition: delayimp.cpp:582
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:942
#define STGM_READ
Definition: objbase.h:936

Referenced by admin_update_package_info(), apply_patch_package(), check_transform_applicable(), msi_add_suminfo(), MSI_ApplicablePatchW(), msi_apply_registered_patch(), msi_export_suminfo(), msi_get_package_code(), msi_get_suminfo_product(), msi_load_suminfo_properties(), MSI_OpenPackageW(), and MsiGetSummaryInformationW().

◆ msi_get_suminfo_product()

LPWSTR msi_get_suminfo_product ( IStorage *  stg)

Definition at line 724 of file suminfo.c.

725{
727 LPWSTR prod;
728 UINT r;
729
730 r = msi_get_suminfo( stg, 0, &si );
731 if (r != ERROR_SUCCESS)
732 {
733 ERR("no summary information!\n");
734 return NULL;
735 }
737 msiobj_release( &si->hdr );
738 return prod;
739}
LPWSTR msi_suminfo_dup_string(MSISUMMARYINFO *si, UINT uiProperty)
Definition: suminfo.c:700
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by check_transform_applicable().

◆ msi_load_suminfo_properties()

UINT msi_load_suminfo_properties ( MSIPACKAGE *  package)

Definition at line 1266 of file suminfo.c.

1267{
1269 WCHAR *package_code;
1270 UINT r;
1271 DWORD len;
1272 awstring str;
1273 INT count;
1274
1275 r = msi_get_suminfo( package->db->storage, 0, &si );
1276 if (r != ERROR_SUCCESS)
1277 {
1278 r = msi_get_db_suminfo( package->db, 0, &si );
1279 if (r != ERROR_SUCCESS)
1280 {
1281 ERR("Unable to open summary information stream %u\n", r);
1282 return r;
1283 }
1284 }
1285
1286 str.unicode = TRUE;
1287 str.str.w = NULL;
1288 len = 0;
1290 if (r != ERROR_MORE_DATA)
1291 {
1292 WARN("Unable to query revision number %u\n", r);
1293 msiobj_release( &si->hdr );
1294 return ERROR_FUNCTION_FAILED;
1295 }
1296
1297 len++;
1298 if (!(package_code = malloc( len * sizeof(WCHAR) ))) return ERROR_OUTOFMEMORY;
1299 str.str.w = package_code;
1300
1302 if (r != ERROR_SUCCESS)
1303 {
1304 free( package_code );
1305 msiobj_release( &si->hdr );
1306 return r;
1307 }
1308
1309 r = msi_set_property( package->db, L"PackageCode", package_code, len );
1310 free( package_code );
1311
1312 count = 0;
1314 package->WordCount = count;
1315
1316 msiobj_release( &si->hdr );
1317 return r;
1318}
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define TRUE
Definition: types.h:120
UINT msi_suminfo_get_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, awstring *str, DWORD *pcchValueBuf)
Definition: suminfo.c:645
GLenum GLsizei len
Definition: glext.h:6722
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int)
Definition: package.c:2132
short WCHAR
Definition: pedump.c:58
const WCHAR * str
UINT WordCount
Definition: msipriv.h:472
MSIDATABASE * db
Definition: msipriv.h:407

Referenced by MSI_CreatePackage().

◆ msi_suminfo_dup_string()

LPWSTR msi_suminfo_dup_string ( MSISUMMARYINFO *  si,
UINT  uiProperty 
)

Definition at line 700 of file suminfo.c.

701{
702 PROPVARIANT *prop;
703
704 if ( uiProperty >= MSI_MAX_PROPS )
705 return NULL;
706 prop = &si->property[uiProperty];
707 if( prop->vt != VT_LPSTR )
708 return NULL;
709 return strdupAtoW( prop->pszVal );
710}
static WCHAR * strdupAtoW(const char *str)
Definition: main.c:61

Referenced by check_transform_applicable(), msi_check_patch_applicable(), msi_get_package_code(), msi_get_suminfo_product(), parse_patch_summary(), and parse_suminfo().

◆ msi_suminfo_get_int32()

INT msi_suminfo_get_int32 ( MSISUMMARYINFO *  si,
UINT  uiProperty 
)

Definition at line 712 of file suminfo.c.

713{
714 PROPVARIANT *prop;
715
716 if ( uiProperty >= MSI_MAX_PROPS )
717 return -1;
718 prop = &si->property[uiProperty];
719 if( prop->vt != VT_I4 )
720 return -1;
721 return prop->lVal;
722}

Referenced by check_transform_applicable(), and parse_suminfo().

◆ msi_suminfo_get_prop()

UINT msi_suminfo_get_prop ( MSISUMMARYINFO *  si,
UINT  uiProperty,
UINT *  puiDataType,
INT *  piValue,
FILETIME *  pftValue,
awstring *  str,
DWORD *  pcchValueBuf 
)

Definition at line 645 of file suminfo.c.

647{
648 PROPVARIANT *prop;
650
651 prop = &si->property[uiProperty];
652
653 if( puiDataType )
654 *puiDataType = prop->vt;
655
656 switch( prop->vt )
657 {
658 case VT_I2:
659 if( piValue )
660 *piValue = prop->iVal;
661 break;
662 case VT_I4:
663 if( piValue )
664 *piValue = prop->lVal;
665 break;
666 case VT_LPSTR:
667 if( pcchValueBuf )
668 {
669 DWORD len = 0;
670
671 if( str->unicode )
672 {
673 len = MultiByteToWideChar( CP_ACP, 0, prop->pszVal, -1, NULL, 0 ) - 1;
674 MultiByteToWideChar( CP_ACP, 0, prop->pszVal, -1, str->str.w, *pcchValueBuf );
675 }
676 else
677 {
678 len = lstrlenA( prop->pszVal );
679 if( str->str.a )
680 lstrcpynA(str->str.a, prop->pszVal, *pcchValueBuf );
681 }
682 if (len >= *pcchValueBuf)
684 *pcchValueBuf = len;
685 }
686 break;
687 case VT_FILETIME:
688 if( pftValue )
689 *pftValue = prop->filetime;
690 break;
691 case VT_EMPTY:
692 break;
693 default:
694 FIXME("Unknown property variant type\n");
695 break;
696 }
697 return ret;
698}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define CP_ACP
Definition: compat.h:109
#define lstrcpynA
Definition: compat.h:751
#define MultiByteToWideChar
Definition: compat.h:110
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145

Referenced by admin_update_package_info(), msi_load_suminfo_properties(), MsiSummaryInfoGetPropertyA(), MsiSummaryInfoGetPropertyW(), and save_prop().

◆ msi_suminfo_persist()

UINT msi_suminfo_persist ( MSISUMMARYINFO *  si)

Definition at line 971 of file suminfo.c.

972{
974 IStream *stm = NULL;
975 DWORD grfMode;
976 HRESULT r;
977
979 r = IStorage_CreateStream( si->storage, L"\5SummaryInformation", grfMode, 0, 0, &stm );
980 if( SUCCEEDED(r) )
981 {
982 ret = save_summary_info( si, stm );
983 IStream_Release( stm );
984 }
985 return ret;
986}
static UINT save_summary_info(const MSISUMMARYINFO *si, IStream *stm)
Definition: suminfo.c:379
#define STGM_CREATE
Definition: objbase.h:945
#define STGM_READWRITE
Definition: objbase.h:938

Referenced by admin_update_package_info(), msi_add_suminfo(), and MsiSummaryInfoPersist().

◆ msi_suminfo_set_prop()

UINT msi_suminfo_set_prop ( MSISUMMARYINFO *  si,
UINT  uiProperty,
UINT  uiDataType,
INT  iValue,
FILETIME *  pftValue,
awcstring *  str 
)

Definition at line 895 of file suminfo.c.

897{
898 UINT type = get_type( uiProperty );
899 if (type == VT_EMPTY || type != uiDataType)
901
902 if (uiDataType == VT_LPSTR && !str->str.a)
904
905 if (uiDataType == VT_FILETIME && !pftValue)
907
908 return set_prop( si, uiProperty, type, iValue, pftValue, str );
909}
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define ERROR_DATATYPE_MISMATCH
Definition: winerror.h:1335

Referenced by admin_update_package_info(), MsiSummaryInfoSetPropertyA(), and MsiSummaryInfoSetPropertyW().

◆ MsiCreateTransformSummaryInfoA()

UINT WINAPI MsiCreateTransformSummaryInfoA ( MSIHANDLE  db,
MSIHANDLE  db_ref,
const char *  transform,
int  error,
int  validation 
)

Definition at line 1243 of file suminfo.c.

1245{
1246 UINT r;
1247 WCHAR *transformW = NULL;
1248
1249 TRACE( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation );
1250
1251 if (transform && !(transformW = strdupAtoW( transform )))
1252 return ERROR_OUTOFMEMORY;
1253
1254 r = MsiCreateTransformSummaryInfoW( db, db_ref, transformW, error, validation );
1255 free( transformW );
1256 return r;
1257}
UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error, int validation)
Definition: suminfo.c:1259
GLuint GLenum GLenum transform
Definition: glext.h:9407
#define debugstr_a
Definition: kernel32.h:31
#define error(str)
Definition: mkdosfs.c:1605

Referenced by generate_transform(), and test_invalid_functions().

◆ MsiCreateTransformSummaryInfoW()

UINT WINAPI MsiCreateTransformSummaryInfoW ( MSIHANDLE  db,
MSIHANDLE  db_ref,
const WCHAR *  transform,
int  error,
int  validation 
)

Definition at line 1259 of file suminfo.c.

1261{
1262 FIXME( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation );
1263 return ERROR_FUNCTION_FAILED;
1264}
#define debugstr_w
Definition: kernel32.h:32

Referenced by MsiCreateTransformSummaryInfoA().

◆ MsiGetSummaryInformationA()

UINT WINAPI MsiGetSummaryInformationA ( MSIHANDLE  hDatabase,
const char *  szDatabase,
UINT  uiUpdateCount,
MSIHANDLE *  pHandle 
)

Definition at line 588 of file suminfo.c.

590{
591 WCHAR *szwDatabase = NULL;
592 UINT ret;
593
594 TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_a(szDatabase), uiUpdateCount, pHandle );
595
596 if( szDatabase )
597 {
598 szwDatabase = strdupAtoW( szDatabase );
599 if( !szwDatabase )
601 }
602
603 ret = MsiGetSummaryInformationW(hDatabase, szwDatabase, uiUpdateCount, pHandle);
604
605 free( szwDatabase );
606
607 return ret;
608}
UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
Definition: suminfo.c:518

Referenced by helper_createpackage(), set_admin_summary_info(), set_suminfo(), set_suminfo_prop(), set_summary_dword(), set_summary_info(), set_summary_str(), set_transform_summary_info(), test_db(), test_emptypackage(), test_streamtable(), test_suminfo(), test_suminfo_import(), test_summary_binary(), and write_msi_summary_info().

◆ MsiGetSummaryInformationW()

UINT WINAPI MsiGetSummaryInformationW ( MSIHANDLE  hDatabase,
const WCHAR *  szDatabase,
UINT  uiUpdateCount,
MSIHANDLE *  pHandle 
)

Definition at line 518 of file suminfo.c.

520{
522 MSIDATABASE *db;
523 UINT ret;
524
525 TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle );
526
527 if( !pHandle )
529
530 if( szDatabase && szDatabase[0] )
531 {
532 LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_DIRECT : MSIDBOPEN_READONLY;
533
534 ret = MSI_OpenDatabaseW( szDatabase, persist, &db );
535 if( ret != ERROR_SUCCESS )
536 return ret;
537 }
538 else
539 {
540 db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
541 if( !db )
542 {
543 MSIHANDLE remote, remote_suminfo;
544
545 if (!(remote = msi_get_remote(hDatabase)))
547
548 __TRY
549 {
550 ret = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount, &remote_suminfo);
551 }
553 {
555 }
557
558 if (!ret)
559 *pHandle = alloc_msi_remote_handle(remote_suminfo);
560
561 return ret;
562 }
563 }
564
565 ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
566 if (ret != ERROR_SUCCESS)
567 ret = msi_get_db_suminfo( db, uiUpdateCount, &si );
568 if (ret != ERROR_SUCCESS)
569 {
570 if ((si = create_suminfo( db->storage, uiUpdateCount )))
572 }
573
574 if (ret == ERROR_SUCCESS)
575 {
576 *pHandle = alloc_msihandle( &si->hdr );
577 if( *pHandle )
579 else
581 msiobj_release( &si->hdr );
582 }
583
584 msiobj_release( &db->hdr );
585 return ret;
586}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
Definition: rpc.c:184
#define __TRY
Definition: compat.h:80
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define __ENDTRY
Definition: compat.h:82
UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
Definition: database.c:140
MSIHANDLE alloc_msihandle(MSIOBJECTHDR *obj)
Definition: handle.c:111
MSIHANDLE msi_get_remote(MSIHANDLE handle)
Definition: handle.c:183
MSIHANDLE alloc_msi_remote_handle(MSIHANDLE remote)
Definition: handle.c:135
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
Definition: handle.c:158
#define GetExceptionCode
Definition: excpt.h:83
#define MSIHANDLETYPE_DATABASE
Definition: msipriv.h:746
#define MSIDBOPEN_DIRECT
Definition: msiquery.h:68
#define MSIDBOPEN_READONLY
Definition: msiquery.h:66
MSIOBJECTHDR hdr
Definition: msipriv.h:108
const uint16_t * LPCWSTR
Definition: typedefs.h:57
#define __EXCEPT(func)
Definition: exception.h:62
unsigned long MSIHANDLE
Definition: winemsi.idl:27

Referenced by database_invoke(), get_patch_product_codes(), InstallerImpl_SummaryInformation(), MsiGetSummaryInformationA(), and s_remote_DatabaseGetSummaryInformation().

◆ MsiSummaryInfoGetPropertyA()

UINT WINAPI MsiSummaryInfoGetPropertyA ( MSIHANDLE  handle,
UINT  uiProperty,
UINT *  puiDataType,
INT *  piValue,
FILETIME *  pftValue,
char *  szValueBuf,
DWORD *  pcchValueBuf 
)

Definition at line 741 of file suminfo.c.

743{
746 UINT r;
747
748 TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
749 pcchValueBuf );
750
751 if (uiProperty >= MSI_MAX_PROPS)
752 {
753 if (puiDataType) *puiDataType = VT_EMPTY;
755 }
756
758 {
759 MSIHANDLE remote;
760 WCHAR *buf = NULL;
761
762 if (!(remote = msi_get_remote( handle )))
764
765 __TRY
766 {
767 r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
768 }
770 {
772 }
774
775 if (!r && buf)
776 {
777 r = msi_strncpyWtoA( buf, -1, szValueBuf, pcchValueBuf, TRUE );
778 }
779
781 return r;
782 }
783
784 str.unicode = FALSE;
785 str.str.a = szValueBuf;
786
787 r = msi_suminfo_get_prop( si, uiProperty, puiDataType, piValue, pftValue, &str, pcchValueBuf );
788 msiobj_release( &si->hdr );
789 return r;
790}
#define FALSE
Definition: types.h:117
UINT msi_strncpyWtoA(const WCHAR *str, int lenW, char *buf, DWORD *sz, BOOL remote)
Definition: install.c:190
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define midl_user_free
Definition: rpc.h:41
#define ERROR_UNKNOWN_PROPERTY
Definition: winerror.h:1314

Referenced by test_db(), test_suminfo(), test_suminfo_import(), and test_summary_binary().

◆ MsiSummaryInfoGetPropertyCount()

UINT WINAPI MsiSummaryInfoGetPropertyCount ( MSIHANDLE  hSummaryInfo,
UINT *  pCount 
)

Definition at line 610 of file suminfo.c.

611{
613
614 TRACE( "%lu, %p\n", hSummaryInfo, pCount );
615
617 if( !si )
618 {
619 MSIHANDLE remote;
620 UINT ret;
621
622 if (!(remote = msi_get_remote( hSummaryInfo )))
624
625 __TRY
626 {
627 ret = remote_SummaryInfoGetPropertyCount( remote, pCount );
628 }
630 {
632 }
634
635 return ret;
636 }
637
638 if( pCount )
639 *pCount = get_property_count( si->property );
640 msiobj_release( &si->hdr );
641
642 return ERROR_SUCCESS;
643}

Referenced by s_remote_SummaryInfoGetPropertyCount(), summaryinfo_invoke(), test_db(), test_suminfo(), test_suminfo_import(), and test_summary_binary().

◆ MsiSummaryInfoGetPropertyW()

UINT WINAPI MsiSummaryInfoGetPropertyW ( MSIHANDLE  handle,
UINT  uiProperty,
UINT *  puiDataType,
INT *  piValue,
FILETIME *  pftValue,
WCHAR *  szValueBuf,
DWORD *  pcchValueBuf 
)

Definition at line 792 of file suminfo.c.

794{
797 UINT r;
798
799 TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
800 pcchValueBuf );
801
802 if (uiProperty >= MSI_MAX_PROPS)
803 {
804 if (puiDataType) *puiDataType = VT_EMPTY;
806 }
807
809 {
810 MSIHANDLE remote;
811 WCHAR *buf = NULL;
812
813 if (!(remote = msi_get_remote( handle )))
815
816 __TRY
817 {
818 r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
819 }
821 {
823 }
825
826 if (!r && buf)
827 r = msi_strncpyW( buf, -1, szValueBuf, pcchValueBuf );
828
830 return r;
831 }
832
833 str.unicode = TRUE;
834 str.str.w = szValueBuf;
835
836 r = msi_suminfo_get_prop( si, uiProperty, puiDataType, piValue, pftValue, &str, pcchValueBuf );
837 msiobj_release( &si->hdr );
838 return r;
839}
UINT msi_strncpyW(const WCHAR *str, int len, WCHAR *buf, DWORD *sz)
Definition: install.c:213

Referenced by get_patch_product_codes(), s_remote_SummaryInfoGetProperty(), and summaryinfo_invoke().

◆ MsiSummaryInfoPersist()

◆ MsiSummaryInfoSetPropertyA()

UINT WINAPI MsiSummaryInfoSetPropertyA ( MSIHANDLE  handle,
UINT  uiProperty,
UINT  uiDataType,
INT  iValue,
FILETIME *  pftValue,
const char *  szValue 
)

Definition at line 941 of file suminfo.c.

943{
946 UINT ret;
947
948 TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_a(szValue) );
949
951 {
952 MSIHANDLE remote;
953
954 if ((remote = msi_get_remote( handle )))
955 {
956 WARN("MsiSummaryInfoSetProperty not allowed during a custom action!\n");
958 }
959
961 }
962
963 str.unicode = FALSE;
964 str.str.a = szValue;
965
966 ret = msi_suminfo_set_prop( si, uiProperty, uiDataType, iValue, pftValue, &str );
967 msiobj_release( &si->hdr );
968 return ret;
969}
UINT msi_suminfo_set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:895

Referenced by helper_createpackage(), set_admin_summary_info(), set_suminfo(), set_suminfo_prop(), set_summary_dword(), set_summary_info(), set_summary_str(), set_transform_summary_info(), test_db(), test_streamtable(), test_suminfo(), test_summary_binary(), and write_msi_summary_info().

◆ MsiSummaryInfoSetPropertyW()

UINT WINAPI MsiSummaryInfoSetPropertyW ( MSIHANDLE  handle,
UINT  uiProperty,
UINT  uiDataType,
INT  iValue,
FILETIME *  pftValue,
const WCHAR *  szValue 
)

Definition at line 911 of file suminfo.c.

913{
916 UINT ret;
917
918 TRACE( "%lu, %u, %u, %d, %p, %s\n", handle, uiProperty, uiDataType, iValue, pftValue, debugstr_w(szValue) );
919
921 {
922 MSIHANDLE remote;
923
924 if ((remote = msi_get_remote( handle )))
925 {
926 WARN("MsiSummaryInfoSetProperty not allowed during a custom action!\n");
928 }
929
931 }
932
933 str.unicode = TRUE;
934 str.str.w = szValue;
935
936 ret = msi_suminfo_set_prop( si, uiProperty, uiDataType, iValue, pftValue, &str );
937 msiobj_release( &si->hdr );
938 return ret;
939}

Referenced by summaryinfo_invoke(), and test_db().

◆ parse_filetime()

static void parse_filetime ( LPCWSTR  str,
FILETIME *  ft 
)
static

Definition at line 988 of file suminfo.c.

989{
990 SYSTEMTIME lt, utc;
991 const WCHAR *p = str;
992 WCHAR *end;
993
994 memset( &lt, 0, sizeof(lt) );
995
996 /* YYYY/MM/DD hh:mm:ss */
997
998 while (iswspace( *p )) p++;
999
1000 lt.wYear = wcstol( p, &end, 10 );
1001 if (*end != '/') return;
1002 p = end + 1;
1003
1004 lt.wMonth = wcstol( p, &end, 10 );
1005 if (*end != '/') return;
1006 p = end + 1;
1007
1008 lt.wDay = wcstol( p, &end, 10 );
1009 if (*end != ' ') return;
1010 p = end + 1;
1011
1012 while (iswspace( *p )) p++;
1013
1014 lt.wHour = wcstol( p, &end, 10 );
1015 if (*end != ':') return;
1016 p = end + 1;
1017
1018 lt.wMinute = wcstol( p, &end, 10 );
1019 if (*end != ':') return;
1020 p = end + 1;
1021
1022 lt.wSecond = wcstol( p, &end, 10 );
1023
1025 SystemTimeToFileTime( &utc, ft );
1026}
static DOUBLE utc(DOUBLE time, DateInstance *date)
Definition: date.c:315
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:153
BOOL WINAPI TzSpecificLocalTimeToSystemTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime)
Definition: timezone.c:421
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752
GLfloat GLfloat p
Definition: glext.h:8902
#define iswspace(_c)
Definition: ctype.h:669
#define memset(x, y, z)
Definition: compat.h:39
WORD wSecond
Definition: minwinbase.h:262
WORD wMinute
Definition: minwinbase.h:261

Referenced by parse_prop().

◆ parse_prop()

static UINT parse_prop ( LPCWSTR  prop,
LPCWSTR  value,
UINT *  pid,
INT *  int_value,
FILETIME *  ft_value,
awcstring *  str_value 
)
static

Definition at line 1028 of file suminfo.c.

1030{
1031 *pid = wcstol( prop, NULL, 10 );
1032 switch (*pid)
1033 {
1034#ifdef __REACTOS__
1035 case PID_CODEPAGE_MSI:
1036#else
1037 case PID_CODEPAGE:
1038#endif
1039 case PID_WORDCOUNT:
1040 case PID_CHARCOUNT:
1041#ifdef __REACTOS__
1042 case PID_SECURITY_MSI:
1043#else
1044 case PID_SECURITY:
1045#endif
1046 case PID_PAGECOUNT:
1047 *int_value = wcstol( value, NULL, 10 );
1048 break;
1049
1050 case PID_LASTPRINTED:
1051 case PID_CREATE_DTM:
1052 case PID_LASTSAVE_DTM:
1053 parse_filetime( value, ft_value );
1054 break;
1055
1056 case PID_SUBJECT:
1057 case PID_AUTHOR:
1058 case PID_KEYWORDS:
1059 case PID_COMMENTS:
1060 case PID_TEMPLATE:
1061 case PID_LASTAUTHOR:
1062 case PID_REVNUMBER:
1063 case PID_APPNAME:
1064 case PID_TITLE:
1065 str_value->str.w = value;
1066 str_value->unicode = TRUE;
1067 break;
1068
1069 default:
1070 WARN("unhandled prop id %u\n", *pid);
1071 return ERROR_FUNCTION_FAILED;
1072 }
1073
1074 return ERROR_SUCCESS;
1075}
static void parse_filetime(LPCWSTR str, FILETIME *ft)
Definition: suminfo.c:988
BOOL unicode
Definition: msipriv.h:772
LPCWSTR w
Definition: msipriv.h:775
union awcstring::@617 str
Definition: pdh_main.c:64

Referenced by msi_add_suminfo().

◆ propvar_changetype()

static UINT propvar_changetype ( PROPVARIANT *  changed,
PROPVARIANT *  property,
VARTYPE  vt 
)
static

Definition at line 169 of file suminfo.c.

170{
171 HRESULT hr;
172 HMODULE propsys = LoadLibraryA("propsys.dll");
173 pPropVariantChangeType = (void *)GetProcAddress(propsys, "PropVariantChangeType");
174
175 if (!pPropVariantChangeType)
176 {
177 ERR("PropVariantChangeType function missing!\n");
179 }
180
181 hr = pPropVariantChangeType(changed, property, 0, vt);
183}
#define GetProcAddress(x, y)
Definition: compat.h:753
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
#define S_OK
Definition: intsafe.h:52
static IPropertySystem propsys
Definition: propsys_main.c:202

Referenced by read_properties_from_data().

◆ read_properties_from_data()

static void read_properties_from_data ( PROPVARIANT *  prop,
LPBYTE  data,
DWORD  sz 
)
static

Definition at line 186 of file suminfo.c.

187{
188 UINT type;
189 DWORD i, size;
190 struct property_data *propdata;
191 PROPVARIANT property, *ptr;
192 PROPVARIANT changed;
193 struct property_id_offset *idofs;
194 struct property_section_header *section_hdr;
195
196 section_hdr = (struct property_section_header *) &data[0];
197 idofs = (struct property_id_offset *)&data[SECT_HDR_SIZE];
198
199 /* now set all the properties */
200 for( i = 0; i < section_hdr->cProperties; i++ )
201 {
202 if( idofs[i].propid >= MSI_MAX_PROPS )
203 {
204 ERR( "unknown property ID %lu\n", idofs[i].propid );
205 break;
206 }
207
208 type = get_type( idofs[i].propid );
209 if( type == VT_EMPTY )
210 {
211 ERR( "propid %lu has unknown type\n", idofs[i].propid );
212 break;
213 }
214
215 propdata = (struct property_data *)&data[ idofs[i].dwOffset ];
216
217 /* check we don't run off the end of the data */
218 size = sz - idofs[i].dwOffset - sizeof(DWORD);
219 if( sizeof(DWORD) > size ||
220 ( propdata->type == VT_FILETIME && sizeof(FILETIME) > size ) ||
221 ( propdata->type == VT_LPSTR && (propdata->u.str.len + sizeof(DWORD)) > size ) )
222 {
223 ERR("not enough data\n");
224 break;
225 }
226
227 property.vt = propdata->type;
228 if( propdata->type == VT_LPSTR )
229 {
230 char *str = malloc( propdata->u.str.len );
231 memcpy( str, propdata->u.str.str, propdata->u.str.len );
232 str[ propdata->u.str.len - 1 ] = 0;
233 property.pszVal = str;
234 }
235 else if( propdata->type == VT_FILETIME )
236 property.filetime = propdata->u.ft;
237 else if( propdata->type == VT_I2 )
238 property.iVal = propdata->u.i2;
239 else if( propdata->type == VT_I4 )
240 property.lVal = propdata->u.i4;
241
242 /* check the type is the same as we expect */
243 if( type != propdata->type )
244 {
245 propvar_changetype(&changed, &property, type);
246 ptr = &changed;
247 }
248 else
249 ptr = &property;
250
251 prop[ idofs[i].propid ] = *ptr;
252 }
253}
static UINT propvar_changetype(PROPVARIANT *changed, PROPVARIANT *property, VARTYPE vt)
Definition: suminfo.c:169
GLsizeiptr size
Definition: glext.h:5919
struct _FILETIME FILETIME
static PVOID ptr
Definition: dispmode.c:27
#define DWORD
Definition: nt_native.h:44
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2033
union property_data::@622 u
BYTE str[1]
Definition: suminfo.c:81
SHORT i2
Definition: suminfo.c:77
FILETIME ft
Definition: suminfo.c:78
DWORD type
Definition: suminfo.c:74

Referenced by load_summary_info().

◆ s_remote_SummaryInfoGetProperty()

UINT __cdecl s_remote_SummaryInfoGetProperty ( MSIHANDLE  suminfo,
UINT  property,
UINT *  type,
INT *  value,
FILETIME *  ft,
LPWSTR *  buf 
)

Definition at line 1325 of file suminfo.c.

1327{
1328 WCHAR empty[1];
1329 DWORD size = 0;
1330 UINT r;
1331
1333 if (r == ERROR_MORE_DATA)
1334 {
1335 size++;
1336 *buf = midl_user_allocate( size * sizeof(WCHAR) );
1337 if (!*buf) return ERROR_OUTOFMEMORY;
1339 }
1340 return r;
1341}
static const CHAR suminfo[]
Definition: db.c:2166
static const WCHAR empty[1]
Definition: string.c:47
UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf)
Definition: suminfo.c:792
#define midl_user_allocate
Definition: rpc.h:40

◆ s_remote_SummaryInfoGetPropertyCount()

UINT __cdecl s_remote_SummaryInfoGetPropertyCount ( MSIHANDLE  suminfo,
UINT *  count 
)

Definition at line 1320 of file suminfo.c.

1321{
1323}
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, UINT *pCount)
Definition: suminfo.c:610

◆ save_prop()

static UINT save_prop ( MSISUMMARYINFO *  si,
HANDLE  handle,
UINT  row 
)
static

Definition at line 1118 of file suminfo.c.

1119{
1120 static const char fmt_systemtime[] = "%04u/%02u/%02u %02u:%02u:%02u";
1121 char data[36]; /* largest string: YYYY/MM/DD hh:mm:ss */
1122 static const char fmt_begin[] = "%u\t";
1123 static const char data_end[] = "\r\n";
1124 static const char fmt_int[] = "%u";
1125 UINT r, data_type;
1126 SYSTEMTIME system_time;
1127 FILETIME file_time;
1128 INT int_value;
1129 awstring str;
1130 DWORD len, sz;
1131
1132 str.unicode = FALSE;
1133 str.str.a = NULL;
1134 len = 0;
1135 r = msi_suminfo_get_prop( si, row, &data_type, &int_value, &file_time, &str, &len );
1136 if (r != ERROR_SUCCESS && r != ERROR_MORE_DATA)
1137 return r;
1138 if (data_type == VT_EMPTY)
1139 return ERROR_SUCCESS; /* property not set */
1140 sz = sprintf( data, fmt_begin, row );
1141 if (!WriteFile( handle, data, sz, &sz, NULL ))
1142 return ERROR_WRITE_FAULT;
1143
1144 switch( data_type )
1145 {
1146 case VT_I2:
1147 case VT_I4:
1148 sz = sprintf( data, fmt_int, int_value );
1149 if (!WriteFile( handle, data, sz, &sz, NULL ))
1150 return ERROR_WRITE_FAULT;
1151 break;
1152 case VT_LPSTR:
1153 len++;
1154 if (!(str.str.a = malloc( len )))
1155 return ERROR_OUTOFMEMORY;
1157 if (r != ERROR_SUCCESS)
1158 {
1159 free( str.str.a );
1160 return r;
1161 }
1162 sz = len;
1163 if (!WriteFile( handle, str.str.a, sz, &sz, NULL ))
1164 {
1165 free( str.str.a );
1166 return ERROR_WRITE_FAULT;
1167 }
1168 free( str.str.a );
1169 break;
1170 case VT_FILETIME:
1171 if (!FileTimeToSystemTime( &file_time, &system_time ))
1172 return ERROR_FUNCTION_FAILED;
1173 sz = sprintf( data, fmt_systemtime, system_time.wYear, system_time.wMonth,
1174 system_time.wDay, system_time.wHour, system_time.wMinute,
1175 system_time.wSecond );
1176 if (!WriteFile( handle, data, sz, &sz, NULL ))
1177 return ERROR_WRITE_FAULT;
1178 break;
1179 case VT_EMPTY:
1180 /* cannot reach here, property not set */
1181 break;
1182 default:
1183 FIXME( "Unknown property variant type\n" );
1184 return ERROR_FUNCTION_FAILED;
1185 }
1186
1187 sz = ARRAY_SIZE(data_end) - 1;
1188 if (!WriteFile( handle, data_end, sz, &sz, NULL ))
1189 return ERROR_WRITE_FAULT;
1190
1191 return ERROR_SUCCESS;
1192}
#define ARRAY_SIZE(A)
Definition: main.h:20
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:183
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
Definition: typeof.h:78
enum wined3d_data_type data_type
Definition: glsl_shader.c:71
#define sprintf
Definition: sprintf.c:45
#define ERROR_WRITE_FAULT
Definition: winerror.h:254

Referenced by msi_export_suminfo().

◆ save_summary_info()

static UINT save_summary_info ( const MSISUMMARYINFO *  si,
IStream *  stm 
)
static

Definition at line 379 of file suminfo.c.

380{
382 struct property_set_header set_hdr;
383 struct format_id_offset format_hdr;
384 struct property_section_header section_hdr;
385 struct property_id_offset idofs[MSI_MAX_PROPS];
386 LPBYTE data = NULL;
387 ULONG count, sz;
388 HRESULT r;
389 int i;
390
391 /* write the header */
392 sz = sizeof set_hdr;
393 memset( &set_hdr, 0, sz );
394 set_hdr.wByteOrder = 0xfffe;
395 set_hdr.wFormat = 0;
396 set_hdr.dwOSVer = 0x00020005; /* build 5, platform id 2 */
397 /* set_hdr.clsID is {00000000-0000-0000-0000-000000000000} */
398 set_hdr.reserved = 1;
399 r = IStream_Write( stm, &set_hdr, sz, &count );
400 if( FAILED(r) || count != sz )
401 return ret;
402
403 /* write the format header */
404 sz = sizeof format_hdr;
405 format_hdr.fmtid = FMTID_SummaryInformation;
406 format_hdr.dwOffset = sizeof format_hdr + sizeof set_hdr;
407 r = IStream_Write( stm, &format_hdr, sz, &count );
408 if( FAILED(r) || count != sz )
409 return ret;
410
411 /* add up how much space the data will take and calculate the offsets */
412 section_hdr.cbSection = sizeof section_hdr;
413 section_hdr.cbSection += (get_property_count( si->property ) * sizeof idofs[0]);
414 section_hdr.cProperties = 0;
415 for( i = 0; i < MSI_MAX_PROPS; i++ )
416 {
417 sz = write_property_to_data( &si->property[i], NULL );
418 if( !sz )
419 continue;
420 idofs[ section_hdr.cProperties ].propid = i;
421 idofs[ section_hdr.cProperties ].dwOffset = section_hdr.cbSection;
422 section_hdr.cProperties++;
423 section_hdr.cbSection += sz;
424 }
425
426 data = calloc( 1, section_hdr.cbSection );
427
428 sz = 0;
429 memcpy( &data[sz], &section_hdr, sizeof section_hdr );
430 sz += sizeof section_hdr;
431
432 memcpy( &data[sz], idofs, section_hdr.cProperties * sizeof idofs[0] );
433 sz += section_hdr.cProperties * sizeof idofs[0];
434
435 /* write out the data */
436 for( i = 0; i < MSI_MAX_PROPS; i++ )
437 sz += write_property_to_data( &si->property[i], &data[sz] );
438
439 r = IStream_Write( stm, data, sz, &count );
440 free( data );
441 if( FAILED(r) || count != sz )
442 return ret;
443
444 return ERROR_SUCCESS;
445}
static UINT write_property_to_data(const PROPVARIANT *prop, LPBYTE data)
Definition: suminfo.c:352
#define calloc
Definition: rosglue.h:14

Referenced by msi_suminfo_persist().

◆ set_prop()

static UINT set_prop ( MSISUMMARYINFO *  si,
UINT  uiProperty,
UINT  type,
INT  iValue,
FILETIME *  pftValue,
awcstring *  str 
)
static

Definition at line 841 of file suminfo.c.

843{
844 PROPVARIANT *prop;
845 UINT len;
846
847 TRACE("%p, %u, %u, %d, %p, %p\n", si, uiProperty, type, iValue, pftValue, str );
848
849 prop = &si->property[uiProperty];
850
851 if( prop->vt == VT_EMPTY )
852 {
853 if( !si->update_count )
855
856 si->update_count--;
857 }
858 else if( prop->vt != type )
859 return ERROR_SUCCESS;
860
861 free_prop( prop );
862 prop->vt = type;
863 switch( type )
864 {
865 case VT_I4:
866 prop->lVal = iValue;
867 break;
868 case VT_I2:
869 prop->iVal = iValue;
870 break;
871 case VT_FILETIME:
872 prop->filetime = *pftValue;
873 break;
874 case VT_LPSTR:
875 if( str->unicode )
876 {
877 len = WideCharToMultiByte( CP_ACP, 0, str->str.w, -1,
878 NULL, 0, NULL, NULL );
879 prop->pszVal = malloc( len );
880 WideCharToMultiByte( CP_ACP, 0, str->str.w, -1,
881 prop->pszVal, len, NULL, NULL );
882 }
883 else
884 {
885 len = lstrlenA( str->str.a ) + 1;
886 prop->pszVal = malloc( len );
887 lstrcpyA( prop->pszVal, str->str.a );
888 }
889 break;
890 }
891
892 return ERROR_SUCCESS;
893}
#define WideCharToMultiByte
Definition: compat.h:111
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100

Referenced by AMVideoProcAmp_Set(), msi_add_suminfo(), and msi_suminfo_set_prop().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( msi  )

◆ write_dword()

static DWORD write_dword ( LPBYTE  data,
DWORD  ofs,
DWORD  val 
)
static

Definition at line 324 of file suminfo.c.

325{
326 if( data )
327 {
328 data[ofs++] = val&0xff;
329 data[ofs++] = (val>>8)&0xff;
330 data[ofs++] = (val>>16)&0xff;
331 data[ofs++] = (val>>24)&0xff;
332 }
333 return 4;
334}
GLuint GLfloat * val
Definition: glext.h:7180

Referenced by write_filetime(), write_property_to_data(), and write_string().

◆ write_filetime()

static DWORD write_filetime ( LPBYTE  data,
DWORD  ofs,
const FILETIME *  ft 
)
static

Definition at line 336 of file suminfo.c.

337{
338 write_dword( data, ofs, ft->dwLowDateTime );
339 write_dword( data, ofs + 4, ft->dwHighDateTime );
340 return 8;
341}
static DWORD write_dword(LPBYTE data, DWORD ofs, DWORD val)
Definition: suminfo.c:324
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65

Referenced by write_property_to_data().

◆ write_property_to_data()

static UINT write_property_to_data ( const PROPVARIANT *  prop,
LPBYTE  data 
)
static

Definition at line 352 of file suminfo.c.

353{
354 DWORD sz = 0;
355
356 if( prop->vt == VT_EMPTY )
357 return sz;
358
359 /* add the type */
360 sz += write_dword( data, sz, prop->vt );
361 switch( prop->vt )
362 {
363 case VT_I2:
364 sz += write_dword( data, sz, prop->iVal );
365 break;
366 case VT_I4:
367 sz += write_dword( data, sz, prop->lVal );
368 break;
369 case VT_FILETIME:
370 sz += write_filetime( data, sz, &prop->filetime );
371 break;
372 case VT_LPSTR:
373 sz += write_string( data, sz, prop->pszVal );
374 break;
375 }
376 return sz;
377}
static DWORD write_filetime(LPBYTE data, DWORD ofs, const FILETIME *ft)
Definition: suminfo.c:336
static DWORD write_string(LPBYTE data, DWORD ofs, LPCSTR str)
Definition: suminfo.c:343

Referenced by save_summary_info().

◆ write_string()

static DWORD write_string ( LPBYTE  data,
DWORD  ofs,
LPCSTR  str 
)
static

Definition at line 343 of file suminfo.c.

344{
345 DWORD len = lstrlenA( str ) + 1;
346 write_dword( data, ofs, len );
347 if( data )
348 memcpy( &data[ofs + 4], str, len );
349 return (7 + len) & ~3;
350}

Referenced by write_property_to_data().

Variable Documentation

◆ flags

REFPROPVARIANT PROPVAR_CHANGE_FLAGS flags

Definition at line 90 of file suminfo.c.

◆ propvarSrc

REFPROPVARIANT propvarSrc

Definition at line 89 of file suminfo.c.

Referenced by PropVariantChangeType(), and test_copy().

◆ vt

REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt

Definition at line 90 of file suminfo.c.

Referenced by _call_change_type(), _change_type_fail(), _get_attr_node_value(), CRegPropertyBag::_ReadBinary(), _VarChangeTypeExWrap(), add_func_info(), Builtin_Invoke(), change_type(), check_safearray(), check_uia_rect_val_(), compare_metadata(), copy_from_variant(), copy_to_variant(), encode_type(), encode_var(), expect(), GdipGetAllPropertyItems(), GdipGetPropertyIdList(), get_element_size(), get_property_count(), get_type_alignment(), get_type_size(), get_type_vt(), get_ulong_val(), get_union_type(), Global_VarType(), iewnd_OnNotify(), init_test_dispatch(), is_arg_type_supported(), IsValidVariantClearVT(), IsValidVariantCopyIndVT(), LPSAFEARRAY_UserMarshal(), LPSAFEARRAY_UserUnmarshal(), MapSCIDToShell32FsColumn(), PropertyStorage_ReadMultiple(), PropertyStorage_ReadProperty(), propvar_changetype(), PROPVAR_ConvertFILETIME(), propvar_validatetype(), PropVariantChangeType(), CMemPropertyBag::Read(), CRegPropertyBag::Read(), CIniPropertyBag::Read(), CDesktopUpgradePropertyBag::Read(), ResetTest(), SAFEARRAY_Create(), SAFEARRAY_CreateVector(), SAFEARRAY_GetUnionType(), SAFEARRAY_GetVTSize(), SAFEARRAY_SetFeatures(), SafeArrayAllocDescriptorEx(), SafeArrayCopy(), SafeArrayCreate(), SafeArrayCreateEx(), SafeArrayCreateVector(), SafeArrayCreateVectorEx(), SafeArrayGetVartype(), set_custdata(), SH32_GetDetailsOfPKeyAsVariant(), SHELL_CreateVariantBufferEx(), SHELL_GetDetailsOfColumnAsVariant(), test_cache_req_sa_(), test_container_properties(), test_CreateMetadataWriterFromReader(), test_CUIAutomation_value_conversion(), test_EmptyChangeTypeEx(), test_ErrorChangeTypeEx(), test_find_sa_results_(), test_GdiGradientFill(), test_ifd_content(), test_IUnknownChangeTypeEx(), test_marshal_LPSAFEARRAY(), test_marshal_VARIANT(), test_metadata_App1(), test_metadata_cHRM(), test_metadata_gAMA(), test_metadata_gif(), test_metadata_hIST(), test_metadata_tEXt(), test_metadata_unknown(), test_NullChangeTypeEx(), test_propertybag_getpropertyinfo(), test_queryreader(), test_safearray(), test_SafeArrayChangeTypeEx(), test_SafeArrayCreateLockDestroy(), test_specific_encoder_properties(), test_SummaryInfo(), test_validtypes(), test_VarAbs(), test_VarFix(), test_VariantClear(), test_VariantCopy(), test_VariantCopyInd(), test_VarInt(), test_VarNeg(), test_VarNot(), test_VectorCreateLockDestroy(), typedescvt_to_variantvt(), uia_get_clientside_provider(), uia_iface_IntSafeArrayToNativeArray(), userdefined_to_variantvt(), VarCmp(), variant_change_type(), VARIANT_Coerce(), VARIANT_CoerceArray(), VARIANT_CopyData(), VARIANT_FromDisp(), VARIANT_NumberFromBstr(), VARIANT_UserFree(), VARIANT_ValidateType(), VariantChangeType(), VariantChangeType_ChangeType(), VariantChangeTypeEx(), VariantCopyInd(), VarOr(), VarXor(), vt_to_itemtype(), WMSFT_append_typedesc(), write_default_value(), write_int_value(), write_oleaut_tfs(), and write_var_desc().