Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public void RegisterInterface(ISecondaryUpdate iSecondary)
        {
            CacheBitmap     = new CacheBitmapDelegate(iSecondary.CacheBitmap);
            CacheBitmapV2   = new CacheBitmapV2Delegate(iSecondary.CacheBitmapV2);
            CacheBitmapV3   = new CacheBitmapV3Delegate(iSecondary.CacheBitmapV3);
            CacheColorTable = new CacheColorTableDelegate(iSecondary.CacheColorTable);
            CacheGlyph      = new CacheGlyphDelegate(iSecondary.CacheGlyph);
            CacheGlyphV2    = new CacheGlyphV2Delegate(iSecondary.CacheGlyphV2);
            CacheBrush      = new CacheBrushDelegate(iSecondary.CacheBrush);

            secondary->CacheBitmap     = Marshal.GetFunctionPointerForDelegate(CacheBitmap);
            secondary->CacheBitmapV2   = Marshal.GetFunctionPointerForDelegate(CacheBitmapV2);
            secondary->CacheBitmapV3   = Marshal.GetFunctionPointerForDelegate(CacheBitmapV3);
            secondary->CacheColorTable = Marshal.GetFunctionPointerForDelegate(CacheColorTable);
            secondary->CacheGlyph      = Marshal.GetFunctionPointerForDelegate(CacheGlyph);
            secondary->CacheGlyphV2    = Marshal.GetFunctionPointerForDelegate(CacheGlyphV2);
            secondary->CacheBrush      = Marshal.GetFunctionPointerForDelegate(CacheBrush);
        }
Ejemplo n.º 4
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;
        }
Ejemplo n.º 5
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);
        }
Ejemplo n.º 6
0
		public void RegisterInterface(ISecondaryUpdate iSecondary)
		{
			CacheBitmap = new CacheBitmapDelegate(iSecondary.CacheBitmap);
			CacheBitmapV2 = new CacheBitmapV2Delegate(iSecondary.CacheBitmapV2);
			CacheBitmapV3 = new CacheBitmapV3Delegate(iSecondary.CacheBitmapV3);
			CacheColorTable = new CacheColorTableDelegate(iSecondary.CacheColorTable);
			CacheGlyph = new CacheGlyphDelegate(iSecondary.CacheGlyph);
			CacheGlyphV2 = new CacheGlyphV2Delegate(iSecondary.CacheGlyphV2);
			CacheBrush = new CacheBrushDelegate(iSecondary.CacheBrush);

			secondary->CacheBitmap = Marshal.GetFunctionPointerForDelegate(CacheBitmap);
			secondary->CacheBitmapV2 = Marshal.GetFunctionPointerForDelegate(CacheBitmapV2);
			secondary->CacheBitmapV3 = Marshal.GetFunctionPointerForDelegate(CacheBitmapV3);
			secondary->CacheColorTable = Marshal.GetFunctionPointerForDelegate(CacheColorTable);
			secondary->CacheGlyph = Marshal.GetFunctionPointerForDelegate(CacheGlyph);
			secondary->CacheGlyphV2 = Marshal.GetFunctionPointerForDelegate(CacheGlyphV2);
			secondary->CacheBrush = Marshal.GetFunctionPointerForDelegate(CacheBrush);			
		}