countersa08

I have been writing a BHO. How can I determine which version of IE is hosting the control


Re: Internet Explorer Extension Development How to determine the version of IE


Re: Internet Explorer Extension Development How to determine the version of IE

MojoBook

You should use DllGetVersion API function and DllVersionInfo structure.

Private Declare Function DllGetVersion Lib "Shlwapi.dll" (dwVersion As DllVersionInfo) As Long

Private Type DllVersionInfo
   cbSize As Long
   dwMajorVersion As Long
   dwMinorVersion As Long
   dwBuildNumber As Long
   dwPlatformId As Long
End Type

-code sample-

Public Function IEVersionLong() As String
Dim udtVersionInfo As DllVersionInfo
udtVersionInfo.cbSize = Len(udtVersionInfo)
Call DllGetVersion(udtVersionInfo)
IEVersionLong = "Internet Explorer " & _
udtVersionInfo.dwMajorVersion & "." & _
udtVersionInfo.dwMinorVersion & "." & _
udtVersionInfo.dwBuildNumber
End Function