コード例 #1
0
        static void Main()
        {
            var callback = new DemoCallback();
            var context  = new InstanceContext(callback);
            var proxy    = new TwoWay(context);

            callback.ReceiveHeartbeat += Callback_ReceiveHeartbeat;

            var user = proxy.Login(Environment.UserName, GetIPAddress(), Assembly.GetExecutingAssembly().GetName().Version.ToString());

            _log.Info("Logged In: " + user);

            _log.Info("Press any key to close.");
            Console.Read();

            callback.ReceiveHeartbeat -= Callback_ReceiveHeartbeat;

            proxy.Logout();
            proxy.Close();
        }
コード例 #2
0
 public static extern Int32 EnumWindows(DemoCallback callback, Int32 param);