Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Catch the exception properly when wvdbusd.dll can't be found.

  • Loading branch information...
commit aaae010a7dcf4957601df5c21c4d4974a6a65c72 1 parent eae9e48
@apenwarr authored
View
1  versaplexd/versaplexd.cs
@@ -73,6 +73,7 @@ static void _StartDBusServerThread(string[] monikers)
static void StartDBusServerThread(string[] monikers)
{
if (monikers.Length == 0) return;
+ wv.assert(WvDBusServer.check() == 42, "wvdbusd.dll test failed");
thread_ready.Reset();
dbusserver_thread = new Thread(() => _StartDBusServerThread(monikers));
dbusserver_thread.Start();
View
8 versaplexd/wvdbusserver.cs
@@ -15,6 +15,14 @@ public class WvDBusServer : IDisposable
[DllImport("wvdbusd.dll")]
static extern void wvdbusd_runonce();
+ [DllImport("wvdbusd.dll")]
+ static extern int wvdbusd_check();
+
+ public static int check()
+ {
+ return wvdbusd_check();
+ }
+
public WvDBusServer()
{
wvdbusd_start();
View
5 vxodbc/wvdbusd.cc
@@ -42,3 +42,8 @@ extern "C" void wvdbusd_runonce()
// with.
s->runonce(1000);
}
+
+extern "C" int wvdbusd_check()
+{
+ return 42;
+}
View
1  vxodbc/wvdbusd.def
@@ -4,3 +4,4 @@ wvdbusd_start @1
wvdbusd_stop @2
wvdbusd_listen @3
wvdbusd_runonce @4
+wvdbusd_check @5
View
1  vxodbc/wvdbusd.link
@@ -4,6 +4,7 @@
wvdbusd_stop;
wvdbusd_listen;
wvdbusd_runonce;
+ wvdbusd_check;
local:
*;
};
Please sign in to comment.
Something went wrong with that request. Please try again.