I also tried the example application (echo-server und echo-client) from
the dbus-sharp source package.
echo-client.cs
namespace Foo
{
using System;
using DBus;
public class EchoClient
{
public static int Main(string [] args)
{
Connection connection = Bus.GetSessionBus();
Service service = Service.Get(connection, "org.freedesktop.Test");
Echoer echoer = (Echoer)
service.GetObject(typeof(Echoer), "/org/freedesktop/Test/Echoer");
System.Console.WriteLine(echoer.Echo("Hello world!"));
return 0;
}
}
}
Gives the following output:
I received: Hello world!
Reply: Hello world!
Stacktrace:
at (wrapper managed-to-native)
System.Threading.Monitor.Monitor_try_enter (object,int) <0x00004>
at (wrapper managed-to-native)
System.Threading.Monitor.Monitor_try_enter (object,int) <0xffffffff>
at System.Threading.Monitor.Enter (object) <0x00013>
at (wrapper synchronized) DBus.Service.remove_SignalCalled
(DBus.Service/SignalCalledHandler) <0xffffffff>
at Foo.Echoer.Proxy.Finalize () <0x00015>
at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>
... and so on ...
--
Sven Pilz <[EMAIL PROTECTED]>
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]