Get version of installed Flash ActiveX in Win32/C++

主宰稳场 提交于 2019-12-08 07:10:34

问题


Is this even possible?

I'm embedding Flash inside an IE frame in my application and would like to check if Flash and what version of it is installed.

The application needs to run without admin privileges.

Bonus question: Can I also check if ActiveX controls are enabled in the IE settings?


回答1:


The only thing that comes to mind is to examine the file version of the corresponding *.dll or *.ocx file. On my 64-bit system, the file is

C:\Windows\SysWOW64\Macromed\Flash\Flash10b.ocx

As you probably are aware of, many applications can list all installed ActiveX controls. So it is definitely possible to obtain the file name programmatically. And once you have, you can just get the file version.

Hopefully someone else can give you a slightly more enlightened answer soon.

Update

Now that I think about it, there is one key per control in the registry.




回答2:


The solution is to search for the CLSID of Flash ("{D27CDB6E-AE6D-11cf-96B8-444553540000}") in the registry under HKEY_CLASSES_ROOT\CLSID.

There you can read \InprocServer32 which gives you the OCX. Then get the version via GetFileVersionInfo.

This should work for any COM control.



来源:https://stackoverflow.com/questions/2892928/get-version-of-installed-flash-activex-in-win32-c

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!