MsiDatabase.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace AppSecInc {
4 namespace Msi {
5 
7 {
8  DWORD dwPropertyId; // see http://msdn.microsoft.com/en-us/library/aa372045(VS.85).aspx
9  VARENUM varPropertyType;
10  CComVariant varValue;
11 };
12 
14 class MsiDatabase : public MsiHandle
15 {
16 private:
17  std::wstring _filepath;
18 public:
20  MsiDatabase();
22  MsiDatabase(const std::wstring& filepath, LPCTSTR openmode = MSIDBOPEN_READONLY);
24  void Commit();
26  void Create(const std::wstring& filepath);
28  void Open(const std::wstring& filepath, LPCTSTR openmode = MSIDBOPEN_READONLY);
30  void Close();
32  void SetSummary(const std::vector<MsiDatabaseSummaryEntry>& summary);
34  void SetSummary(const MsiDatabaseSummaryEntry summary[], int size);
36  void Import(const std::wstring& path, const std::wstring& file);
38  void Execute(const std::wstring& query);
39 };
40 
41 }}
A smart pointer for an MSI database.
Definition: MsiDatabase.h:14
void Execute(const std::wstring &query)
execute an MSI query
Definition: MsiDatabase.cpp:101
void Close()
close the database
Definition: MsiDatabase.cpp:14
void SetSummary(const std::vector< MsiDatabaseSummaryEntry > &summary)
set database summary fields
Definition: MsiDatabase.cpp:56
void Import(const std::wstring &path, const std::wstring &file)
import a previously exported database file
Definition: MsiDatabase.cpp:92
void Commit()
commit database changes to disk
Definition: MsiDatabase.cpp:47
Definition: MsiDatabase.h:6
void Create(const std::wstring &filepath)
create a usable empty database with a base summary
Definition: MsiDatabase.cpp:20
void Open(const std::wstring &filepath, LPCTSTR openmode=MSIDBOPEN_READONLY)
create or open a database file
Definition: MsiDatabase.cpp:34
MsiDatabase()
empty database object
Definition: MsiDatabase.cpp:4
CComVariant varValue
Definition: MsiDatabase.h:10
DWORD dwPropertyId
Definition: MsiDatabase.h:8
A smart pointer for an MSIHANDLE.
Definition: MsiHandle.h:7
VARENUM varPropertyType
Definition: MsiDatabase.h:9


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