diff options
Diffstat (limited to 'src/burn')
-rw-r--r-- | src/burn/engine/engine.cpp | 4 | ||||
-rw-r--r-- | src/burn/engine/userexperience.cpp | 15 | ||||
-rw-r--r-- | src/burn/engine/userexperience.h | 4 |
3 files changed, 15 insertions, 8 deletions
diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index ee848acf..a408ed4a 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp | |||
@@ -796,7 +796,7 @@ LExit: | |||
796 | else if (BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER == shutdownAction) | 796 | else if (BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER == shutdownAction) |
797 | { | 797 | { |
798 | LogId(REPORT_STANDARD, MSG_BA_REQUESTED_RELOAD); | 798 | LogId(REPORT_STANDARD, MSG_BA_REQUESTED_RELOAD); |
799 | *pfReloadApp = TRUE; | 799 | *pfReloadApp = SUCCEEDED(hr); |
800 | } | 800 | } |
801 | else if (BOOTSTRAPPER_SHUTDOWN_ACTION_SKIP_CLEANUP == shutdownAction) | 801 | else if (BOOTSTRAPPER_SHUTDOWN_ACTION_SKIP_CLEANUP == shutdownAction) |
802 | { | 802 | { |
@@ -806,7 +806,7 @@ LExit: | |||
806 | } | 806 | } |
807 | 807 | ||
808 | // Unload BA. | 808 | // Unload BA. |
809 | UserExperienceUnload(&pEngineState->userExperience); | 809 | UserExperienceUnload(&pEngineState->userExperience, *pfReloadApp); |
810 | 810 | ||
811 | return hr; | 811 | return hr; |
812 | } | 812 | } |
diff --git a/src/burn/engine/userexperience.cpp b/src/burn/engine/userexperience.cpp index 4325a6ee..87ef4de1 100644 --- a/src/burn/engine/userexperience.cpp +++ b/src/burn/engine/userexperience.cpp | |||
@@ -122,7 +122,6 @@ extern "C" HRESULT UserExperienceLoad( | |||
122 | 122 | ||
123 | pUserExperience->pfnBAProc = results.pfnBootstrapperApplicationProc; | 123 | pUserExperience->pfnBAProc = results.pfnBootstrapperApplicationProc; |
124 | pUserExperience->pvBAProcContext = results.pvBootstrapperApplicationProcContext; | 124 | pUserExperience->pvBAProcContext = results.pvBootstrapperApplicationProcContext; |
125 | pUserExperience->fDisableUnloading = results.fDisableUnloading; | ||
126 | 125 | ||
127 | LExit: | 126 | LExit: |
128 | return hr; | 127 | return hr; |
@@ -133,10 +132,18 @@ LExit: | |||
133 | 132 | ||
134 | *******************************************************************/ | 133 | *******************************************************************/ |
135 | extern "C" HRESULT UserExperienceUnload( | 134 | extern "C" HRESULT UserExperienceUnload( |
136 | __in BURN_USER_EXPERIENCE* pUserExperience | 135 | __in BURN_USER_EXPERIENCE* pUserExperience, |
136 | __in BOOL fReload | ||
137 | ) | 137 | ) |
138 | { | 138 | { |
139 | HRESULT hr = S_OK; | 139 | HRESULT hr = S_OK; |
140 | BOOTSTRAPPER_DESTROY_ARGS args = { }; | ||
141 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; | ||
142 | |||
143 | args.cbSize = sizeof(BOOTSTRAPPER_DESTROY_ARGS); | ||
144 | args.fReload = fReload; | ||
145 | |||
146 | results.cbSize = sizeof(BOOTSTRAPPER_DESTROY_RESULTS); | ||
140 | 147 | ||
141 | if (pUserExperience->hUXModule) | 148 | if (pUserExperience->hUXModule) |
142 | { | 149 | { |
@@ -144,11 +151,11 @@ extern "C" HRESULT UserExperienceUnload( | |||
144 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(pUserExperience->hUXModule, "BootstrapperApplicationDestroy"); | 151 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(pUserExperience->hUXModule, "BootstrapperApplicationDestroy"); |
145 | if (pfnDestroy) | 152 | if (pfnDestroy) |
146 | { | 153 | { |
147 | pfnDestroy(); | 154 | pfnDestroy(&args, &results); |
148 | } | 155 | } |
149 | 156 | ||
150 | // Free BA DLL if it supports it. | 157 | // Free BA DLL if it supports it. |
151 | if (!pUserExperience->fDisableUnloading && !::FreeLibrary(pUserExperience->hUXModule)) | 158 | if (!results.fDisableUnloading && !::FreeLibrary(pUserExperience->hUXModule)) |
152 | { | 159 | { |
153 | hr = HRESULT_FROM_WIN32(::GetLastError()); | 160 | hr = HRESULT_FROM_WIN32(::GetLastError()); |
154 | TraceError(hr, "Failed to unload BA DLL."); | 161 | TraceError(hr, "Failed to unload BA DLL."); |
diff --git a/src/burn/engine/userexperience.h b/src/burn/engine/userexperience.h index e7489710..94b73f7d 100644 --- a/src/burn/engine/userexperience.h +++ b/src/burn/engine/userexperience.h | |||
@@ -22,7 +22,6 @@ typedef struct _BURN_USER_EXPERIENCE | |||
22 | HMODULE hUXModule; | 22 | HMODULE hUXModule; |
23 | PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBAProc; | 23 | PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBAProc; |
24 | LPVOID pvBAProcContext; | 24 | LPVOID pvBAProcContext; |
25 | BOOL fDisableUnloading; | ||
26 | LPWSTR sczTempDirectory; | 25 | LPWSTR sczTempDirectory; |
27 | 26 | ||
28 | CRITICAL_SECTION csEngineActive; // Changing the engine active state in the user experience must be | 27 | CRITICAL_SECTION csEngineActive; // Changing the engine active state in the user experience must be |
@@ -61,7 +60,8 @@ HRESULT UserExperienceLoad( | |||
61 | __in BOOTSTRAPPER_COMMAND* pCommand | 60 | __in BOOTSTRAPPER_COMMAND* pCommand |
62 | ); | 61 | ); |
63 | HRESULT UserExperienceUnload( | 62 | HRESULT UserExperienceUnload( |
64 | __in BURN_USER_EXPERIENCE* pUserExperience | 63 | __in BURN_USER_EXPERIENCE* pUserExperience, |
64 | __in BOOL fReload | ||
65 | ); | 65 | ); |
66 | HRESULT UserExperienceEnsureWorkingFolder( | 66 | HRESULT UserExperienceEnsureWorkingFolder( |
67 | __in BURN_CACHE* pCache, | 67 | __in BURN_CACHE* pCache, |