msi: Set field zero to the name of the table containing the primary keys.
This commit is contained in:
parent
7d7f14c101
commit
e872681af7
|
@ -842,7 +842,7 @@ struct msi_primary_key_record_info
|
||||||
static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
|
static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
|
||||||
{
|
{
|
||||||
struct msi_primary_key_record_info *info = param;
|
struct msi_primary_key_record_info *info = param;
|
||||||
LPCWSTR name;
|
LPCWSTR name, table;
|
||||||
DWORD type;
|
DWORD type;
|
||||||
|
|
||||||
type = MSI_RecordGetInteger( rec, 4 );
|
type = MSI_RecordGetInteger( rec, 4 );
|
||||||
|
@ -851,6 +851,12 @@ static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
|
||||||
info->n++;
|
info->n++;
|
||||||
if( info->rec )
|
if( info->rec )
|
||||||
{
|
{
|
||||||
|
if ( info->n == 1 )
|
||||||
|
{
|
||||||
|
table = MSI_RecordGetString( rec, 1 );
|
||||||
|
MSI_RecordSetStringW( info->rec, 0, table);
|
||||||
|
}
|
||||||
|
|
||||||
name = MSI_RecordGetString( rec, 3 );
|
name = MSI_RecordGetString( rec, 3 );
|
||||||
MSI_RecordSetStringW( info->rec, info->n, name );
|
MSI_RecordSetStringW( info->rec, info->n, name );
|
||||||
}
|
}
|
||||||
|
|
|
@ -552,17 +552,11 @@ static void test_fieldzero(void)
|
||||||
lstrcpyA(buf, "apple");
|
lstrcpyA(buf, "apple");
|
||||||
r = MsiRecordGetString(rec, 0, buf, &sz);
|
r = MsiRecordGetString(rec, 0, buf, &sz);
|
||||||
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
|
||||||
todo_wine
|
ok(!lstrcmpA(buf, "drone"), "Expected \"drone\", got \"%s\"\n", buf);
|
||||||
{
|
ok(sz == 5, "Expectd 5, got %d\n", sz);
|
||||||
ok(!lstrcmpA(buf, "drone"), "Expected \"drone\", got \"%s\"\n", buf);
|
|
||||||
ok(sz == 5, "Expectd 5, got %d\n", sz);
|
|
||||||
}
|
|
||||||
|
|
||||||
r = MsiRecordIsNull(rec, 0);
|
r = MsiRecordIsNull(rec, 0);
|
||||||
todo_wine
|
ok(r == FALSE, "Expected FALSE, got %d\n", r);
|
||||||
{
|
|
||||||
ok(r == FALSE, "Expected FALSE, got %d\n", r);
|
|
||||||
}
|
|
||||||
|
|
||||||
MsiCloseHandle(rec);
|
MsiCloseHandle(rec);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue