Example #1
0
        public RDP()
        {
            if (winsock == -1)
            {
                winsock = Tcp.WSAStartup();
            }

            handle = freerdp_new();

            iUpdate          = null;
            iPrimaryUpdate   = null;
            iSecondaryUpdate = null;
            iAltSecUpdate    = null;

            hContextNew  = new pContextNew(ContextNew);
            hContextFree = new pContextFree(ContextFree);

            handle->ContextNew  = Marshal.GetFunctionPointerForDelegate(hContextNew);
            handle->ContextFree = Marshal.GetFunctionPointerForDelegate(hContextFree);

            hAuthenticate      = new pAuthenticate(Authenticate);
            hVerifyCertificate = new pVerifyCertificate(VerifyCertificate);

            handle->Authenticate      = Marshal.GetFunctionPointerForDelegate(hAuthenticate);
            handle->VerifyCertificate = Marshal.GetFunctionPointerForDelegate(hVerifyCertificate);

            freerdp_context_new(handle);
        }
Example #2
0
        public RDP()
        {
            handle = freerdp_new();

            iUpdate = null;
            iPrimaryUpdate = null;
            iSecondaryUpdate = null;
            iAltSecUpdate = null;

            hContextNew = new pContextNew(ContextNew);
            hContextFree = new pContextFree(ContextFree);

            handle->ContextNew = Marshal.GetFunctionPointerForDelegate(hContextNew);
            handle->ContextFree = Marshal.GetFunctionPointerForDelegate(hContextFree);

            freerdp_context_new(handle);
        }
Example #3
0
        public RDP()
        {
            string assemblyPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            if (_winsock == -1)
            {
                _winsock = Tcp.WSAStartup();
            }


            _freerdp = NativeMethods.freerdp_new();
            if (_freerdp == null)
            {
                throw new FreeRdpException("FreeRDP create failed");
            }

            _iUpdate          = null;
            _iPrimaryUpdate   = null;
            _iSecondaryUpdate = null;
            _iAltSecUpdate    = null;

            _terminateEventHandlerDelegate = new TerminateEventHandlerDelegate(TerminateEvent);
            _errorInfoEventHandlerDelegate = new ErrorInfoEventHandlerDelegate(ErrorInfoEvent);

            _hContextNew  = new pContextNew(ContextNew);
            _hContextFree = new pContextFree(ContextFree);

            _freerdp->ContextNew  = Marshal.GetFunctionPointerForDelegate(_hContextNew);
            _freerdp->ContextFree = Marshal.GetFunctionPointerForDelegate(_hContextFree);

            _hAuthenticate      = new pAuthenticate(Authenticate);
            _hVerifyCertificate = new pVerifyCertificate(VerifyCertificate);

            _freerdp->Authenticate      = Marshal.GetFunctionPointerForDelegate(_hAuthenticate);
            _freerdp->VerifyCertificate = Marshal.GetFunctionPointerForDelegate(_hVerifyCertificate);

            //NativeMethods.freerdp_context_new(_freerdp);

            //_settings = _freerdp->settings;
        }
Example #4
0
        public RDP()
        {
            handle = freerdp_new();

            iUpdate = null;
            iPrimaryUpdate = null;
            iSecondaryUpdate = null;
            iAltSecUpdate = null;

            hContextNew = new pContextNew(ContextNew);
            hContextFree = new pContextFree(ContextFree);

            handle->ContextNew = Marshal.GetFunctionPointerForDelegate(hContextNew);
            handle->ContextFree = Marshal.GetFunctionPointerForDelegate(hContextFree);

            hAuthenticate = new pAuthenticate(Authenticate);
            hVerifyCertificate = new pVerifyCertificate(VerifyCertificate);

            handle->Authenticate = Marshal.GetFunctionPointerForDelegate(hAuthenticate);
            handle->VerifyCertificate = Marshal.GetFunctionPointerForDelegate(hVerifyCertificate);

            freerdp_context_new(handle);
        }