return r;
}
+static UINT find_entryW( MSIHANDLE hdb, const WCHAR *table, const WCHAR *entry )
+{
+ static const WCHAR fmt[] =
+ {'S','E','L','E','C','T',' ','*',' ','F','R','O','M',' ','`','%','s','`',' ',
+ 'W','H','E','R','E',' ','`','N','a','m','e','`',' ','=',' ','\'','%','s','\'',0};
+ WCHAR query[0x100];
+ MSIHANDLE hview, hrec;
+ UINT r;
+
+ wsprintfW( query, fmt, table, entry );
+ r = MsiDatabaseOpenViewW( hdb, query, &hview );
+ ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+ r = MsiViewExecute( hview, 0 );
+ ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );
+
+ r = MsiViewFetch( hview, &hrec );
+ MsiViewClose( hview );
+ MsiCloseHandle( hview );
+ MsiCloseHandle( hrec );
+ return r;
+}
+
static INT get_integer( MSIHANDLE hdb, UINT field, const char *query)
{
UINT r;
static void test_system_tables( void )
{
+ static const char patchsource[] = "MSPSRC0F96CDC04CDF4304B2837B9264889EF7";
+ static const WCHAR streamsW[] = {'_','S','t','r','e','a','m','s',0};
+ static const WCHAR CAB_msitest_encodedW[] = {0x3a8c,0x47cb,0x45b0,0x45ec,0x45a8,0x4837,0};
UINT r;
char *cr;
const char *query;
MSIHANDLE hproduct, hdb, hview, hrec;
- static const char patchsource[] = "MSPSRC0F96CDC04CDF4304B2837B9264889EF7";
if (!pMsiApplyPatchA)
{
r = find_entry( hdb, "_Streams", "\5SummaryInformation" );
ok( r == ERROR_SUCCESS, "failed to find entry %u\n", r );
+ r = find_entryW( hdb, streamsW, CAB_msitest_encodedW );
+ ok( r == ERROR_NO_MORE_ITEMS, "failed to find entry %u\n", r );
+
query = "SELECT * FROM `_Storages`";
r = MsiDatabaseOpenViewA( hdb, query, &hview );
ok( r == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %u\n", r );