/// <summary> /// Method to send RDPRFX raw data. /// </summary> /// <param name="surfStreamCmd">TS_SURFCMD_STREAM_SURF_BITS to be send.</param> private void SendSurfaceCmd_StreamSurfBits(TS_SURFCMD_STREAM_SURF_BITS surfStreamCmd) { if (rdpbcgrAdapter != null) { rdpbcgrAdapter.SendStreamSurfaceBitsCommand(surfStreamCmd); } else if (this.rdpbcgrServerStack != null && this.rdpbcgrSessionContext != null) { //TS_FRAME_MARKER frameMakerCmdBegin = new TS_FRAME_MARKER(); //frameMakerCmdBegin.cmdType = cmdType_Values.CMDTYPE_FRAME_MARKER; //frameMakerCmdBegin.frameAction = frameAction_Values.SURFACECMD_FRAMEACTION_BEGIN; //frameMakerCmdBegin.frameId = frameIndex; //TS_FRAME_MARKER frameMakerCmdEnd = new TS_FRAME_MARKER(); //frameMakerCmdEnd.cmdType = cmdType_Values.CMDTYPE_FRAME_MARKER; //frameMakerCmdEnd.frameAction = frameAction_Values.SURFACECMD_FRAMEACTION_END; //frameMakerCmdEnd.frameId = frameIndex++; TS_FP_SURFCMDS surfCmds = new TS_FP_SURFCMDS(); surfCmds.updateHeader = (byte)(((int)updateCode_Values.FASTPATH_UPDATETYPE_SURFCMDS & 0x0f) | (((int)fragmentation_Value.FASTPATH_FRAGMENT_SINGLE) << 4) | ((int)compressedType_Values.None << 6)); surfCmds.compressionFlags = compressedType_Values.None; surfCmds.size = (ushort)(8 + 8 + 22 + surfStreamCmd.bitmapData.bitmapDataLength);//size of TS_SURFCMD_STREAM_SURF_BITS; surfCmds.surfaceCommands = new TS_SURFCMD[1]; surfCmds.surfaceCommands[0] = surfStreamCmd; TS_FP_UPDATE_PDU fpOutput; TS_FP_UPDATE[] updates = new TS_FP_UPDATE[1]; updates[0] = surfCmds; fpOutput = rdpbcgrServerStack.CreateFastPathUpdatePdu(rdpbcgrSessionContext, updates); rdpbcgrServerStack.SendPdu(rdpbcgrSessionContext, fpOutput); } }
public static TS_FP_SURFCMDS CreateFPSurfCmds(TS_SURFCMD_SET_SURF_BITS setSurfBits) { TS_FP_SURFCMDS surfCmds = new TS_FP_SURFCMDS(); surfCmds.updateHeader = new nested_TS_FP_UPDATE_updateHeader(updateCode_Values.FASTPATH_UPDATETYPE_SURFCMDS); surfCmds.compressionFlags = compressedType_Values.None; surfCmds.surfaceCommands = new TS_SURFCMD[1]; surfCmds.surfaceCommands[0] = setSurfBits; surfCmds.AssignUpdateDataAndSize(); return(surfCmds); }
public static TS_FP_SURFCMDS CreateFPSurfCmds(TS_SURFCMD_SET_SURF_BITS setSurfBits) { TS_FP_SURFCMDS surfCmds = new TS_FP_SURFCMDS(); surfCmds.updateHeader = (byte)(((int)updateCode_Values.FASTPATH_UPDATETYPE_SURFCMDS & 0x0f) | (((int)fragmentation_Value.FASTPATH_FRAGMENT_SINGLE) << 4) | ((int)compressedType_Values.None << 6)); surfCmds.compressionFlags = compressedType_Values.None; surfCmds.surfaceCommands = new TS_SURFCMD[1]; surfCmds.surfaceCommands[0] = setSurfBits; surfCmds.size = (ushort)(22 + setSurfBits.bitmapData.bitmapDataLength); return(surfCmds); }
/// <summary> /// Method to send RDPRFX raw data. /// </summary> /// <param name="surfStreamCmd">TS_SURFCMD_STREAM_SURF_BITS to be send.</param> private void SendSurfaceCmd_StreamSurfBits(TS_SURFCMD_STREAM_SURF_BITS surfStreamCmd) { if (rdpbcgrAdapter != null) { rdpbcgrAdapter.SendStreamSurfaceBitsCommand(surfStreamCmd); } else if (this.rdpbcgrServerStack != null && this.rdpbcgrSessionContext != null) { //TS_FRAME_MARKER frameMakerCmdBegin = new TS_FRAME_MARKER(); //frameMakerCmdBegin.cmdType = cmdType_Values.CMDTYPE_FRAME_MARKER; //frameMakerCmdBegin.frameAction = frameAction_Values.SURFACECMD_FRAMEACTION_BEGIN; //frameMakerCmdBegin.frameId = frameIndex; //TS_FRAME_MARKER frameMakerCmdEnd = new TS_FRAME_MARKER(); //frameMakerCmdEnd.cmdType = cmdType_Values.CMDTYPE_FRAME_MARKER; //frameMakerCmdEnd.frameAction = frameAction_Values.SURFACECMD_FRAMEACTION_END; //frameMakerCmdEnd.frameId = frameIndex++; TS_FP_SURFCMDS surfCmds = new TS_FP_SURFCMDS(); surfCmds.updateHeader = new nested_TS_FP_UPDATE_updateHeader(updateCode_Values.FASTPATH_UPDATETYPE_SURFCMDS); surfCmds.AssignUpdateDataAndSize(); surfCmds.surfaceCommands = new TS_SURFCMD[1]; surfCmds.surfaceCommands[0] = surfStreamCmd; TS_FP_UPDATE_PDU fpOutput; TS_FP_UPDATE[] updates = new TS_FP_UPDATE[1]; updates[0] = surfCmds; surfCmds.updateData = surfCmds.EncodeBody(); fpOutput = rdpbcgrServerStack.CreateFastPathUpdatePdu(rdpbcgrSessionContext, updates); rdpbcgrServerStack.SendPdu(rdpbcgrSessionContext, fpOutput); } }