src/Framework/Msi/MsiDatabase.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 namespace AppSecInc {
00004 namespace Msi {
00005 
00006 struct MsiDatabaseSummaryEntry
00007 {
00008     DWORD dwPropertyId; // see http://msdn.microsoft.com/en-us/library/aa372045(VS.85).aspx
00009     VARENUM varPropertyType;
00010     CComVariant varValue;
00011 };
00012 
00014 class MsiDatabase : public MsiHandle
00015 {
00016 private:
00017     std::wstring _filepath;
00018 public:
00020         MsiDatabase();
00022     MsiDatabase(const std::wstring& filepath, LPCTSTR openmode = MSIDBOPEN_READONLY);
00024     void Commit();
00026     void Create(const std::wstring& filepath);
00028     void Open(const std::wstring& filepath, LPCTSTR openmode = MSIDBOPEN_READONLY);
00030     void Close();
00032     void SetSummary(const std::vector<MsiDatabaseSummaryEntry>& summary);
00034     void SetSummary(const MsiDatabaseSummaryEntry summary[], int size);
00036     void Import(const std::wstring& path, const std::wstring& file);
00038         void Execute(const std::wstring& query);
00039 };
00040 
00041 }}


© Application Security Inc. - All Rights Reserved http://msiext.codeplex.com