diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-24 12:26:02 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-27 11:14:21 -0500 |
| commit | 4f41db7eaa48b0e061a68fd5fc70ce6d127d9039 (patch) | |
| tree | 4f15f65a79f2482b6948c69eb6673b0bf230530c /src/burn/stub/stub.cpp | |
| parent | 00c2987aabe6a003b1345ebe1ff3a4bd58d8222e (diff) | |
| download | wix-4f41db7eaa48b0e061a68fd5fc70ce6d127d9039.tar.gz wix-4f41db7eaa48b0e061a68fd5fc70ce6d127d9039.tar.bz2 wix-4f41db7eaa48b0e061a68fd5fc70ce6d127d9039.zip | |
Burn can only log errors while logutil is initialized and not closed.
Diffstat (limited to '')
| -rw-r--r-- | src/burn/stub/stub.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/burn/stub/stub.cpp b/src/burn/stub/stub.cpp index 090a8dbb..339a54da 100644 --- a/src/burn/stub/stub.cpp +++ b/src/burn/stub/stub.cpp | |||
| @@ -3,16 +3,6 @@ | |||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | static void CALLBACK BurnTraceError( | ||
| 7 | __in_z LPCSTR szFile, | ||
| 8 | __in int iLine, | ||
| 9 | __in REPORT_LEVEL rl, | ||
| 10 | __in UINT source, | ||
| 11 | __in HRESULT hrError, | ||
| 12 | __in_z __format_string LPCSTR szFormat, | ||
| 13 | __in va_list args | ||
| 14 | ); | ||
| 15 | |||
| 16 | int WINAPI wWinMain( | 6 | int WINAPI wWinMain( |
| 17 | __in HINSTANCE hInstance, | 7 | __in HINSTANCE hInstance, |
| 18 | __in_opt HINSTANCE /* hPrevInstance */, | 8 | __in_opt HINSTANCE /* hPrevInstance */, |
| @@ -40,8 +30,6 @@ int WINAPI wWinMain( | |||
| 40 | L"feclient.dll", // unsafely loaded by DecryptFile(). | 30 | L"feclient.dll", // unsafely loaded by DecryptFile(). |
| 41 | }; | 31 | }; |
| 42 | 32 | ||
| 43 | DutilInitialize(&BurnTraceError); | ||
| 44 | |||
| 45 | // Best effort attempt to get our file handle as soon as possible. | 33 | // Best effort attempt to get our file handle as soon as possible. |
| 46 | hr = PathForCurrentProcess(&sczPath, NULL); | 34 | hr = PathForCurrentProcess(&sczPath, NULL); |
| 47 | if (SUCCEEDED(hr)) | 35 | if (SUCCEEDED(hr)) |
| @@ -72,37 +60,6 @@ LExit: | |||
| 72 | ReleaseFileHandle(hEngineFile); | 60 | ReleaseFileHandle(hEngineFile); |
| 73 | ReleaseStr(sczPath); | 61 | ReleaseStr(sczPath); |
| 74 | 62 | ||
| 75 | DutilUninitialize(); | ||
| 76 | 63 | ||
| 77 | return FAILED(hr) ? (int)hr : (int)dwExitCode; | 64 | return FAILED(hr) ? (int)hr : (int)dwExitCode; |
| 78 | } | 65 | } |
| 79 | |||
| 80 | static void CALLBACK BurnTraceError( | ||
| 81 | __in_z LPCSTR /*szFile*/, | ||
| 82 | __in int /*iLine*/, | ||
| 83 | __in REPORT_LEVEL /*rl*/, | ||
| 84 | __in UINT source, | ||
| 85 | __in HRESULT hrError, | ||
| 86 | __in_z __format_string LPCSTR szFormat, | ||
| 87 | __in va_list args | ||
| 88 | ) | ||
| 89 | { | ||
| 90 | BOOL fLog = FALSE; | ||
| 91 | |||
| 92 | switch (source) | ||
| 93 | { | ||
| 94 | case DUTIL_SOURCE_DEFAULT: | ||
| 95 | fLog = TRUE; | ||
| 96 | break; | ||
| 97 | default: | ||
| 98 | fLog = REPORT_VERBOSE < LogGetLevel(); | ||
| 99 | break; | ||
| 100 | } | ||
| 101 | |||
| 102 | if (fLog) | ||
| 103 | { | ||
| 104 | DutilSuppressTraceErrorSource(); | ||
| 105 | LogErrorStringArgs(hrError, szFormat, args); | ||
| 106 | DutilUnsuppressTraceErrorSource(); | ||
| 107 | } | ||
| 108 | } | ||
