Dynamic Virtual Channels

C++插件架构实战:从设计原理到图像处理插件实现 模块化与扩展性是现代软件工程的核心概念,旨在通过解耦组件来提升系统的可维护性和灵活性。其技术原理基于面向接口编程和动态加载机制,通过定义稳定的抽象接口,实现功能单元的独立开发与部署。这种架构的技术价值在于显著降低了代码耦合度,支持功能的动态增删与热更新,从而提升开发效率和系统可维护性。在应用场景上,它广泛用于IDE扩展、游戏引擎、大型桌面应用及服务端中间件,允许第三方开发者在不修改核心代码的前提下集成新功能。本文聚焦于C++插件架构的工程实践,深入探讨了接口设计、动态库加载、生命周期管理等关键技术点,并提供 阅读详情

 

http://www.brianmadden.com/news/43

http://blogs.msdn.com/ts/pages/ts-teleport-sample-instructions.aspx

 

http://www.codeproject.com/KB/system/TSAddinInCS.aspx

 

An important goal of the Terminal Services (TS) team is to provide a product that can easily be extended by third parties to better meet their needs.  While TS has always supported virtual channels, they had their limitations, including the limited number of channels and the difficulty involved in writing virtual channel applications.  For the 6.1 version of the client, and Windows Vista SP1 or Windows Server 2008 on the server side, Dynamic Virtual Channels (DVCs) can be used. DVCs address the limitations of the old virtual channels.  This article outlines the basics of DVCs and shows how to write a complete DVC application and client plug-in to add basic file transfer support to Terminal Services.

DVC Basics

What are Virtual Channels?

Virtual channels are bi-directional connection streams provided through the RDP protocol. Virtual channels allow third parties to establish a data pipe between the TS client and server to extend the functionality of the Remote Desktop Protocol (RDP). Examples of extra functionality provided through virtual channels are cross-TS-connection clipboard, drive, printer and smart card redirection. There are two types of virtual channels: static and dynamic. Due to the limitations of static virtual channels referenced above, dynamic virtual channels are the preferred way to extend TS functionality.

Client and Server DVC components

On the TS client side the DVC is handled through a TS client plug-in. This plug-in is a COM object, whose registered CLSID is passed to the TS client through the registry (see the attached sample). The COM object must implement the IWTSPlugin interface. On the server side any arbitrary component running in the current session can use the WTS API to establish the DVC connection, as well as send and receive data.

Channel Initialization and Usage
Client Side

1) The TS client loads the DVC plug-ins from the registry:

HKCU/Software/Microsoft/Terminal Server Client/Default/AddIns

2) The TS client invokes the Initialize() method on IWTSPlugin; and passes an IWTSVirtualChannelManager

HRESULT CTsClientPlgn::Initialize(

IWTSVirtualChannelManager *pChannelMgr

)

3) During initialization, or at any arbitrary point, the plug-in is expected to use the IWTSVirtualChannelManager to create a connection listener and pass an IWTSListenerCallback

hr = pChannelMgr->CreateListener(TSTELE_CHANNEL_NAME,

0,

pListenerCallback,

&pListener);

4) IWTSListenerCallback is notified of connection requests on the channel; IWTSListenerCallback receives an IWTSVirtualChannel for every new connection and returns a corresponding IWTSVirtualChannelCallback

HRESULT CTsListenerCallback::OnNewChannelConnection(

IWTSVirtualChannel *pChannel,

BSTR data,

BOOL *pbAccept,

IWTSVirtualChannelCallback **ppCallback )

{

*pbAccept = TRUE;

_pChannelCallback->AddRef();

*ppCallback = _pChannelCallback;

pChannel->AddRef();

_pChannel = pChannel;

5) The plug-in uses the IWTSVirtualChannel to write to and close the channel

hr = _pChannel->Write(sizeof(HRESULT), (PBYTE) &hr, NULL);

hr = _pChannel->Close();

6) The plug-in receives incoming data and channel close notifications on the IWTSVirtualChannelCallback

HRESULT CTsChannelCallback::OnDataReceived(

ULONG cbSize,

BYTE *pBuffer

);

HRESULT CTsChannelCallback::OnClose();

Server Side

1) An application issues a WTSVirtualChannelOpenEx with the WTS_CHANNEL_OPTION_DYNAMIC flag to establish the DVC connection.

hWTSHandle = WTSVirtualChannelOpenEx(

WTS_CURRENT_SESSION,

TSTELE_CHANNEL_NAME,

WTS_CHANNEL_OPTION_DYNAMIC);

2) Using the WTS handle received from the previous call a WTSVirtualChannelQuery is used to get a read/write file handle for the channel

NOTE: DuplicateHandle() is needed to be able to access the channel after freeing hWTSHandle (i.e. calling WTSVirtualChannelClose()). The output handle from DuplicateHandle() needs to be closed using CloseHandle().

BOOL bSucc = WTSVirtualChannelQuery(

hWTSHandle,

WTSVirtualFileHandle,

&vcFileHandlePtr,

&len);

...

HANDLE hWTSFileHandle = *(HANDLE *)vcFileHandlePtr;

...

bSucc = DuplicateHandle(

GetCurrentProcess(),

hWTSFileHandle,

GetCurrentProcess(),

&_hDVC,

0,

FALSE,

DUPLICATE_SAME_ACCESS);

3) Overlapped ReadFile() and WriteFile() calls are issued on the channel file handle

bRet = ReadFile(_hDVC, ReadBuf, CHANNEL_PDU_LENGTH, &BytesRead, &ovr);

bRet = WriteFile(_hDVC, pPacket, RequiredLen, &BytesWrit, &ovr);

4) To close the connection the channel file handle is closed

CloseHandle(_hDVC);

Sample: TS-Teleport

TS-Teleport is a sample application to demonstrate the end to end use of the DVC APIs. It implements a simple protocol to transport files from the TS server session to the desktop of the client machine. It does not rely on similar TS functionality like drive redirection.

dvc

The server component is a shell extension that adds an “RDP Client Desktop” entry to the “Send To” context menu. Upon receiving the list of highlighted files which the user elected to “Send to the RDP Client Desktop”, the shell extension opens the DVC and streams the files through. Upon receiving the file names and data, the client component creates those files and directories on the desktop.

The server sends a series of state dependent requests to the client by writing on the DVC and for each request it reads the status through a DVC read. Requests are start and end pairs for files and directories and data packets for file data.

Sample Files and Instructions

Please follow the link below to access sample files and instructions, including source code and installation how-to.

http://blogs.msdn.com/ts/pages/ts-teleport-sample-instructions.aspx

Author: Ahmed Tolba (SDE TS Devices Team)

Credits: Eric Holk, Zardosht Kasheff, Josh Rosenberg and the rest of the TS Devices Team

YOLOv26算法优化:无人机高速目标检测实战 目标检测是计算机视觉的核心技术,通过深度学习模型实现物体定位与分类。YOLO系列算法因其高效的单阶段检测架构广受欢迎,但在无人机空对空场景面临小目标漏检、运动模糊等挑战。通过引入跨阶段注意力机制和动态标签分配策略,可显著提升高速运动目标的检测精度。在工程实践中,结合TensorRT量化和内存优化技术,能在Jetson等边缘设备实现实时推理。该技术特别适用于无人机集群、空中安防等需要处理动态小目标的场景,其中YOLOv26的改进方案将mAP提升至89.7%,为行业提供了可靠的解决方案。 阅读详情

相关推荐

A Dynamic Virtual Channel Regulator for Network-on-Chip Router

这是在ieee上的一篇会议文档 。是现在share buffer的鼻祖

Linux TCP协议栈定时器走读

导语:TCP协议栈是事件驱动的,如果说TCP的拥塞算法是tcp协议栈的心脏,那么tcp协议栈的定时器则是tcp协议栈的心跳。1. 数据结构TCP协议栈的定时器众多,也异常复杂,在这里主要简单走一遍tcp协议栈的定时器机制。N.Wirth曾说:程序=数据结构+算法。某大牛曾说:好的数据结构设计是程序成功的一半。首先来看一下定时器的数据结构:struct timer_list //include

Al_xin的专栏 7102

在Windows上安装Fortran编程环境「0 错误」|编程一对一教学文章

通过以上步骤,你已经成功在 Windows 系统上配置了 Fortran 编程环境。现在,你可以开始 Fortran 语言的学习和开发工作了。记得定期检查更新你的编译器和编辑器,以获得最佳的支持和新功能。

AI悦创·编程私教1v1 1685

Change IP address_Auto log in to Netgear Router to Crawling an available IP w xpath_REG_SZ_WinError5

Use urllib to login in to the Netgear router import urllib user = 'admin' pwd = 'LlQ54951' host = '192.168.1.1' url = 'http://' + host passman = urllib.request.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, host, user, pwd) authhandler =

Linli522362242的专栏 1239

从零开始编写一个上位机(串口助手)QT Creator + C++

提示:本博客作为学习笔记,有错误的地方希望指正,此文可能会比较长,作为学习笔记的积累,希望对来着有帮助。   绪论:笔者这里使用的是QTCreator和C++来实现一个简单的串口上位机的开发的简单过程,使用到C++,主要是为了后面使用Python开发上位机打下基础。这里主要分为初识C++的一些基本知识,其次是QT Creator的使用。特别声明感谢【北京迅为】嵌入式学习之QT学习篇的学习视频,这里的学习笔记就是根据视频中的内容实战记录下来的。 文章目录一、C++知识1、初识C++2、C++输入输出控制2.1

believe666的博客 4万+

GNU Radio系列教程(一):什么是GNU Radio?为什么我需要用GNU Radio?

目录 一、什么是软件无线电? 二、GNU Radio到底能做什么事情? 三、我如果不精通编程,还能用GNU Radio吗? 四、GNU Radio使用需要授权吗? 五、基于GNU Radio,人们已经做了取得了哪些成果? 六、数字信号处理、基带、时钟同步…这些名词是什么意思? 七、有用的链接和联系方式 GNU Radio是一个免费的开源软件工具包,该工具包提供了可用于软件无线电的信号处理模块。基于一些通用的射频前端设备,该工具包可以用来实现软件无线电系统。此外,该工具包也可以用于单纯...

无线通信实验室 1万+

NTFS文件系统是怎么工作的

 A file system is a required part of the operating system that determines how files are named, stored, and organized on a volume. A file system manages files and folders, and the information needed

软体疯子专栏 4319

异步FIFO的隐形陷阱:复位信号同步化实战解析

本文深入解析异步FIFO设计中复位信号同步化的隐形陷阱,重点分析赛灵思xpm_fifo_async原语在FPGA应用中的常见问题。通过实战代码和系统集成方案,提供复位同步化的最佳实践,帮助工程师避免跨时钟域通信故障,提升系统可靠性。

keras9composer的博客 254

How one VBA project can use an object declared in the class module of another project

from: http://www.digitalsupporttech.com/mskb/555/555159_How_to_use_a_class__object__from_outside_of_the_VBA_project_in_which_it_is_declared.htm  How one VBA project can use an object declared

大头客的专栏 1353

《网络安全自学教程》- 防火墙原理分析与Windows防火墙使用配置

防火墙分类及原理,Windows开启防火墙,Windows防火墙添加策略,

wangyuxiang946的博客 1万+

【短距离通信】【WiFi】精讲802.11n/ac/ax mpdu和ampdu最大长度

在 Wi-Fi 标准(802.11n、802.11ac 和 802.11ax)中,和是数据传输的核心概念。理解它们各自的作用以及不同标准下的最大长度限制,有助于深入了解 Wi-Fi 的性能优化机制。以下是对802.11n802.11ac和802.11ax中MPDU和A-MPDU最大长度的详细技术分析和对比。1. MPDU 和 A-MPDU 的基本概念MPDU 是经过 MAC 层处理后的数据单元,主要由MAC层数据帧和物理层的传输头部(PHY headers)组成。

风云说通信 1116

60 Linux 常用 命令

1. Command: ls The command “ls” stands for (List Directory Contents), List the contents of the folder, be it file or folder, from which it runs. root@tecmint:~# ls Android-Games

Calvin 的专栏 3万+

YOLOv13添加OREPA模块 准确率提升10.56个点,map提升11.87个点。小目标轻量化

本文提出了一种新的OREPA(Optimal Recursive Edge-Preserving Attention)模块,通过结合递归和边缘保留注意力机制,显著提升了目标检测模型的性能。实验结果表明,添加OREPA模块后,准确率提升了10.56个百分点,mAP提升了11.87个百分点。OREPA模块包含三个核心组件:OREPA1处理特征图并保留边缘信息,Bottleneck_OREPA作为瓶颈模块降低计算量,OREPA类通过堆叠多个Bottleneck_OREPA增强网络表达能力。文章详细介绍了如何将OR

FJN110的博客 2769

Nitro 请求链路追踪实战:基于 Node diagnostics channels 的零依赖可观测性

Nitro 内置了一套基于 Node.js [diagnostics channels](https://nodejs.org/api/diagnostics_channel.html) 的请求生命周期追踪能力,无需接入 OpenTelemetry SDK 即可对 h3、srvx、unstorage 三类核心通道进行埋点,并通过内置控制台日志器把每个请求的 span 渲染成一条时间轴(waterf

gitblog_00265的博客 138

[关系图谱] 二.Gephi导入共线矩阵构建作者关系图谱

本文主要讲解Gephi绘制作者间的关系图谱,该软件可以广泛应用于社交网络、知识图谱分析,推荐读者使用。这是非常基础的一篇文章,重点讲解Gephi使用方法,希望对大家有所帮助。

杨秀璋的专栏 1万+

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

轻量级网络救星?动态卷积(Dynamic/ODConv)在移动端模型部署中的实测与优化心得

本文深入探讨了动态卷积(Dynamic/ODConv)技术在移动端模型部署中的实际应用与优化策略。通过对比实验和实战案例,分析了动态卷积在轻量级网络中的性能提升与硬件适配挑战,提供了针对不同平台的部署优化方案,帮助开发者在精度与效率之间找到最佳平衡点。

weixin_30735745的博客 428

vb 6.0并口开发操作实例

vb6并口开发,简体中文,试例内有inpout32.dll动态链接库

Android Camera MIPI接口知识总结

Android Camera MIPI接口知识总结

汽车以太网和SOA 1万+

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

ALSA 专业术语 和 dai_link 分析

原因:dai_link 回答的问题是"

mapleay的博客 425

Sirius动态过滤器:运行时计算谓词与自适应下推技术

在数据处理领域,查询性能优化一直是开发者关注的核心问题。随着数据量的爆炸式增长,传统的静态过滤技术已难以满足实时分析的需求。Sirius作为一款GPU原生SQL引擎,通过其创新的动态过滤器技术,实现了运行时计算谓词与自适应下推,为大数据查询带来了革命性的性能提升。 [![Sirius架构图展示动态过滤器在GPU原生SQL引擎中的位置](https://raw.gitcode.com/gh_mir

gitblog_00164的博客 440

C++ 知识补充

向量(vector)是一个封装了动态大小数组的顺序容器(SequenceContainer)。跟任意其它类型容器一样,它能够存放各种类型的对象。可以简单的认为,向量是一个能够存放任意类型的动态数组。C++中map提供的是一种键值对容器,里面的数据都是成对出现的,如下图:每一对中的第一个值称之为关键字(key),每个关键字只能在map中出现一次;第二个称之为该关键字的对应值。

weixin_47059239的博客 2142

AI开发成本优化:从开源工具链到工程化实践

AI开发成本优化是当前企业数字化转型中的关键技术挑战。从技术原理来看,成本主要来源于算力资源、数据管理和模型部署等核心环节。通过采用开源工具链和工程化实践,企业可以显著降低AI项目总体成本。TensorFlow、PyTorch等开源框架提供了成熟的算法实现,而MLflow、Kubeflow等工具则实现了模型版本管理和自动化训练流水线。在工程实践中,模型量化技术可以将FP32模型转换为INT8格式,减少75%的模型大小并提升推理速度2-3倍。分布式训练优化则通过Horovod等框架实现数据并行,大幅缩短大模型

cuiji1279的博客 354

PyTorch C++ 神经网络模块(torch::nn)API 指南:从 Module 基类到自定义模型构建

`torch::nn` 是 PyTorch 为 C++ 提供的神经网络构建模块命名空间,与 Python 侧 `torch.nn` 一一对应,可用于在 C++ 中搭建模型、自定义层、将 Python 模型移植到 C++ 做生产级推理,乃至纯 C++ 完成端到端训练。本文将围绕 [torch::nn 官方 C++ API 文档](https://link.gitcode.com/i/d62a951d

gitblog_00633的博客 780

EVOLVE深度学习体数据压缩:原理、实战与性能优化指南

数据压缩是计算机科学中的基础技术,通过编码算法减少数据存储空间和传输带宽。其核心原理是利用数据的统计冗余和空间相关性,将信息用更紧凑的形式表示。在科学计算和工程实践中,高效的压缩技术能够显著降低存储成本并提升数据处理效率。随着深度学习的发展,基于神经网络的压缩方法在保持重建质量的同时实现了更高的压缩比。EVOLVE框架通过自适应可变速率编码和跨域知识迁移技术,针对体数据的空间特征进行优化,在医学影像和科学可视化等场景中展现出显著优势。该技术通过自动编码器架构实现端到端优化,结合注意力机制动态调整压缩策略,为

weixin_34161064的博客 356

CANN ClipByValue算子深度解析:数值裁剪在NPU加速计算中的实现与应用

在深度学习模型训练和推理过程中,数值稳定性是确保算法收敛性和模型性能的关键因素。华为CANN(Compute Architecture for Neural Networks)算子库中的ClipByValue算子作为数值裁剪的核心组件,能够在NPU硬件上高效实现张量元素的边界限制,防止梯度爆炸和数值溢出问题。本文将深入解析ClipByValue算子的技术原理、硬件优化实现、应用场景及性能优化策略。

gitblog_00138的博客 394

C# WinForm CAN 上位机开发:3步连接Kvaser卡与电机握手通信

本文详细解析了使用C# WinForm开发CAN上位机应用的全流程,重点介绍如何通过Kvaser CAN卡实现与电机设备的握手通信。内容涵盖硬件连接规范、CAN通信核心模块实现、WinForm界面设计以及高级功能扩展,为工业自动化开发者提供从零开始的实战指导。

weixin_30627341的博客 468
上一篇: 通俗的解释什么叫内网映射
下一篇: 如何查看window环境变量
dadalan
博客等级 码龄20年 428粉丝 770原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址