diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-04 14:18:48 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2012-12-06 20:30:33 +0100 |
commit | b431a82f778aac5117136a7ea528e0d37288401d (patch) | |
tree | 6abb52e2b13171316f672d0c311e11571d317258 /libmsi/string.c | |
parent | b2015137b1af9aba2ffde189d3d9663e372a9c93 (diff) | |
download | msitools-b431a82f778aac5117136a7ea528e0d37288401d.tar.gz msitools-b431a82f778aac5117136a7ea528e0d37288401d.tar.xz msitools-b431a82f778aac5117136a7ea528e0d37288401d.zip |
rewrite outfile completely on commit
Diffstat (limited to 'libmsi/string.c')
-rw-r--r-- | libmsi/string.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/libmsi/string.c b/libmsi/string.c index 8388536..a638197 100644 --- a/libmsi/string.c +++ b/libmsi/string.c @@ -457,22 +457,14 @@ static void string_totalsize( const string_table *st, unsigned *datasize, unsign TRACE("data %u pool %u codepage %x\n", *datasize, *poolsize, st->codepage ); } -HRESULT msi_init_string_table( LibmsiDatabase *db ) +string_table *msi_init_string_table( unsigned *bytes_per_strref ) { - uint16_t zero[2] = { 0, 0 }; - unsigned ret; - - /* create the StringPool stream... add the zero string to it*/ - ret = write_stream_data(db, szStringPool, zero, sizeof zero); - if (ret != LIBMSI_RESULT_SUCCESS) - return E_FAIL; + string_table *st; - /* create the StringData stream... make it zero length */ - ret = write_stream_data(db, szStringData, NULL, 0); - if (ret != LIBMSI_RESULT_SUCCESS) - return E_FAIL; + *bytes_per_strref = sizeof(uint16_t); + st = init_stringtable( 1, CP_ACP ); - return S_OK; + return st; } string_table *msi_load_string_table( IStorage *stg, unsigned *bytes_per_strref ) |