Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: installer/src/installer-lib/record.cpp

Issue 22887001: Custom action library, initial version (Closed)
Patch Set: Created Oct. 28, 2013, 9:37 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(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 }
OLDNEW

Powered by Google App Engine
This is Rietveld