开发者

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

开发者 https://www.devze.com 2022-12-31 14:14 出处:网络
Is this even possible? I\'m embedding Flash inside a开发者_如何学Pythonn IE frame in my application and would like to check if Flash and what version of it is installed.

Is this even possible?

I'm embedding Flash inside a开发者_如何学Pythonn 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?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消