From 3d73efba15565f5995a492e660dff72286e0b672 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 27 Oct 2021 15:29:47 -0500 Subject: Remove dutil types from BAFunctions. --- src/api/burn/balutil/inc/BAFunctions.h | 7 +++--- src/api/burn/balutil/inc/BalBaseBAFunctions.h | 30 ++++++++--------------- src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | 4 +-- src/api/burn/balutil/inc/IBAFunctions.h | 8 +++--- src/api/burn/test/BalUtilUnitTest/precomp.h | 2 -- 5 files changed, 18 insertions(+), 33 deletions(-) (limited to 'src/api') diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 0eda95a1..149a12f8 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h @@ -178,8 +178,7 @@ struct BA_FUNCTIONS_ONTHEMECONTROLWMNOTIFY_RESULTS struct BA_FUNCTIONS_ONTHEMELOADED_ARGS { DWORD cbSize; - THEME* pTheme; - WIX_LOCALIZATION* pWixLoc; + HWND hWnd; }; struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS @@ -190,7 +189,6 @@ struct BA_FUNCTIONS_ONTHEMELOADED_RESULTS struct BA_FUNCTIONS_WNDPROC_ARGS { DWORD cbSize; - THEME* pTheme; HWND hWnd; UINT uMsg; WPARAM wParam; @@ -200,7 +198,8 @@ struct BA_FUNCTIONS_WNDPROC_ARGS struct BA_FUNCTIONS_WNDPROC_RESULTS { DWORD cbSize; - LRESULT lres; + BOOL fProcessed; + LRESULT lResult; }; typedef HRESULT(WINAPI *PFN_BA_FUNCTIONS_CREATE)( diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index d97df350..1493253b 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h @@ -5,9 +5,6 @@ #include #include -#include "dutil.h" -#include "locutil.h" -#include "thmutil.h" #include "BAFunctions.h" #include "IBAFunctions.h" #include "BootstrapperEngine.h" @@ -803,32 +800,26 @@ public: // IBAFunctions } virtual STDMETHODIMP OnThemeLoaded( - THEME* pTheme, - WIX_LOCALIZATION* pWixLoc + __in HWND hWnd ) { HRESULT hr = S_OK; - m_pTheme = pTheme; - m_pWixLoc = pWixLoc; + m_hwndParent = hWnd; return hr; } virtual STDMETHODIMP WndProc( - __in THEME* pTheme, - __in HWND hWnd, - __in UINT uMsg, - __in WPARAM wParam, - __in LPARAM lParam, - __inout LRESULT* plRes + __in HWND /*hWnd*/, + __in UINT /*uMsg*/, + __in WPARAM /*wParam*/, + __in LPARAM /*lParam*/, + __inout BOOL* /*pfProcessed*/, + __inout LRESULT* /*plResult*/ ) { - HRESULT hr = S_OK; - - *plRes = ThemeDefWindowProc(pTheme, hWnd, uMsg, wParam, lParam); - - return hr; + return S_OK; } virtual STDMETHODIMP BAFunctionsProc( @@ -917,6 +908,5 @@ protected: BA_FUNCTIONS_CREATE_ARGS m_bafCreateArgs; BOOTSTRAPPER_CREATE_ARGS m_baCreateArgs; BOOTSTRAPPER_COMMAND m_command; - THEME* m_pTheme; - WIX_LOCALIZATION* m_pWixLoc; + HWND m_hwndParent; }; diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index 2af231e8..135f7c76 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h @@ -12,7 +12,7 @@ static HRESULT BalBaseBAFunctionsProcOnThemeLoaded( __inout BA_FUNCTIONS_ONTHEMELOADED_RESULTS* /*pResults*/ ) { - return pBAFunctions->OnThemeLoaded(pArgs->pTheme, pArgs->pWixLoc); + return pBAFunctions->OnThemeLoaded(pArgs->hWnd); } static HRESULT BalBaseBAFunctionsProcWndProc( @@ -21,7 +21,7 @@ static HRESULT BalBaseBAFunctionsProcWndProc( __inout BA_FUNCTIONS_WNDPROC_RESULTS* pResults ) { - return pBAFunctions->WndProc(pArgs->pTheme, pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->lres); + return pBAFunctions->WndProc(pArgs->hWnd, pArgs->uMsg, pArgs->wParam, pArgs->lParam, &pResults->fProcessed, &pResults->lResult); } static HRESULT BalBaseBAFunctionsProcOnThemeControlLoading( diff --git a/src/api/burn/balutil/inc/IBAFunctions.h b/src/api/burn/balutil/inc/IBAFunctions.h index 2e71608d..50126ba1 100644 --- a/src/api/burn/balutil/inc/IBAFunctions.h +++ b/src/api/burn/balutil/inc/IBAFunctions.h @@ -7,20 +7,18 @@ DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49 // OnThemeLoaded - Called after the BA finished loading all the controls for the theme. // STDMETHOD(OnThemeLoaded)( - THEME* pTheme, - WIX_LOCALIZATION* pWixLoc + __in HWND hWnd ) = 0; // WndProc - Called if the BA hasn't handled the message. - // The implementation must either return E_NOTIMPL or call ThemeDefWindowProc for unhandled messages. // STDMETHOD(WndProc)( - __in THEME* pTheme, __in HWND hWnd, __in UINT uMsg, __in WPARAM wParam, __in LPARAM lParam, - __inout LRESULT* plRes + __inout BOOL* pfProcessed, + __inout LRESULT* plResult ) = 0; // BAFunctionsProc - The PFN_BA_FUNCTIONS_PROC can call this method to give the BAFunctions raw access to the callback from WixStdBA. diff --git a/src/api/burn/test/BalUtilUnitTest/precomp.h b/src/api/burn/test/BalUtilUnitTest/precomp.h index f4a35e20..ce893906 100644 --- a/src/api/burn/test/BalUtilUnitTest/precomp.h +++ b/src/api/burn/test/BalUtilUnitTest/precomp.h @@ -14,8 +14,6 @@ #include #include -#include -#include #include #include -- cgit v1.2.3-55-g6feb