ReactOS 0.4.17-dev-966-gf06eace
suminfo.c
Go to the documentation of this file.
1/*
2 * Implementation of the Microsoft Installer (msi.dll)
3 *
4 * Copyright 2002, 2005 Mike McCormack for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include <stdarg.h>
22
23#define COBJMACROS
24#include "stdio.h"
25#include "windef.h"
26#include "winbase.h"
27#include "winreg.h"
28#include "winnls.h"
29#include "shlwapi.h"
30#include "wine/debug.h"
31#include "wine/exception.h"
32#include "msi.h"
33#include "msiquery.h"
34#include "msidefs.h"
35#include "objidl.h"
36#include "propvarutil.h"
37
38#include "msipriv.h"
39#include "winemsi.h"
40
42
43#include "pshpack1.h"
44
46{
52};
53
55{
58};
59
61{
64};
65
67{
70};
71
73{
75 union {
79 struct {
82 } str;
83 } u;
84};
85
86#include "poppack.h"
87
88static HRESULT (WINAPI *pPropVariantChangeType)
89 (PROPVARIANT *ppropvarDest, REFPROPVARIANT propvarSrc,
91
92#define SECT_HDR_SIZE (sizeof(struct property_section_header))
93
94static void free_prop( PROPVARIANT *prop )
95{
96 if (prop->vt == VT_LPSTR )
97 free( prop->pszVal );
98 prop->vt = VT_EMPTY;
99}
100
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}
110
111#ifdef __REACTOS__
112#define PID_DICTIONARY_MSI 0
113#define PID_CODEPAGE_MSI 1
114#define PID_SECURITY_MSI 19
115#endif
116
117static UINT get_type( UINT uiProperty )
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}
156
157static UINT get_property_count( const PROPVARIANT *property )
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}
168
169static UINT propvar_changetype(PROPVARIANT *changed, PROPVARIANT *property, VARTYPE vt)
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}
184
185/* FIXME: doesn't deal with endian conversion */
186static void read_properties_from_data( PROPVARIANT *prop, LPBYTE data, DWORD sz )
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}
254
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}
323
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}
335
336static DWORD write_filetime( LPBYTE data, DWORD ofs, const FILETIME *ft )
337{
338 write_dword( data, ofs, ft->dwLowDateTime );
339 write_dword( data, ofs + 4, ft->dwHighDateTime );
340 return 8;
341}
342
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}
351
352static UINT write_property_to_data( const PROPVARIANT *prop, LPBYTE data )
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}
378
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}
446
447static MSISUMMARYINFO *create_suminfo( IStorage *stg, UINT update_count )
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}
460
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}
490
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}
517
518UINT WINAPI MsiGetSummaryInformationW( MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount,
519 MSIHANDLE *pHandle )
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}
587
588UINT WINAPI MsiGetSummaryInformationA( MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount,
589 MSIHANDLE *pHandle )
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}
609
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}
644
645UINT msi_suminfo_get_prop( MSISUMMARYINFO *si, UINT uiProperty, UINT *puiDataType, INT *piValue,
646 FILETIME *pftValue, awstring *str, DWORD *pcchValueBuf)
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}
699
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}
711
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}
723
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}
740
741UINT WINAPI MsiSummaryInfoGetPropertyA( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
742 FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf )
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}
791
792UINT WINAPI MsiSummaryInfoGetPropertyW( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue,
793 FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf )
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}
840
842 INT iValue, FILETIME *pftValue, awcstring *str )
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}
894
895UINT msi_suminfo_set_prop( MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue,
896 awcstring *str )
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}
910
912 FILETIME *pftValue, const WCHAR *szValue )
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}
940
942 FILETIME *pftValue, const char *szValue )
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}
970
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}
987
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}
1027
1028static UINT parse_prop( LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value,
1029 FILETIME *ft_value, awcstring *str_value )
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}
1076
1077UINT msi_add_suminfo( MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns )
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}
1117
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}
1193
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}
1225
1227{
1229 UINT ret;
1230
1231 TRACE( "%lu\n", handle );
1232
1234 if( !si )
1235 return ERROR_INVALID_HANDLE;
1236
1238
1239 msiobj_release( &si->hdr );
1240 return ret;
1241}
1242
1244 int validation )
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}
1258
1260 int validation )
1261{
1262 FIXME( "%lu, %lu, %s, %d, %d\n", db, db_ref, debugstr_w(transform), error, validation );
1263 return ERROR_FUNCTION_FAILED;
1264}
1265
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}
1319
1321{
1323}
1324
1326 INT *value, FILETIME *ft, LPWSTR *buf )
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}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
static const CHAR suminfo[]
Definition: db.c:2166
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_MORE_DATA
Definition: dderror.h:13
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
HRESULT hr
Definition: delayimp.cpp:582
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *eptr)
Definition: rpc.c:184
static const WCHAR empty[1]
Definition: string.c:47
static WCHAR * strdupAtoW(const char *str)
Definition: main.c:61
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define CP_ACP
Definition: compat.h:109
#define lstrcpynA
Definition: compat.h:751
#define GetProcAddress(x, y)
Definition: compat.h:753
#define __TRY
Definition: compat.h:80
unsigned short VARTYPE
Definition: compat.h:2254
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define __ENDTRY
Definition: compat.h:82
#define WideCharToMultiByte
Definition: compat.h:111
#define MultiByteToWideChar
Definition: compat.h:110
@ VT_LPSTR
Definition: compat.h:2324
@ VT_I4
Definition: compat.h:2298
@ VT_FILETIME
Definition: compat.h:2329
@ VT_I2
Definition: compat.h:2297
@ VT_EMPTY
Definition: compat.h:2295
static DOUBLE utc(DOUBLE time, DateInstance *date)
Definition: date.c:315
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
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:183
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
UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
Definition: database.c:140
void * alloc_msiobject(UINT type, UINT size, msihandledestructor destroy)
Definition: handle.c:201
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
int msiobj_release(MSIOBJECTHDR *info)
Definition: handle.c:241
void * msihandle2msiinfo(MSIHANDLE handle, UINT type)
Definition: handle.c:158
UINT msi_strncpyW(const WCHAR *str, int len, WCHAR *buf, DWORD *sz)
Definition: install.c:213
UINT msi_strncpyWtoA(const WCHAR *str, int lenW, char *buf, DWORD *sz, BOOL remote)
Definition: install.c:190
UINT WINAPI MsiSummaryInfoSetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const char *szValue)
Definition: suminfo.c:941
UINT msi_get_suminfo(IStorage *stg, UINT uiUpdateCount, MSISUMMARYINFO **ret)
Definition: suminfo.c:461
UINT msi_get_db_suminfo(MSIDATABASE *db, UINT uiUpdateCount, MSISUMMARYINFO **ret)
Definition: suminfo.c:491
static REFPROPVARIANT propvarSrc
Definition: suminfo.c:89
UINT msi_add_suminfo(MSIDATABASE *db, LPWSTR **records, int num_records, int num_columns)
Definition: suminfo.c:1077
UINT msi_suminfo_set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:895
static void read_properties_from_data(PROPVARIANT *prop, LPBYTE data, DWORD sz)
Definition: suminfo.c:186
UINT WINAPI MsiSummaryInfoGetPropertyA(MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, char *szValueBuf, DWORD *pcchValueBuf)
Definition: suminfo.c:741
UINT WINAPI MsiGetSummaryInformationA(MSIHANDLE hDatabase, const char *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
Definition: suminfo.c:588
UINT msi_suminfo_persist(MSISUMMARYINFO *si)
Definition: suminfo.c:971
static UINT propvar_changetype(PROPVARIANT *changed, PROPVARIANT *property, VARTYPE vt)
Definition: suminfo.c:169
static DWORD write_dword(LPBYTE data, DWORD ofs, DWORD val)
Definition: suminfo.c:324
static DWORD write_filetime(LPBYTE data, DWORD ofs, const FILETIME *ft)
Definition: suminfo.c:336
LPWSTR msi_get_suminfo_product(IStorage *stg)
Definition: suminfo.c:724
UINT WINAPI MsiCreateTransformSummaryInfoA(MSIHANDLE db, MSIHANDLE db_ref, const char *transform, int error, int validation)
Definition: suminfo.c:1243
static UINT load_summary_info(MSISUMMARYINFO *si, IStream *stm)
Definition: suminfo.c:255
static UINT save_prop(MSISUMMARYINFO *si, HANDLE handle, UINT row)
Definition: suminfo.c:1118
UINT msi_load_suminfo_properties(MSIPACKAGE *package)
Definition: suminfo.c:1266
static UINT parse_prop(LPCWSTR prop, LPCWSTR value, UINT *pid, INT *int_value, FILETIME *ft_value, awcstring *str_value)
Definition: suminfo.c:1028
static void MSI_CloseSummaryInfo(MSIOBJECTHDR *arg)
Definition: suminfo.c:101
UINT msi_suminfo_get_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, awstring *str, DWORD *pcchValueBuf)
Definition: suminfo.c:645
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
Definition: suminfo.c:90
UINT __cdecl s_remote_SummaryInfoGetPropertyCount(MSIHANDLE suminfo, UINT *count)
Definition: suminfo.c:1320
UINT WINAPI MsiGetSummaryInformationW(MSIHANDLE hDatabase, const WCHAR *szDatabase, UINT uiUpdateCount, MSIHANDLE *pHandle)
Definition: suminfo.c:518
INT msi_suminfo_get_int32(MSISUMMARYINFO *si, UINT uiProperty)
Definition: suminfo.c:712
static void free_prop(PROPVARIANT *prop)
Definition: suminfo.c:94
UINT msi_export_suminfo(MSIDATABASE *db, HANDLE handle)
Definition: suminfo.c:1194
static void parse_filetime(LPCWSTR str, FILETIME *ft)
Definition: suminfo.c:988
#define SECT_HDR_SIZE
Definition: suminfo.c:92
UINT __cdecl s_remote_SummaryInfoGetProperty(MSIHANDLE suminfo, UINT property, UINT *type, INT *value, FILETIME *ft, LPWSTR *buf)
Definition: suminfo.c:1325
UINT WINAPI MsiSummaryInfoGetPropertyW(MSIHANDLE handle, UINT uiProperty, UINT *puiDataType, INT *piValue, FILETIME *pftValue, WCHAR *szValueBuf, DWORD *pcchValueBuf)
Definition: suminfo.c:792
LPWSTR msi_suminfo_dup_string(MSISUMMARYINFO *si, UINT uiProperty)
Definition: suminfo.c:700
UINT WINAPI MsiSummaryInfoGetPropertyCount(MSIHANDLE hSummaryInfo, UINT *pCount)
Definition: suminfo.c:610
UINT WINAPI MsiSummaryInfoSetPropertyW(MSIHANDLE handle, UINT uiProperty, UINT uiDataType, INT iValue, FILETIME *pftValue, const WCHAR *szValue)
Definition: suminfo.c:911
static UINT save_summary_info(const MSISUMMARYINFO *si, IStream *stm)
Definition: suminfo.c:379
static MSISUMMARYINFO * create_suminfo(IStorage *stg, UINT update_count)
Definition: suminfo.c:447
static DWORD write_string(LPBYTE data, DWORD ofs, LPCSTR str)
Definition: suminfo.c:343
static UINT write_property_to_data(const PROPVARIANT *prop, LPBYTE data)
Definition: suminfo.c:352
static UINT set_prop(MSISUMMARYINFO *si, UINT uiProperty, UINT type, INT iValue, FILETIME *pftValue, awcstring *str)
Definition: suminfo.c:841
static UINT get_property_count(const PROPVARIANT *property)
Definition: suminfo.c:157
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS flags
Definition: suminfo.c:90
UINT WINAPI MsiSummaryInfoPersist(MSIHANDLE handle)
Definition: suminfo.c:1226
static UINT get_type(UINT uiProperty)
Definition: suminfo.c:117
UINT WINAPI MsiCreateTransformSummaryInfoW(MSIHANDLE db, MSIHANDLE db_ref, const WCHAR *transform, int error, int validation)
Definition: suminfo.c:1259
#define __cdecl
Definition: corecrt.h:121
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752
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
return ret
Definition: mutex.c:147
#define L(x)
Definition: resources.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
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
GLdouble n
Definition: glext.h:7729
GLuint GLenum GLenum transform
Definition: glext.h:9407
GLsizeiptr size
Definition: glext.h:5919
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLuint GLfloat * val
Definition: glext.h:7180
GLfloat GLfloat p
Definition: glext.h:8902
GLenum GLsizei len
Definition: glext.h:6722
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
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
enum wined3d_data_type data_type
Definition: glsl_shader.c:71
unsigned int UINT
Definition: sysinfo.c:13
#define GetExceptionCode
Definition: excpt.h:83
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
JSAMPARRAY int num_rows
Definition: jpegint.h:420
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
struct _FILETIME FILETIME
#define error(str)
Definition: mkdosfs.c:1605
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
static SYSTEM_INFO si
Definition: virtual.c:39
#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
#define MSIHANDLETYPE_DATABASE
Definition: msipriv.h:746
#define MSI_MAX_PROPS
Definition: msipriv.h:496
UINT msi_set_property(MSIDATABASE *, const WCHAR *, const WCHAR *, int)
Definition: package.c:2132
UINT msi_get_stream(MSIDATABASE *, const WCHAR *, IStream **)
Definition: streams.c:499
#define MSIHANDLETYPE_SUMMARYINFO
Definition: msipriv.h:747
#define MSIDBOPEN_DIRECT
Definition: msiquery.h:68
#define MSIDBOPEN_READONLY
Definition: msiquery.h:66
#define DWORD
Definition: nt_native.h:44
#define STGM_CREATE
Definition: objbase.h:945
#define STGM_READWRITE
Definition: objbase.h:938
#define STGM_SHARE_EXCLUSIVE
Definition: objbase.h:942
#define STGM_READ
Definition: objbase.h:936
const FMTID FMTID_SummaryInformation
short WCHAR
Definition: pedump.c:58
short SHORT
Definition: pedump.c:59
static IPropertySystem propsys
Definition: propsys_main.c:202
int PROPVAR_CHANGE_FLAGS
Definition: propvarutil.h:49
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
_In_ DWORD _In_ DWORD dwOffset
Definition: ntgdi.h:2033
#define calloc
Definition: rosglue.h:14
const WCHAR * str
#define iswspace(_c)
Definition: ctype.h:669
#define midl_user_free
Definition: rpc.h:41
#define midl_user_allocate
Definition: rpc.h:40
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
DWORD dwHighDateTime
Definition: mapidefs.h:66
DWORD dwLowDateTime
Definition: mapidefs.h:65
WORD wSecond
Definition: minwinbase.h:262
WORD wMinute
Definition: minwinbase.h:261
BOOL unicode
Definition: msipriv.h:772
LPCWSTR w
Definition: msipriv.h:775
union awcstring::@617 str
DWORD dwOffset
Definition: suminfo.c:57
union property_data::@622 u
BYTE str[1]
Definition: suminfo.c:81
DWORD len
Definition: suminfo.c:80
SHORT i2
Definition: suminfo.c:77
FILETIME ft
Definition: suminfo.c:78
DWORD type
Definition: suminfo.c:74
MSIOBJECTHDR hdr
Definition: msipriv.h:108
IStorage * storage
Definition: msipriv.h:109
UINT WordCount
Definition: msipriv.h:472
MSIDATABASE * db
Definition: msipriv.h:407
const char * LPCSTR
Definition: typedefs.h:52
const uint16_t * LPCWSTR
Definition: typedefs.h:57
unsigned char * LPBYTE
Definition: typedefs.h:53
uint16_t * LPWSTR
Definition: typedefs.h:56
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
LONGLONG QuadPart
Definition: typedefs.h:114
Definition: pdh_main.c:64
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define __EXCEPT(func)
Definition: exception.h:62
unsigned long MSIHANDLE
Definition: winemsi.idl:27
#define ERROR_WRITE_FAULT
Definition: winerror.h:254
#define ERROR_FUNCTION_FAILED
Definition: winerror.h:1333
#define ERROR_UNKNOWN_PROPERTY
Definition: winerror.h:1314
#define ERROR_DATATYPE_MISMATCH
Definition: winerror.h:1335
unsigned char BYTE
Definition: xxhash.c:193