Exemplo 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);
        }
Exemplo n.º 2
0
 public void SetPrimaryUpdateInterface(IPrimaryUpdate iPrimaryUpdate)
 {
     if (_connected)
     {
         throw new FreeRdpException("Update interface must be registered before connection is made.");
     }
     this._iPrimaryUpdate = iPrimaryUpdate;
 }
Exemplo n.º 3
0
        public void RegisterInterface(IPrimaryUpdate iPrimary)
        {
            DstBlt            = new DstBltDelegate(iPrimary.DstBlt);
            PatBlt            = new PatBltDelegate(iPrimary.PatBlt);
            ScrBlt            = new ScrBltDelegate(iPrimary.ScrBlt);
            OpaqueRect        = new OpaqueRectDelegate(iPrimary.OpaqueRect);
            DrawNineGrid      = new DrawNineGridDelegate(iPrimary.DrawNineGrid);
            MultiDstBlt       = new MultiDstBltDelegate(iPrimary.MultiDstBlt);
            MultiPatBlt       = new MultiPatBltDelegate(iPrimary.MultiPatBlt);
            MultiScrBlt       = new MultiScrBltDelegate(iPrimary.MultiScrBlt);
            MultiOpaqueRect   = new MultiOpaqueRectDelegate(iPrimary.MultiOpaqueRect);
            MultiDrawNineGrid = new MultiDrawNineGridDelegate(iPrimary.MultiDrawNineGrid);
            LineTo            = new LineToDelegate(iPrimary.LineTo);
            Polyline          = new PolylineDelegate(iPrimary.Polyline);
            MemBlt            = new MemBltDelegate(iPrimary.MemBlt);
            Mem3Blt           = new Mem3BltDelegate(iPrimary.Mem3Blt);
            SaveBitmap        = new SaveBitmapDelegate(iPrimary.SaveBitmap);
            GlyphIndex        = new GlyphIndexDelegate(iPrimary.GlyphIndex);
            FastIndex         = new FastIndexDelegate(iPrimary.FastIndex);
            FastGlyph         = new FastGlyphDelegate(iPrimary.FastGlyph);
            PolygonSC         = new PolygonSCDelegate(iPrimary.PolygonSC);
            PolygonCB         = new PolygonCBDelegate(iPrimary.PolygonCB);
            EllipseSC         = new EllipseSCDelegate(iPrimary.EllipseSC);
            EllipseCB         = new EllipseCBDelegate(iPrimary.EllipseCB);

            primary->DstBlt            = Marshal.GetFunctionPointerForDelegate(DstBlt);
            primary->PatBlt            = Marshal.GetFunctionPointerForDelegate(PatBlt);
            primary->ScrBlt            = Marshal.GetFunctionPointerForDelegate(ScrBlt);
            primary->OpaqueRect        = Marshal.GetFunctionPointerForDelegate(OpaqueRect);
            primary->DrawNineGrid      = Marshal.GetFunctionPointerForDelegate(DrawNineGrid);
            primary->MultiDstBlt       = Marshal.GetFunctionPointerForDelegate(MultiDstBlt);
            primary->MultiPatBlt       = Marshal.GetFunctionPointerForDelegate(MultiPatBlt);
            primary->MultiScrBlt       = Marshal.GetFunctionPointerForDelegate(MultiScrBlt);
            primary->MultiOpaqueRect   = Marshal.GetFunctionPointerForDelegate(MultiOpaqueRect);
            primary->MultiDrawNineGrid = Marshal.GetFunctionPointerForDelegate(MultiDrawNineGrid);
            primary->LineTo            = Marshal.GetFunctionPointerForDelegate(LineTo);
            primary->Polyline          = Marshal.GetFunctionPointerForDelegate(Polyline);
            primary->MemBlt            = Marshal.GetFunctionPointerForDelegate(MemBlt);
            primary->Mem3Blt           = Marshal.GetFunctionPointerForDelegate(Mem3Blt);
            primary->SaveBitmap        = Marshal.GetFunctionPointerForDelegate(SaveBitmap);
            primary->GlyphIndex        = Marshal.GetFunctionPointerForDelegate(GlyphIndex);
            primary->FastIndex         = Marshal.GetFunctionPointerForDelegate(FastIndex);
            primary->FastGlyph         = Marshal.GetFunctionPointerForDelegate(FastGlyph);
            primary->PolygonSC         = Marshal.GetFunctionPointerForDelegate(PolygonSC);
            primary->PolygonCB         = Marshal.GetFunctionPointerForDelegate(PolygonCB);
            primary->EllipseSC         = Marshal.GetFunctionPointerForDelegate(EllipseSC);
            primary->EllipseCB         = Marshal.GetFunctionPointerForDelegate(EllipseCB);
        }
Exemplo n.º 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);

            freerdp_context_new(handle);
        }
Exemplo n.º 5
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;
        }
Exemplo n.º 6
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);
        }
Exemplo n.º 7
0
		public void SetPrimaryUpdateInterface(IPrimaryUpdate iPrimaryUpdate)
		{
			this.iPrimaryUpdate = iPrimaryUpdate;
		}
Exemplo n.º 8
0
 public void SetPrimaryUpdateInterface(IPrimaryUpdate iPrimaryUpdate)
 {
     this.iPrimaryUpdate = iPrimaryUpdate;
 }
Exemplo n.º 9
0
        public void RegisterInterface(IPrimaryUpdate iPrimary)
        {
            DstBlt = new DstBltDelegate(iPrimary.DstBlt);
            PatBlt = new PatBltDelegate(iPrimary.PatBlt);
            ScrBlt = new ScrBltDelegate(iPrimary.ScrBlt);
            OpaqueRect = new OpaqueRectDelegate(iPrimary.OpaqueRect);
            DrawNineGrid = new DrawNineGridDelegate(iPrimary.DrawNineGrid);
            MultiDstBlt = new MultiDstBltDelegate(iPrimary.MultiDstBlt);
            MultiPatBlt = new MultiPatBltDelegate(iPrimary.MultiPatBlt);
            MultiScrBlt = new MultiScrBltDelegate(iPrimary.MultiScrBlt);
            MultiOpaqueRect = new MultiOpaqueRectDelegate(iPrimary.MultiOpaqueRect);
            MultiDrawNineGrid = new MultiDrawNineGridDelegate(iPrimary.MultiDrawNineGrid);
            LineTo = new LineToDelegate(iPrimary.LineTo);
            Polyline = new PolylineDelegate(iPrimary.Polyline);
            MemBlt = new MemBltDelegate(iPrimary.MemBlt);
            Mem3Blt = new Mem3BltDelegate(iPrimary.Mem3Blt);
            SaveBitmap = new SaveBitmapDelegate(iPrimary.SaveBitmap);
            GlyphIndex = new GlyphIndexDelegate(iPrimary.GlyphIndex);
            FastIndex = new FastIndexDelegate(iPrimary.FastIndex);
            FastGlyph = new FastGlyphDelegate(iPrimary.FastGlyph);
            PolygonSC = new PolygonSCDelegate(iPrimary.PolygonSC);
            PolygonCB = new PolygonCBDelegate(iPrimary.PolygonCB);
            EllipseSC = new EllipseSCDelegate(iPrimary.EllipseSC);
            EllipseCB = new EllipseCBDelegate(iPrimary.EllipseCB);

            primary->DstBlt = Marshal.GetFunctionPointerForDelegate(DstBlt);
            primary->PatBlt = Marshal.GetFunctionPointerForDelegate(PatBlt);
            primary->ScrBlt = Marshal.GetFunctionPointerForDelegate(ScrBlt);
            primary->OpaqueRect = Marshal.GetFunctionPointerForDelegate(OpaqueRect);
            primary->DrawNineGrid = Marshal.GetFunctionPointerForDelegate(DrawNineGrid);
            primary->MultiDstBlt = Marshal.GetFunctionPointerForDelegate(MultiDstBlt);
            primary->MultiPatBlt = Marshal.GetFunctionPointerForDelegate(MultiPatBlt);
            primary->MultiScrBlt = Marshal.GetFunctionPointerForDelegate(MultiScrBlt);
            primary->MultiOpaqueRect = Marshal.GetFunctionPointerForDelegate(MultiOpaqueRect);
            primary->MultiDrawNineGrid = Marshal.GetFunctionPointerForDelegate(MultiDrawNineGrid);
            primary->LineTo = Marshal.GetFunctionPointerForDelegate(LineTo);
            primary->Polyline = Marshal.GetFunctionPointerForDelegate(Polyline);
            primary->MemBlt = Marshal.GetFunctionPointerForDelegate(MemBlt);
            primary->Mem3Blt = Marshal.GetFunctionPointerForDelegate(Mem3Blt);
            primary->SaveBitmap = Marshal.GetFunctionPointerForDelegate(SaveBitmap);
            primary->GlyphIndex = Marshal.GetFunctionPointerForDelegate(GlyphIndex);
            primary->FastIndex = Marshal.GetFunctionPointerForDelegate(FastIndex);
            primary->FastGlyph = Marshal.GetFunctionPointerForDelegate(FastGlyph);
            primary->PolygonSC = Marshal.GetFunctionPointerForDelegate(PolygonSC);
            primary->PolygonCB = Marshal.GetFunctionPointerForDelegate(PolygonCB);
            primary->EllipseSC = Marshal.GetFunctionPointerForDelegate(EllipseSC);
            primary->EllipseCB = Marshal.GetFunctionPointerForDelegate(EllipseCB);
        }