以编程方式确定是否安装了COM库(.dll) [英] Programmatically determine if a COM library (.DLL) is installed

查看:91
本文介绍了以编程方式确定是否安装了COM库(.dll)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有在C#编程的方式来确定一个特定的COM DLL是否已安装?或者这是在扫描中的ClassID注册表的问题?

Is there a programmatic way in C# to determine whether a particular COM DLL has been installed? Or is this a matter of scanning the registry for the classId?

推荐答案

我通常做(和会做,如果我需要这再次)是尝试创建你知道一个类是COM库的对象实例 - 无论是进程id或GUID - 并检查故障

What I usually did (and would do, if I needed this again) is try to create an object instance of a class you know is in the COM library - either by ProgID or GUID - and checking for failure.

这篇关于以编程方式确定是否安装了COM库(.dll)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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