Commit f348c7c0 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

msi: Rewrite dump_record().

parent 33a8f192
......@@ -840,6 +840,7 @@ extern BOOL MSI_RecordsAreEqual( MSIRECORD *, MSIRECORD * ) DECLSPEC_HIDDEN;
extern BOOL MSI_RecordsAreFieldsEqual(MSIRECORD *a, MSIRECORD *b, UINT field) DECLSPEC_HIDDEN;
extern UINT msi_record_set_string(MSIRECORD *, UINT, const WCHAR *, int) DECLSPEC_HIDDEN;
extern const WCHAR *msi_record_get_string(const MSIRECORD *, UINT, int *) DECLSPEC_HIDDEN;
extern void dump_record(MSIRECORD *) DECLSPEC_HIDDEN;
/* stream internals */
extern void enum_stream_names( IStorage *stg ) DECLSPEC_HIDDEN;
......
......@@ -1860,6 +1860,7 @@ INT MSI_ProcessMessageVerbatim(MSIPACKAGE *package, INSTALLMESSAGE eMessageType,
char *msg;
TRACE("%x\n", eMessageType);
if (TRACE_ON(msi)) dump_record(record);
if ((eMessageType & 0xff000000) == INSTALLMESSAGE_FATALEXIT)
log_type |= INSTALLLOGMODE_FATALEXIT;
......
......@@ -1077,3 +1077,28 @@ WCHAR *msi_dup_record_field( MSIRECORD *rec, INT field )
}
return str;
}
void dump_record(MSIRECORD *rec)
{
int i;
if (!rec)
{
TRACE("(null)\n");
return;
}
TRACE("[");
for (i = 0; i <= rec->count; i++)
{
switch(rec->fields[i].type)
{
case MSIFIELD_NULL: TRACE("(null)"); break;
case MSIFIELD_INT: TRACE("%d", rec->fields[i].u.iVal); break;
case MSIFIELD_WSTR: TRACE("%s", debugstr_w(rec->fields[i].u.szwVal)); break;
case MSIFIELD_INTPTR: TRACE("%ld", rec->fields[i].u.pVal); break;
case MSIFIELD_STREAM: TRACE("%p", rec->fields[i].u.stream); break;
}
if (i < rec->count) TRACE(", ");
}
TRACE("]\n");
}
......@@ -2410,25 +2410,6 @@ static MSIRECORD *msi_get_transform_record( const MSITABLEVIEW *tv, const string
return rec;
}
static void dump_record( MSIRECORD *rec )
{
UINT i, n;
n = MSI_RecordGetFieldCount( rec );
for( i=1; i<=n; i++ )
{
int len;
const WCHAR *sval;
if( MSI_RecordIsNull( rec, i ) )
TRACE("row -> []\n");
else if( (sval = msi_record_get_string( rec, i, &len )) )
TRACE("row -> [%s]\n", debugstr_wn(sval, len));
else
TRACE("row -> [0x%08x]\n", MSI_RecordGetInteger( rec, i ) );
}
}
static void dump_table( const string_table *st, const USHORT *rawdata, UINT rawsize )
{
UINT i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment