简体   繁体   English

如何编写进程外MS UI Automation客户端

[英]How to write an out-of-process MS UI Automation client

Much of the documentation I've read regarding UIA lauds its ability to be used out-of-process with significant performance improvements over out-of-process MSAA clients, but I can't seem to drum up any documentation describing how to actually write your client in this way. 我已经阅读的关于UIA的许多文档都赞扬了它可以在进程外使用的能力,并且相对于进程外MSAA客户端具有显着的性能改进,但是我似乎无法鼓吹任何描述如何实际编写的文档。您的客户以这种方式。

I'm guessing it has to do with how you call CoCreateInstance, and so the first thing I tried was changing the argument from CLSCTX_INPROC_SERVER to CLSCTX_LOCAL_SERVER, which resulted in a "class not registered" error, which I have yet to find the cause of. 我猜想这与您如何调用CoCreateInstance有关,所以我尝试的第一件事是将参数从CLSCTX_INPROC_SERVER更改为CLSCTX_LOCAL_SERVER,这导致了“类未注册”错误,我尚未找到原因。 Are there additional steps required on my part? 我是否还需要其他步骤?

Thanks for any assistance. 感谢您的协助。

You do this using IUIAutomationCacheRequest , BuildUpdatedCache and GetCachedPattern along with the various CachedXXXX properties. 您可以使用IUIAutomationCacheRequestBuildUpdatedCacheGetCachedPattern以及各种CachedXXXX属性来执行此操作。 Requesting the current patterns/properties requires a round trip per request; 请求当前模式/属性需要每个请求往返一次; building the cache allows you to get all the patterns & properties you need in a single request. 通过构建缓存,您可以在单个请求中获得所需的所有模式和属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM