aboutsummaryrefslogtreecommitdiff
path: root/src/wcautil/wcautil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wcautil/wcautil.cpp')
-rw-r--r--src/wcautil/wcautil.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/wcautil/wcautil.cpp b/src/wcautil/wcautil.cpp
index ce5ef151..11867d10 100644
--- a/src/wcautil/wcautil.cpp
+++ b/src/wcautil/wcautil.cpp
@@ -12,6 +12,15 @@ static MSIHANDLE s_hDatabase;
12static char s_szCustomActionLogName[32]; 12static char s_szCustomActionLogName[32];
13static UINT s_iRetVal; 13static UINT s_iRetVal;
14 14
15static void CALLBACK WcaTraceError(
16 __in_z LPCSTR szFile,
17 __in int iLine,
18 __in REPORT_LEVEL rl,
19 __in UINT source,
20 __in HRESULT hrError,
21 __in_z __format_string LPCSTR szFormat,
22 __in va_list args
23 );
15 24
16/******************************************************************** 25/********************************************************************
17 WcaGlobalInitialize() - initializes the Wca library, should be 26 WcaGlobalInitialize() - initializes the Wca library, should be
@@ -24,6 +33,7 @@ extern "C" void WIXAPI WcaGlobalInitialize(
24 ) 33 )
25{ 34{
26 g_hInstCADLL = hInst; 35 g_hInstCADLL = hInst;
36 DutilInitialize(&WcaTraceError);
27 MemInitialize(); 37 MemInitialize();
28 38
29 AssertSetModule(g_hInstCADLL); 39 AssertSetModule(g_hInstCADLL);
@@ -49,6 +59,7 @@ extern "C" void WIXAPI WcaGlobalFinalize()
49 } 59 }
50#endif 60#endif
51 MemUninitialize(); 61 MemUninitialize();
62 DutilUninitialize();
52 g_hInstCADLL = NULL; 63 g_hInstCADLL = NULL;
53} 64}
54 65
@@ -214,3 +225,19 @@ extern "C" BOOL WIXAPI WcaCancelDetected()
214{ 225{
215 return ERROR_INSTALL_USEREXIT == s_iRetVal; 226 return ERROR_INSTALL_USEREXIT == s_iRetVal;
216} 227}
228
229static void CALLBACK WcaTraceError(
230 __in_z LPCSTR /*szFile*/,
231 __in int /*iLine*/,
232 __in REPORT_LEVEL /*rl*/,
233 __in UINT source,
234 __in HRESULT hrError,
235 __in_z __format_string LPCSTR szFormat,
236 __in va_list args
237 )
238{
239 if (DUTIL_SOURCE_DEFAULT == source)
240 {
241 WcaLogErrorArgs(hrError, szFormat, args);
242 }
243}