Пример #1
0
        public DDEServer(System.Windows.Forms.Form form)
        {
            _coile        = new bool[30];
            _ddeAppServer = DdeAppServer.SingleInstance(form);
            _ddeAppServer.ClientConnected += _ddeAppServer_ClientConnected;
            _ddeAppServer.SetFunctionCallback(OnFunctionCall);
            _ddeAppServer.SetVariableReadCallback(variableReadCallBack);
            _ddeAppServer.RegisterFunction("GetCoiles", "");
            _ddeAppServer.RegisterVariable("coile0", DdeVariableType.String, true);
            _ddeAppServer.RegisterVariable("coile1", DdeVariableType.String, true);
            _ddeAppServer.RegisterVariable("coile2", DdeVariableType.String, true);
            _ddeAppServer.RegisterVariable("coile3", DdeVariableType.String, true);

            _ddeAppServer.Online();
        }
Пример #2
0
 static void Main(string[] args)
 {
     DdeAppServer ddeAppServer = DdeAppServer.SingleInstance();
 }