From d3320ca1f3a433fac7886cf3a32cf808ac1b4cb9 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Tue, 30 Mar 2021 12:02:50 +0200 Subject: [PATCH] Inline MSICA_API It's deterministic: MSICA is always DLL. It's exported functions are used by MsiExec and always loaded dynamically (never imported using MSICA.lib). Signed-off-by: Simon Rozman --- MSICA/MSICA.cpp | 4 ++-- MSICA/MSICA.h | 16 ++-------------- MSICA/pch.h | 4 ---- lib/WinStd | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/MSICA/MSICA.cpp b/MSICA/MSICA.cpp index 039b1d8..44a439f 100644 --- a/MSICA/MSICA.cpp +++ b/MSICA/MSICA.cpp @@ -82,7 +82,7 @@ extern "C" BOOL WINAPI DllMain(_In_ HINSTANCE hInstance, _In_ DWORD dwReason, _I // Exported functions //////////////////////////////////////////////////////////////////// -UINT MSICA_API MSICAInitialize(MSIHANDLE hInstall) +UINT __declspec(dllexport) MSICAInitialize(MSIHANDLE hInstall) { //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); @@ -588,7 +588,7 @@ UINT MSICA_API MSICAInitialize(MSIHANDLE hInstall) } -UINT MSICA_API ExecuteSequence(MSIHANDLE hInstall) +UINT __declspec(dllexport) ExecuteSequence(MSIHANDLE hInstall) { //::MessageBox(NULL, _T(__FUNCTION__), _T("MSICA"), MB_OK); diff --git a/MSICA/MSICA.h b/MSICA/MSICA.h index 0ec101f..87bc9e8 100644 --- a/MSICA/MSICA.h +++ b/MSICA/MSICA.h @@ -38,18 +38,6 @@ #include -//////////////////////////////////////////////////////////////////// -// Calling declaration -//////////////////////////////////////////////////////////////////// - -#if defined(MSICA_DLL) -#define MSICA_API __declspec(dllexport) -#elif defined(MSICA_DLLIMP) -#define MSICA_API __declspec(dllimport) -#else -#define MSICA_API -#endif - //////////////////////////////////////////////////////////////////// // Exported functions //////////////////////////////////////////////////////////////////// @@ -58,8 +46,8 @@ extern "C" { #endif - UINT MSICA_API MSICAInitialize(MSIHANDLE hInstall); - UINT MSICA_API ExecuteSequence(MSIHANDLE hInstall); + UINT __declspec(dllexport) MSICAInitialize(MSIHANDLE hInstall); + UINT __declspec(dllexport) ExecuteSequence(MSIHANDLE hInstall); #ifdef __cplusplus } diff --git a/MSICA/pch.h b/MSICA/pch.h index 80a156c..87a88ad 100644 --- a/MSICA/pch.h +++ b/MSICA/pch.h @@ -19,10 +19,6 @@ #pragma once -#ifdef _WINDLL -#define MSICA_DLL // This library is compiled as a DLL -#endif - #include #include diff --git a/lib/WinStd b/lib/WinStd index 96e1882..51b262b 160000 --- a/lib/WinStd +++ b/lib/WinStd @@ -1 +1 @@ -Subproject commit 96e18824059bd8225ab99126e16b33cf50734873 +Subproject commit 51b262b38223fbce3b9b43812ad0ff5ef88bdeb4