Skip to content

Commit

Permalink
win: fix custom actions for WiX older than 3.9
Browse files Browse the repository at this point in the history
Older WiX versions included a header with extern "C" declaration,
hence the custom action source must be C++.
  • Loading branch information
joaocgreis committed Jul 21, 2015
1 parent 96232ce commit 4342efb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <wcautil.h>


UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
extern "C" UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
HRESULT hr = S_OK;
UINT er = ERROR_SUCCESS;

Expand All @@ -27,7 +27,7 @@ UINT WINAPI BroadcastEnvironmentUpdate(MSIHANDLE hInstall) {
}


BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
extern "C" BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ulReason, VOID* dummy) {
switch (ulReason) {
case DLL_PROCESS_ATTACH:
WcaGlobalInitialize(hInst);
Expand Down
2 changes: 1 addition & 1 deletion tools/msvs/msi/custom_actions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="custom_actions.c">
<ClCompile Include="custom_actions.cc">
</ClCompile>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 4342efb

Please sign in to comment.