MSI query tests

EA Durbin ead1234 at
Thu Jun 1 21:51:20 CDT 2006

1. The conformance test suite must run on Windows. This is necessary to 
provide a reasonable way to verify its accuracy. Furthermore the tests must 
pass successfully on all Windows platforms (tests not relevant to a given 
platform should be skipped).

I don't know how I would run this on windows. I edited the wine code itself 
and queried tables in the MSI database to troubleshoot the behavior of the 
installer code. Then i retrieved the pertainent values from the results, as 
in the case of the file table i retrieved the sequence value being returned 
by the query

    MSIQUERY * view;
    static const WCHAR ExecSeqQuery[] =
        {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ',
         '`','F','i','l','e','`',' ','W','H','E','R','E',' 
','`','S','e','q','u','e','n','c','e','`',' ','>','=',' ','8',0};

    rc = MSI_DatabaseOpenViewW( package->db, ExecSeqQuery, &view );
    if ( rc != ERROR_SUCCESS )
        return ERROR_SUCCESS;

    TRACE( "DEBUGGING SELECT * FROM File WHERE Sequence >= 8 \n" );
    rc = MSI_IterateRecords( view, NULL, ITERATE_QueryTest, package );
    return rc;

static UINT ITERATE_QueryTest( MSIRECORD *row, LPVOID param )
    MSIPACKAGE *package = (MSIPACKAGE*)param;
    int fileSequence;
    fileSequence = MSI_RecordGetInteger( row, 8 );
    TRACE( "File Sequence: %i \n", fileSequence );
    return ERROR_SUCCESS;

and the Media table i returned the DiskId, cabinet, and LastSequence values 
from the results

static UINT ITERATE_QueryTest( MSIRECORD *row, LPVOID param )
    MSIPACKAGE *package = (MSIPACKAGE*)param;
    int lastSequence, DiskId;
    LPWSTR cab;

    lastSequence = MSI_RecordGetInteger( row, 2 );
    DiskId = MSI_RecordGetInteger( row, 1);
    cab = MSI_RecordGetString( row, 4)

    TRACE( " Last Sequence: %u \n", lastSequence );
    TRACE( " CAB %s \n", debugstr_w( cab ) );
    TRACE( " Disk ID %u \n", DiskId );
    return ERROR_SUCCESS;

>From: "Dan Kegel" <dank at>
>To: "EA Durbin" <ead1234 at>
>CC: wine-devel at
>Subject: Re: MSI query tests
>Date: Thu, 1 Jun 2006 19:34:12 -0700
>On 6/1/06, EA Durbin <ead1234 at> wrote:
>> >Great.  Can you package up the tests as Wine conformance tests?
>>I'm new to wine, how do I accomplish this?
>has an introduction to the subject.
>- Dan

More information about the wine-devel mailing list