开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜