James Hawkins : msi: Set field zero to the name of the table containing the primary keys.
Alexandre Julliard
julliard at winehq.org
Thu Feb 26 09:04:59 CST 2009
Module: wine
Branch: master
Commit: e872681af7c2238f7320fe96794b709b43cbb10c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e872681af7c2238f7320fe96794b709b43cbb10c
Author: James Hawkins <truiken at gmail.com>
Date: Wed Feb 25 19:44:09 2009 -0800
msi: Set field zero to the name of the table containing the primary keys.
---
dlls/msi/msiquery.c | 8 +++++++-
dlls/msi/tests/record.c | 12 +++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c
index 1ee63b5..430ff52 100644
--- a/dlls/msi/msiquery.c
+++ b/dlls/msi/msiquery.c
@@ -842,7 +842,7 @@ struct msi_primary_key_record_info
static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
{
struct msi_primary_key_record_info *info = param;
- LPCWSTR name;
+ LPCWSTR name, table;
DWORD type;
type = MSI_RecordGetInteger( rec, 4 );
@@ -851,6 +851,12 @@ static UINT msi_primary_key_iterator( MSIRECORD *rec, LPVOID param )
info->n++;
if( info->rec )
{
+ if ( info->n == 1 )
+ {
+ table = MSI_RecordGetString( rec, 1 );
+ MSI_RecordSetStringW( info->rec, 0, table);
+ }
+
name = MSI_RecordGetString( rec, 3 );
MSI_RecordSetStringW( info->rec, info->n, name );
}
diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c
index 567f110..1b88239 100644
--- a/dlls/msi/tests/record.c
+++ b/dlls/msi/tests/record.c
@@ -552,17 +552,11 @@ static void test_fieldzero(void)
lstrcpyA(buf, "apple");
r = MsiRecordGetString(rec, 0, buf, &sz);
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);
- todo_wine
- {
- ok(r == FALSE, "Expected FALSE, got %d\n", r);
- }
+ ok(r == FALSE, "Expected FALSE, got %d\n", r);
MsiCloseHandle(rec);
More information about the wine-cvs
mailing list