aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil/file_util.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-02-20 01:19:42 +0000
committerGerald Combs <gerald@wireshark.org>2013-02-20 01:19:42 +0000
commitbd4cffae586b5207aae62dcb8a55690b23e42dd0 (patch)
tree5f89150713a57eb73ee3e5721481a6ac4637eb27 /wsutil/file_util.c
parentcf1070b4b12e97a7b2c233bdc966e7ff3972acb5 (diff)
downloadwireshark-bd4cffae586b5207aae62dcb8a55690b23e42dd0.tar.gz
wireshark-bd4cffae586b5207aae62dcb8a55690b23e42dd0.tar.bz2
wireshark-bd4cffae586b5207aae62dcb8a55690b23e42dd0.zip
When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask the user to close Wireshark if it's found. While not perfect this makes the WinSparkle update process much less annoying. svn path=/trunk/; revision=47758
Diffstat (limited to 'wsutil/file_util.c')
-rw-r--r--wsutil/file_util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/wsutil/file_util.c b/wsutil/file_util.c
index c9186c423d..1efc7cc39c 100644
--- a/wsutil/file_util.c
+++ b/wsutil/file_util.c
@@ -614,3 +614,10 @@ getenv_utf8(const char *varname)
return envvar;
}
+
+/** Create or open a "Wireshark is running" mutex.
+ */
+#define WIRESHARK_IS_RUNNING_UUID "9CA78EEA-EA4D-4490-9240-FC01FCEF464B"
+void create_app_running_mutex() {
+ CreateMutex(NULL, FALSE, _T("Wireshark-is-running-{") _T(WIRESHARK_IS_RUNNING_UUID) _T("}"));
+}