I am working on writing a function that is capable of detecting the version of Internet Explorer that is installed. I have already written one that retrives the information from the HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer registry key. That was fairly easy. Now I would like to take on a considerably more difficult and more accurate approach to resolve the same problem, obtaining the information directly from shdocvw.dll located in the system directory.
I know that I need to use GetSystemDirectory ( , ) to obtain the system directory information. Then I need to determine if shdocvw.dll exists in the system directory. I believe that I can accomplish this by creating a _finddata_t structure using _findfirst to find the file. If _findfirst fails, I know that IE is not installed.
My questions begin with what comes next. I have read the documentation on the GetFileVersionInfo ( , , , ) function that is available in the MSDN library and find it to be confusing at best. I also am disappointed by the lack of example code for the GetFileVersionInfo API. Since I want my function to be usable in Windows 95 on up, I know that I cannot use the simpler DllGetVersion function.
Does anyone have some example code on how to use the GetFileVersionInfo ( , , , ) function or some code illustrating how to accomplish the goal of obtaining the Internet Explorer version shdocvw.dll? Even just clarification on how to use the GetFileVersionInfo ( , , , ) function will be helpfull.