summaryrefslogtreecommitdiffhomepage
path: root/windows/nsis-plugins/src/cleanup/cleanup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'windows/nsis-plugins/src/cleanup/cleanup.cpp')
-rw-r--r--windows/nsis-plugins/src/cleanup/cleanup.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/windows/nsis-plugins/src/cleanup/cleanup.cpp b/windows/nsis-plugins/src/cleanup/cleanup.cpp
index c7890d60b7..ea8d59ac79 100644
--- a/windows/nsis-plugins/src/cleanup/cleanup.cpp
+++ b/windows/nsis-plugins/src/cleanup/cleanup.cpp
@@ -1,5 +1,6 @@
#include <stdafx.h>
#include "cleaningops.h"
+#include <libcommon/string.h>
#include <windows.h>
#include <nsis/pluginapi.h>
#include <functional>
@@ -79,3 +80,40 @@ void __declspec(dllexport) NSISCALL RemoveSettings
pushint(RemoveSettingsStatus::GENERAL_ERROR);
}
}
+
+enum class RemoveRelayCacheStatus
+{
+ GENERAL_ERROR = 0,
+ SUCCESS
+};
+
+void __declspec(dllexport) NSISCALL RemoveRelayCache
+(
+ HWND hwndParent,
+ int string_size,
+ LPTSTR variables,
+ stack_t **stacktop,
+ extra_parameters *extra,
+ ...
+)
+{
+ EXDLL_INIT();
+
+ try
+ {
+ cleaningops::RemoveRelayCacheServiceUser();
+
+ pushstring(L"");
+ pushint(RemoveRelayCacheStatus::SUCCESS);
+ }
+ catch (const std::exception &err)
+ {
+ pushstring(common::string::ToWide(err.what()).c_str());
+ pushint(RemoveRelayCacheStatus::GENERAL_ERROR);
+ }
+ catch (...)
+ {
+ pushstring(L"Unspecified error");
+ pushint(RemoveRelayCacheStatus::GENERAL_ERROR);
+ }
+}