diff options
Diffstat (limited to '')
| -rw-r--r-- | src/libs/dutil/WixToolset.DUtil/dutil.cpp | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/src/libs/dutil/WixToolset.DUtil/dutil.cpp b/src/libs/dutil/WixToolset.DUtil/dutil.cpp index 83b53f64..3f0d1658 100644 --- a/src/libs/dutil/WixToolset.DUtil/dutil.cpp +++ b/src/libs/dutil/WixToolset.DUtil/dutil.cpp | |||
| @@ -50,6 +50,19 @@ DAPI_(void) DutilUninitialize() | |||
| 50 | vpfnTraceErrorCallback = NULL; | 50 | vpfnTraceErrorCallback = NULL; |
| 51 | } | 51 | } |
| 52 | 52 | ||
| 53 | |||
| 54 | DAPI_(HRESULT) DutilSizetToDword(SIZE_T sizet, DWORD* pdw) | ||
| 55 | { | ||
| 56 | if (DWORD_MAX < sizet) | ||
| 57 | { | ||
| 58 | return E_INVALIDARG; | ||
| 59 | } | ||
| 60 | |||
| 61 | *pdw = static_cast<DWORD>(sizet); | ||
| 62 | return S_OK; | ||
| 63 | } | ||
| 64 | |||
| 65 | |||
| 53 | DAPI_(BOOL) DutilSuppressTraceErrorSource() | 66 | DAPI_(BOOL) DutilSuppressTraceErrorSource() |
| 54 | { | 67 | { |
| 55 | if (DWORD_MAX == vtdwSuppressTraceErrorSource) | 68 | if (DWORD_MAX == vtdwSuppressTraceErrorSource) |
| @@ -169,7 +182,7 @@ extern "C" void DAPI Dutil_AssertMsg( | |||
| 169 | DExitOnFailure(hr, "failed to concat string while building assert message"); | 182 | DExitOnFailure(hr, "failed to concat string while building assert message"); |
| 170 | 183 | ||
| 171 | id = ::MessageBoxA(0, szMsg, "Debug Assert Message", | 184 | id = ::MessageBoxA(0, szMsg, "Debug Assert Message", |
| 172 | MB_SERVICE_NOTIFICATION | MB_TOPMOST | | 185 | MB_SERVICE_NOTIFICATION | MB_TOPMOST | |
| 173 | MB_DEFBUTTON2 | MB_ABORTRETRYIGNORE); | 186 | MB_DEFBUTTON2 | MB_ABORTRETRYIGNORE); |
| 174 | } | 187 | } |
| 175 | } | 188 | } |
| @@ -206,7 +219,7 @@ Dutil_Assert | |||
| 206 | 219 | ||
| 207 | *******************************************************************/ | 220 | *******************************************************************/ |
| 208 | extern "C" void DAPI Dutil_Assert( | 221 | extern "C" void DAPI Dutil_Assert( |
| 209 | __in_z LPCSTR szFile, | 222 | __in_z LPCSTR szFile, |
| 210 | __in int iLine | 223 | __in int iLine |
| 211 | ) | 224 | ) |
| 212 | { | 225 | { |
| @@ -229,8 +242,8 @@ Dutil_AssertSz | |||
| 229 | 242 | ||
| 230 | *******************************************************************/ | 243 | *******************************************************************/ |
| 231 | extern "C" void DAPI Dutil_AssertSz( | 244 | extern "C" void DAPI Dutil_AssertSz( |
| 232 | __in_z LPCSTR szFile, | 245 | __in_z LPCSTR szFile, |
| 233 | __in int iLine, | 246 | __in int iLine, |
| 234 | __in_z __format_string LPCSTR szMsg | 247 | __in_z __format_string LPCSTR szMsg |
| 235 | ) | 248 | ) |
| 236 | { | 249 | { |
| @@ -278,10 +291,10 @@ Dutil_Trace | |||
| 278 | 291 | ||
| 279 | *******************************************************************/ | 292 | *******************************************************************/ |
| 280 | extern "C" void DAPIV Dutil_Trace( | 293 | extern "C" void DAPIV Dutil_Trace( |
| 281 | __in_z LPCSTR szFile, | 294 | __in_z LPCSTR szFile, |
| 282 | __in int iLine, | 295 | __in int iLine, |
| 283 | __in REPORT_LEVEL rl, | 296 | __in REPORT_LEVEL rl, |
| 284 | __in_z __format_string LPCSTR szFormat, | 297 | __in_z __format_string LPCSTR szFormat, |
| 285 | ... | 298 | ... |
| 286 | ) | 299 | ) |
| 287 | { | 300 | { |
| @@ -355,11 +368,11 @@ Dutil_TraceError | |||
| 355 | 368 | ||
| 356 | *******************************************************************/ | 369 | *******************************************************************/ |
| 357 | extern "C" void DAPIV Dutil_TraceError( | 370 | extern "C" void DAPIV Dutil_TraceError( |
| 358 | __in_z LPCSTR szFile, | 371 | __in_z LPCSTR szFile, |
| 359 | __in int iLine, | 372 | __in int iLine, |
| 360 | __in REPORT_LEVEL rl, | 373 | __in REPORT_LEVEL rl, |
| 361 | __in HRESULT hrError, | 374 | __in HRESULT hrError, |
| 362 | __in_z __format_string LPCSTR szFormat, | 375 | __in_z __format_string LPCSTR szFormat, |
| 363 | ... | 376 | ... |
| 364 | ) | 377 | ) |
| 365 | { | 378 | { |
