ReactOS 0.4.16-dev-736-g28b802b
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_s.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 MSISUMMARYINFOcreate_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)
 
static UINT 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)
 
static UINT 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)
 
static UINT 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 93 of file suminfo.c.

Function Documentation

◆ create_suminfo()

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

Definition at line 448 of file suminfo.c.

449{
450 MSISUMMARYINFO *si;
451
453 return NULL;
454
455 si->update_count = update_count;
456 IStorage_AddRef( stg );
457 si->storage = stg;
458
459 return si;
460}
#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:102
#define MSIHANDLETYPE_SUMMARYINFO
Definition: msipriv.h:723
IStorage * storage
Definition: msipriv.h:487
DWORD update_count
Definition: msipriv.h:488

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 95 of file suminfo.c.

96{
97 if (prop->vt == VT_LPSTR )
98 free( prop->pszVal );
99 prop->vt = VT_EMPTY;
100}
#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_prop()

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

Definition at line 646 of file suminfo.c.

648{
649 PROPVARIANT *prop;
651
652 prop = &si->property[uiProperty];
653
654 if( puiDataType )
655 *puiDataType = prop->vt;
656
657 switch( prop->vt )
658 {
659 case VT_I2:
660 if( piValue )
661 *piValue = prop->iVal;
662 break;
663 case VT_I4:
664 if( piValue )
665 *piValue = prop->lVal;
666 break;
667 case VT_LPSTR:
668 if( pcchValueBuf )
669 {
670 DWORD len = 0;
671
672 if( str->unicode )
673 {
674 len = MultiByteToWideChar( CP_ACP, 0, prop->pszVal, -1, NULL, 0 ) - 1;
675 MultiByteToWideChar( CP_ACP, 0, prop->pszVal, -1, str->str.w, *pcchValueBuf );
676 }
677 else
678 {
679 len = lstrlenA( prop->pszVal );
680 if( str->str.a )
681 lstrcpynA(str->str.a, prop->pszVal, *pcchValueBuf );
682 }
683 if (len >= *pcchValueBuf)
685 *pcchValueBuf = len;
686 }
687 break;
688 case VT_FILETIME:
689 if( pftValue )
690 *pftValue = prop->filetime;
691 break;
692 case VT_EMPTY:
693 break;
694 default:
695 FIXME("Unknown property variant type\n");
696 break;
697 }
698 return ret;
699}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define CP_ACP
Definition: compat.h:109
#define lstrcpynA
Definition: compat.h:751
#define MultiByteToWideChar
Definition: compat.h:110
@ VT_I4
Definition: compat.h:2298
@ VT_FILETIME
Definition: compat.h:2329
@ VT_I2
Definition: compat.h:2297
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
unsigned int UINT
Definition: ndis.h:50
const WCHAR * str
PROPVARIANT property[MSI_MAX_PROPS]
Definition: msipriv.h:489
int ret

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

◆ get_property_count()

static UINT get_property_count ( const PROPVARIANT *  property)
static

Definition at line 158 of file suminfo.c.

159{
160 UINT i, n = 0;
161
162 if( !property )
163 return n;
164 for( i = 0; i < MSI_MAX_PROPS; i++ )
165 if( property[i].vt != VT_EMPTY )
166 n++;
167 return n;
168}
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
Definition: suminfo.c:91
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
#define MSI_MAX_PROPS
Definition: msipriv.h:482

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

◆ get_type()

static UINT get_type ( UINT  uiProperty)
static

Definition at line 118 of file suminfo.c.

119{
120 switch( uiProperty )
121 {
122#ifdef __REACTOS__
123 case PID_CODEPAGE_MSI:
124#else
125 case PID_CODEPAGE:
126#endif
127 return VT_I2;
128
129 case PID_SUBJECT:
130 case PID_AUTHOR:
131 case PID_KEYWORDS:
132 case PID_COMMENTS:
133 case PID_TEMPLATE:
134 case PID_LASTAUTHOR:
135 case PID_REVNUMBER:
136 case PID_APPNAME:
137 case PID_TITLE:
138 return VT_LPSTR;
139
140 case PID_LASTPRINTED:
141 case PID_CREATE_DTM:
142 case PID_LASTSAVE_DTM:
143 return VT_FILETIME;
144
145 case PID_WORDCOUNT:
146 case PID_CHARCOUNT:
147#ifdef __REACTOS__
148 case PID_SECURITY_MSI:
149#else
150 case PID_SECURITY:
151#endif
152 case PID_PAGECOUNT:
153 return VT_I4;
154 }
155 return VT_EMPTY;
156}
#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(), read_properties_from_data(), and suminfo_set_prop().

◆ HRESULT()

static HRESULT ( WINAPI pPropVariantChangeType)
static

◆ load_summary_info()

static UINT load_summary_info ( MSISUMMARYINFO si,
IStream stm 
)
static

Definition at line 256 of file suminfo.c.

257{
258 struct property_set_header set_hdr;
259 struct format_id_offset format_hdr;
260 struct property_section_header section_hdr;
261 LPBYTE data = NULL;
262 LARGE_INTEGER ofs;
263 ULONG count, sz;
264 HRESULT r;
265
266 TRACE("%p %p\n", si, stm);
267
268 /* read the header */
269 sz = sizeof set_hdr;
270 r = IStream_Read( stm, &set_hdr, sz, &count );
271 if( FAILED(r) || count != sz )
273
274 if( set_hdr.wByteOrder != 0xfffe )
275 {
276 ERR("property set not big-endian %04X\n", set_hdr.wByteOrder);
278 }
279
280 sz = sizeof format_hdr;
281 r = IStream_Read( stm, &format_hdr, sz, &count );
282 if( FAILED(r) || count != sz )
284
285 /* check the format id is correct */
286 if( !IsEqualGUID( &FMTID_SummaryInformation, &format_hdr.fmtid ) )
288
289 /* seek to the location of the section */
290 ofs.QuadPart = format_hdr.dwOffset;
291 r = IStream_Seek( stm, ofs, STREAM_SEEK_SET, NULL );
292 if( FAILED(r) )
294
295 /* read the section itself */
296 sz = SECT_HDR_SIZE;
297 r = IStream_Read( stm, &section_hdr, sz, &count );
298 if( FAILED(r) || count != sz )
300
301 if( section_hdr.cProperties > MSI_MAX_PROPS )
302 {
303 ERR( "too many properties %lu\n", section_hdr.cProperties );
305 }
306
307 data = malloc( section_hdr.cbSection );
308 if( !data )
310
311 memcpy( data, &section_hdr, SECT_HDR_SIZE );
312
313 /* read all the data in one go */
314 sz = section_hdr.cbSection - SECT_HDR_SIZE;
315 r = IStream_Read( stm, &data[ SECT_HDR_SIZE ], sz, &count );
316 if( SUCCEEDED(r) && count == sz )
318 else
319 ERR( "failed to read properties %lu %lu\n", count, sz );
320
321 free( data );
322 return ERROR_SUCCESS;
323}
#define ERR(fmt,...)
Definition: precomp.h:57
#define malloc
Definition: debug_ros.c:4
static void read_properties_from_data(PROPVARIANT *prop, LPBYTE data, DWORD sz)
Definition: suminfo.c:187
#define SECT_HDR_SIZE
Definition: suminfo.c:93
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:985

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 1078 of file suminfo.c.

1079{
1080 UINT r;
1081 int i, j;
1082 MSISUMMARYINFO *si;
1083
1084 r = msi_get_suminfo( db->storage, num_records * (num_columns / 2), &si );
1085 if (r != ERROR_SUCCESS)
1086 {
1087 if (!(si = create_suminfo( db->storage, num_records * (num_columns / 2) )))
1088 return ERROR_OUTOFMEMORY;
1089 r = ERROR_SUCCESS;
1090 }
1091
1092 for (i = 0; i < num_records; i++)
1093 {
1094 for (j = 0; j < num_columns; j += 2)
1095 {
1096 UINT pid;
1097 INT int_value = 0;
1098 FILETIME ft_value;
1099 awcstring str_value;
1100
1101 r = parse_prop( records[i][j], records[i][j + 1], &pid, &int_value, &ft_value, &str_value );
1102 if (r != ERROR_SUCCESS)
1103 goto end;
1104
1105 r = set_prop( si, pid, get_type(pid), int_value, &ft_value, &str_value );
1106 if (r != ERROR_SUCCESS)
1107 goto end;
1108 }
1109 }
1110
1111end:
1112 if (r == ERROR_SUCCESS)
1113 r = suminfo_persist( si );
1114
1115 msiobj_release( &si->hdr );
1116 return r;
1117}
#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:462
static UINT parse_prop(LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value, FILETIME *ft_value, awcstring *str_value)
Definition: suminfo.c:1029
static UINT suminfo_persist(MSISUMMARYINFO *si)
Definition: suminfo.c:972
static MSISUMMARYINFO * create_suminfo(IStorage *stg, UINT update_count)
Definition: suminfo.c:448
static UINT set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:842
static UINT get_type(UINT uiProperty)
Definition: suminfo.c:118
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
MSIOBJECTHDR hdr
Definition: msipriv.h:486
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 102 of file suminfo.c.

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

Referenced by create_suminfo().

◆ msi_export_suminfo()

UINT msi_export_suminfo ( MSIDATABASE db,
HANDLE  handle 
)

Definition at line 1195 of file suminfo.c.

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

Referenced by export_summaryinformation().

◆ msi_get_db_suminfo()

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

Definition at line 492 of file suminfo.c.

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

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 462 of file suminfo.c.

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

Referenced by 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 725 of file suminfo.c.

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

Referenced by check_transform_applicable().

◆ msi_load_suminfo_properties()

UINT msi_load_suminfo_properties ( MSIPACKAGE package)

Definition at line 1267 of file suminfo.c.

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

Referenced by MSI_CreatePackage().

◆ msi_suminfo_dup_string()

LPWSTR msi_suminfo_dup_string ( MSISUMMARYINFO si,
UINT  uiProperty 
)

Definition at line 701 of file suminfo.c.

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

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 713 of file suminfo.c.

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

Referenced by check_transform_applicable(), and parse_suminfo().

◆ MsiCreateTransformSummaryInfoA()

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

Definition at line 1244 of file suminfo.c.

1246{
1247 UINT r;
1248 WCHAR *transformW = NULL;
1249
1250 TRACE( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_a(transform), error, validation );
1251
1252 if (transform && !(transformW = strdupAtoW( transform )))
1253 return ERROR_OUTOFMEMORY;
1254
1255 r = MsiCreateTransformSummaryInfoW( db, db_ref, transformW, error, validation );
1256 free( transformW );
1257 return r;
1258}
UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error, int validation)
Definition: suminfo.c:1260
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 1260 of file suminfo.c.

1262{
1263 FIXME( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation );
1264 return ERROR_FUNCTION_FAILED;
1265}
#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 589 of file suminfo.c.

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

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 519 of file suminfo.c.

521{
522 MSISUMMARYINFO *si;
523 MSIDATABASE *db;
524 UINT ret;
525
526 TRACE( "%lu, %s, %u, %p\n", hDatabase, debugstr_w(szDatabase), uiUpdateCount, pHandle );
527
528 if( !pHandle )
530
531 if( szDatabase && szDatabase[0] )
532 {
533 LPCWSTR persist = uiUpdateCount ? MSIDBOPEN_TRANSACT : MSIDBOPEN_READONLY;
534
535 ret = MSI_OpenDatabaseW( szDatabase, persist, &db );
536 if( ret != ERROR_SUCCESS )
537 return ret;
538 }
539 else
540 {
541 db = msihandle2msiinfo( hDatabase, MSIHANDLETYPE_DATABASE );
542 if( !db )
543 {
544 MSIHANDLE remote, remote_suminfo;
545
546 if (!(remote = msi_get_remote(hDatabase)))
548
549 __TRY
550 {
551 ret = remote_DatabaseGetSummaryInformation(remote, uiUpdateCount, &remote_suminfo);
552 }
554 {
556 }
558
559 if (!ret)
560 *pHandle = alloc_msi_remote_handle(remote_suminfo);
561
562 return ret;
563 }
564 }
565
566 ret = msi_get_suminfo( db->storage, uiUpdateCount, &si );
567 if (ret != ERROR_SUCCESS)
568 ret = msi_get_db_suminfo( db, uiUpdateCount, &si );
569 if (ret != ERROR_SUCCESS)
570 {
571 if ((si = create_suminfo( db->storage, uiUpdateCount )))
573 }
574
575 if (ret == ERROR_SUCCESS)
576 {
577 *pHandle = alloc_msihandle( &si->hdr );
578 if( *pHandle )
580 else
582 msiobj_release( &si->hdr );
583 }
584
585 msiobj_release( &db->hdr );
586 return ret;
587}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define __TRY
Definition: compat.h:80
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define __ENDTRY
Definition: compat.h:82
LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
Definition: custom.c:85
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 MSIHANDLETYPE_DATABASE
Definition: msipriv.h:722
#define MSIDBOPEN_TRANSACT
Definition: msiquery.h:67
#define MSIDBOPEN_READONLY
Definition: msiquery.h:66
#define __EXCEPT(func)
Definition: exception.h:59
#define GetExceptionCode()
Definition: exception.h:68
MSIOBJECTHDR hdr
Definition: msipriv.h:108
unsigned long MSIHANDLE
Definition: winemsi.idl:27
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

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 742 of file suminfo.c.

744{
745 MSISUMMARYINFO *si;
747 UINT r;
748
749 TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
750 pcchValueBuf );
751
752 if (uiProperty >= MSI_MAX_PROPS)
753 {
754 if (puiDataType) *puiDataType = VT_EMPTY;
756 }
757
759 {
760 MSIHANDLE remote;
761 WCHAR *buf = NULL;
762
763 if (!(remote = msi_get_remote( handle )))
765
766 __TRY
767 {
768 r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
769 }
771 {
773 }
775
776 if (!r && buf)
777 {
778 r = msi_strncpyWtoA( buf, -1, szValueBuf, pcchValueBuf, TRUE );
779 }
780
782 return r;
783 }
784
785 str.unicode = FALSE;
786 str.str.a = szValueBuf;
787
788 r = get_prop( si, uiProperty, puiDataType, piValue, pftValue, &str, pcchValueBuf );
789 msiobj_release( &si->hdr );
790 return r;
791}
#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:966

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

◆ MsiSummaryInfoGetPropertyCount()

UINT WINAPI MsiSummaryInfoGetPropertyCount ( MSIHANDLE  hSummaryInfo,
UINT pCount 
)

Definition at line 611 of file suminfo.c.

612{
613 MSISUMMARYINFO *si;
614
615 TRACE( "%lu, %p\n", hSummaryInfo, pCount );
616
617 si = msihandle2msiinfo( hSummaryInfo, MSIHANDLETYPE_SUMMARYINFO );
618 if( !si )
619 {
620 MSIHANDLE remote;
621 UINT ret;
622
623 if (!(remote = msi_get_remote( hSummaryInfo )))
625
626 __TRY
627 {
628 ret = remote_SummaryInfoGetPropertyCount( remote, pCount );
629 }
631 {
633 }
635
636 return ret;
637 }
638
639 if( pCount )
640 *pCount = get_property_count( si->property );
641 msiobj_release( &si->hdr );
642
643 return ERROR_SUCCESS;
644}

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 793 of file suminfo.c.

795{
796 MSISUMMARYINFO *si;
798 UINT r;
799
800 TRACE( "%lu, %u, %p, %p, %p, %p, %p\n", handle, uiProperty, puiDataType, piValue, pftValue, szValueBuf,
801 pcchValueBuf );
802
803 if (uiProperty >= MSI_MAX_PROPS)
804 {
805 if (puiDataType) *puiDataType = VT_EMPTY;
807 }
808
810 {
811 MSIHANDLE remote;
812 WCHAR *buf = NULL;
813
814 if (!(remote = msi_get_remote( handle )))
816
817 __TRY
818 {
819 r = remote_SummaryInfoGetProperty( remote, uiProperty, puiDataType, piValue, pftValue, &buf );
820 }
822 {
824 }
826
827 if (!r && buf)
828 r = msi_strncpyW( buf, -1, szValueBuf, pcchValueBuf );
829
831 return r;
832 }
833
834 str.unicode = TRUE;
835 str.str.w = szValueBuf;
836
837 r = get_prop( si, uiProperty, puiDataType, piValue, pftValue, &str, pcchValueBuf );
838 msiobj_release( &si->hdr );
839 return r;
840}
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()

UINT WINAPI MsiSummaryInfoPersist ( MSIHANDLE  handle)

◆ MsiSummaryInfoSetPropertyA()

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

Definition at line 942 of file suminfo.c.

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

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 912 of file suminfo.c.

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

Referenced by summaryinfo_invoke(), and test_db().

◆ parse_filetime()

static void parse_filetime ( LPCWSTR  str,
FILETIME ft 
)
static

Definition at line 989 of file suminfo.c.

990{
991 SYSTEMTIME lt, utc;
992 const WCHAR *p = str;
993 WCHAR *end;
994
995 memset( &lt, 0, sizeof(lt) );
996
997 /* YYYY/MM/DD hh:mm:ss */
998
999 while (iswspace( *p )) p++;
1000
1001 lt.wYear = wcstol( p, &end, 10 );
1002 if (*end != '/') return;
1003 p = end + 1;
1004
1005 lt.wMonth = wcstol( p, &end, 10 );
1006 if (*end != '/') return;
1007 p = end + 1;
1008
1009 lt.wDay = wcstol( p, &end, 10 );
1010 if (*end != ' ') return;
1011 p = end + 1;
1012
1013 while (iswspace( *p )) p++;
1014
1015 lt.wHour = wcstol( p, &end, 10 );
1016 if (*end != ':') return;
1017 p = end + 1;
1018
1019 lt.wMinute = wcstol( p, &end, 10 );
1020 if (*end != ':') return;
1021 p = end + 1;
1022
1023 lt.wSecond = wcstol( p, &end, 10 );
1024
1026 SystemTimeToFileTime( &utc, ft );
1027}
static DOUBLE utc(DOUBLE time, DateInstance *date)
Definition: date.c:357
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
Definition: time.c:158
BOOL WINAPI TzSpecificLocalTimeToSystemTime(LPTIME_ZONE_INFORMATION lpTimeZoneInformation, LPSYSTEMTIME lpLocalTime, LPSYSTEMTIME lpUniversalTime)
Definition: timezone.c:421
GLfloat GLfloat p
Definition: glext.h:8902
#define iswspace(_c)
Definition: ctype.h:669
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define memset(x, y, z)
Definition: compat.h:39
WORD wYear
Definition: winbase.h:930
WORD wMonth
Definition: winbase.h:931
WORD wHour
Definition: winbase.h:934
WORD wSecond
Definition: winbase.h:936
WORD wMinute
Definition: winbase.h:935
WORD wDay
Definition: winbase.h:933

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 1029 of file suminfo.c.

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

Referenced by msi_add_suminfo().

◆ propvar_changetype()

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

Definition at line 170 of file suminfo.c.

171{
172 HRESULT hr;
173 HMODULE propsys = LoadLibraryA("propsys.dll");
174 pPropVariantChangeType = (void *)GetProcAddress(propsys, "PropVariantChangeType");
175
176 if (!pPropVariantChangeType)
177 {
178 ERR("PropVariantChangeType function missing!\n");
180 }
181
182 hr = pPropVariantChangeType(changed, property, 0, vt);
184}
#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 187 of file suminfo.c.

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

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 1326 of file suminfo.c.

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

◆ s_remote_SummaryInfoGetPropertyCount()

UINT __cdecl s_remote_SummaryInfoGetPropertyCount ( MSIHANDLE  suminfo,
UINT count 
)

Definition at line 1321 of file suminfo.c.

1322{
1324}
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, UINT *pCount)
Definition: suminfo.c:611

◆ save_prop()

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

Definition at line 1119 of file suminfo.c.

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

Referenced by msi_export_suminfo().

◆ save_summary_info()

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

Definition at line 380 of file suminfo.c.

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

Referenced by suminfo_persist().

◆ set_prop()

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

Definition at line 842 of file suminfo.c.

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

Referenced by msi_add_suminfo(), and suminfo_set_prop().

◆ suminfo_persist()

static UINT suminfo_persist ( MSISUMMARYINFO si)
static

Definition at line 972 of file suminfo.c.

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

Referenced by msi_add_suminfo(), and MsiSummaryInfoPersist().

◆ suminfo_set_prop()

static UINT suminfo_set_prop ( MSISUMMARYINFO si,
UINT  uiProperty,
UINT  uiDataType,
INT  iValue,
FILETIME pftValue,
awcstring str 
)
static

Definition at line 896 of file suminfo.c.

898{
899 UINT type = get_type( uiProperty );
900 if( type == VT_EMPTY || type != uiDataType )
902
903 if( uiDataType == VT_LPSTR && !str->str.a )
905
906 if( uiDataType == VT_FILETIME && !pftValue )
908
909 return set_prop( si, uiProperty, type, iValue, pftValue, str );
910}
#define ERROR_DATATYPE_MISMATCH
Definition: winerror.h:987

Referenced by MsiSummaryInfoSetPropertyA(), and MsiSummaryInfoSetPropertyW().

◆ 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 325 of file suminfo.c.

326{
327 if( data )
328 {
329 data[ofs++] = val&0xff;
330 data[ofs++] = (val>>8)&0xff;
331 data[ofs++] = (val>>16)&0xff;
332 data[ofs++] = (val>>24)&0xff;
333 }
334 return 4;
335}
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 337 of file suminfo.c.

338{
339 write_dword( data, ofs, ft->dwLowDateTime );
340 write_dword( data, ofs + 4, ft->dwHighDateTime );
341 return 8;
342}
static DWORD write_dword(LPBYTE data, DWORD ofs, DWORD val)
Definition: suminfo.c:325
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 353 of file suminfo.c.

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

Referenced by save_summary_info().

◆ write_string()

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

Definition at line 344 of file suminfo.c.

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

Referenced by write_property_to_data().

Variable Documentation

◆ flags

REFPROPVARIANT PROPVAR_CHANGE_FLAGS flags

Definition at line 91 of file suminfo.c.

◆ propvarSrc

REFPROPVARIANT propvarSrc

Definition at line 90 of file suminfo.c.

Referenced by PropVariantChangeType(), and test_copy().

◆ vt

REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt

Definition at line 91 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(), 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(), PropertyStorage_ReadMultiple(), PropertyStorage_ReadProperty(), propvar_changetype(), PROPVAR_ConvertFILETIME(), PROPVARIANT_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(), test_container_properties(), test_CreateMetadataWriterFromReader(), test_EmptyChangeTypeEx(), test_ErrorChangeTypeEx(), 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(), 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().