XP上的自动化工具包括最新的sp和更新 [英] Automation crach on XP with latest sp and updates

查看:68
本文介绍了XP上的自动化工具包括最新的sp和更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我有一个使用Windows自动化的课程。它适用于较新的操作系统(如7 - 8和8.1),但在Windows XP上(使用SP3和最新更新它崩溃)。



产生崩溃的代码是:



Hello,

I have a class that is using Windows Automation. It works fine on newer OSs (like 7 - 8 and 8.1) but on Windows XP (using SP3 and latest updates it crashes).

The code that produces the crash is:

void CUIAutomationClient::Initialize()
{
	try
	{
		CoInitialize(NULL);
		HRESULT hr; 
		hr = CoCreateInstance(__uuidof(CUIAutomation), NULL,
                 CLSCTX_INPROC_SERVER,
                 __uuidof(IUIAutomation),
                 (void **)&g_Automation);
		if(FAILED(hr) || g_Automation==NULL) 
		{
			ret = 1;
			CoUninitialize();
		}
	}
	catch(...)
	{
	}
}





您有什么建议如何解决这个问题吗?



谢谢你!



Do you have any suggestion how to fix this problem?

Thank you!

推荐答案

感谢您的回复。似乎自动化仅适用于带有SP3的Windows XP和适用于Windows Vista的平台更新[仅适用于桌面应用] - 而我用于测试的机器不包括Windows Vista的平台更新。
Thanks for the reply. It seems that Automation works only on Windows XP with SP3 and Platform Update for Windows Vista [desktop apps only] - and the machine that I was using for test did not include Platform Update for Windows Vista.


这篇关于XP上的自动化工具包括最新的sp和更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆