summaryrefslogtreecommitdiffhomepage
path: root/windows/nsis-plugins/src/cleanup/cleanup.cpp
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2020-11-19 01:37:02 +0100
committerDavid Lönnhager <david.l@mullvad.net>2020-11-19 01:37:02 +0100
commitb72f29cd885c2e9c02b27f72cd93683aba253e8d (patch)
tree2ae9c173dd125573d34f0d0eb1e8638110390fe5 /windows/nsis-plugins/src/cleanup/cleanup.cpp
parente3f66f7dc55fb68efbb605b21aa66336ea653c7a (diff)
parent2c6cd3a4797821984e1c212803890276b0ef3626 (diff)
downloadmullvadvpn-b72f29cd885c2e9c02b27f72cd93683aba253e8d.tar.xz
mullvadvpn-b72f29cd885c2e9c02b27f72cd93683aba253e8d.zip
Merge branch 'update-api-ip-cache'
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleanup.cpp')
-rw-r--r--windows/nsis-plugins/src/cleanup/cleanup.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleanup.cpp b/windows/nsis-plugins/src/cleanup/cleanup.cpp
index faef07c2f0..528efb2f7a 100644
--- a/windows/nsis-plugins/src/cleanup/cleanup.cpp
+++ b/windows/nsis-plugins/src/cleanup/cleanup.cpp
@@ -100,3 +100,34 @@ void __declspec(dllexport) NSISCALL RemoveRelayCache
pushint(NsisStatus::GENERAL_ERROR);
}
}
+
+void __declspec(dllexport) NSISCALL RemoveApiAddressCache
+(
+ HWND hwndParent,
+ int string_size,
+ LPTSTR variables,
+ stack_t **stacktop,
+ extra_parameters *extra,
+ ...
+)
+{
+ EXDLL_INIT();
+
+ try
+ {
+ cleaningops::RemoveApiAddressCacheServiceUser();
+
+ pushstring(L"");
+ pushint(NsisStatus::SUCCESS);
+ }
+ catch (const std::exception &err)
+ {
+ pushstring(common::string::ToWide(err.what()).c_str());
+ pushint(NsisStatus::GENERAL_ERROR);
+ }
+ catch (...)
+ {
+ pushstring(L"Unspecified error");
+ pushint(NsisStatus::GENERAL_ERROR);
+ }
+}