Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 /** | |
2 * \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
| |
3 */ | |
4 | |
5 #include "record.h" | |
6 #include "msiquery.h" | |
7 | |
8 //------------------------------------------------------------------------------ ----------- | |
9 // Record | |
10 //------------------------------------------------------------------------------ ----------- | |
11 Record::Record( unsigned int n_fields ) | |
12 : n_fields( n_fields ) | |
13 { | |
14 _handle = MsiCreateRecord( n_fields ) ; | |
15 if ( ! _handle ) | |
16 { | |
17 throw std::runtime_error( "Failed to create record" ) ; | |
18 } | |
19 } | |
20 | |
21 Record::~Record() | |
22 { | |
23 MsiCloseHandle( _handle ) ; | |
24 } | |
25 | |
26 void | |
27 Record::assign_string( unsigned int field_index, std::wstring value ) | |
28 { | |
29 MsiRecordSetString( _handle, field_index, value.c_str() ) ; | |
30 } | |
OLD | NEW |