| Index: installer/src/installer-lib/record.cpp |
| =================================================================== |
| new file mode 100644 |
| --- /dev/null |
| +++ b/installer/src/installer-lib/record.cpp |
| @@ -0,0 +1,30 @@ |
| +/** |
| + * \file record.cpp Implementation of Session class. |
|
Wladimir Palant
2013/10/29 08:49:26
Nope, it's the Record class ;)
Generally, I'm uns
Eric
2013/10/29 14:00:58
Oops. Bad copypasta.
Wladimir Palant
2013/10/29 15:06:38
Well, these handles just don't need to be wrapped
|
| + */ |
| + |
| +#include "record.h" |
| +#include "msiquery.h" |
| + |
| +//----------------------------------------------------------------------------------------- |
| +// Record |
| +//----------------------------------------------------------------------------------------- |
| +Record::Record( unsigned int n_fields ) |
| + : n_fields( n_fields ) |
| +{ |
| + _handle = MsiCreateRecord( n_fields ) ; |
| + if ( ! _handle ) |
| + { |
| + throw std::runtime_error( "Failed to create record" ) ; |
| + } |
| +} |
| + |
| +Record::~Record() |
| +{ |
| + MsiCloseHandle( _handle ) ; |
| +} |
| + |
| +void |
| +Record::assign_string( unsigned int field_index, std::wstring value ) |
| +{ |
| + MsiRecordSetString( _handle, field_index, value.c_str() ) ; |
| +} |