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

Side by Side Diff: installer/src/custom-action/close_application.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 close_application.cpp
3 */
4
5 #include "session.h"
6 #include "property.h"
7 #include "database.h"
8
9 /**
10 * Exposed DLL entry point for custom action.
11 * The function signature matches the calling convention used by Windows Install er.
12 *
13 * \param[in] session_handle
14 * Windows installer session handle
15 */
16 extern "C" UINT __stdcall
17 abp_close_applications( MSIHANDLE session_handle )
18 {
19 // Always supply an externally-exposed function with a catch-all block
20 try {
21 Immediate_Session session( session_handle, L"abp_close_applications" ) ;
22 session.log( L"Have session object" ) ;
23
24 Installation_Database db( session ) ;
25 session.log( L"Have database object" ) ;
26
27 session.log( L"Still with new Property operator+ implementations!" ) ;
28 session.log( L"VersionMsi = " + Property( session, L"VersionMsi" ) ) ;
29
30 Property tv( session, L"TESTVARIABLE" ) ;
31 session.log( L"TESTVARIABLE = " + tv ) ;
32 session.log( L"Setting TESTVARIABLE to 'testvalue'" ) ;
33 tv = L"testvalue" ;
34 session.log( L"TESTVARIABLE = " + tv ) ;
35 }
36 catch( ... )
37 {
38 return ERROR_INSTALL_FAILURE ;
39 }
40
41 /*
42 * While we're working on infrastructure (and not the CA itself), fail the act ion.
43 */
44 return ERROR_INSTALL_FAILURE ;
45 }
OLDNEW

Powered by Google App Engine
This is Rietveld