Esempio n. 1
0
        private unsafe void DisposeContext()
        {
            if (_context != null)
            {
                PubSub.UnSubscribeToTerminate(_context, _terminateEventHandlerDelegate);
                PubSub.UnSubscribeToErrorInfo(_context, _errorInfoEventHandlerDelegate);

                NativeMethods.freerdp_context_free(_freerdp);
                _context = null;
            }
        }
Esempio n. 2
0
        private void ContextNew(freerdp *instance, rdpContext *context)
        {
            Debug.WriteLine("ContextNew");

            _hPreConnect  = new pPreConnect(this.PreConnect);
            _hPostConnect = new pPostConnect(this.PostConnect);

            instance->PreConnect  = Marshal.GetFunctionPointerForDelegate(_hPreConnect);
            instance->PostConnect = Marshal.GetFunctionPointerForDelegate(_hPostConnect);

            this._context = context;
            _input        = instance->input;

            PubSub.SubscribeToTerminate(_context, _terminateEventHandlerDelegate);
            PubSub.SubscribeToErrorInfo(_context, _errorInfoEventHandlerDelegate);
        }