Yeah, But Which Common Controls?

Yeah, But Which Common Controls?

This fragment of code from the VB standard module shows the GetComCtlVersion function that retrieves the major and minor version numbers of the Comctl32.dll installed on the local system. Use this function when you subclass toolbar or listview controls from Comctl32.ocx and implement hot-tracking toolbar or full-row select in the listview. It’s also useful when checking the DLL version in your setup application:

 VersionDistribution Platform 4.00	Microsoft Windows 95/Windows NT 4.0 4.70	Microsoft Internet Explorer 3.0x 4.71	Microsoft Internet Explorer 4.00 4.72	Microsoft Internet Explorer 4.01 Option Explicit Private Const S_OK = &H0 Private Declare Function LoadLibrary Lib "kernel32" _ 	Alias "LoadLibraryA" (ByVal lpLibFileName As String) _	As Long Private Declare Function GetProcAddress Lib "kernel32" _	(ByVal hModule As Long, ByVal lpProcName As String) As _	Long Private Declare Function FreeLibrary Lib "kernel32" ( _ 	ByVal hLibModule As Long) As Long Private Declare Function DllGetVersion Lib "comctl32.dll" _	(pdvi As DLLVERSIONINFO) As Long Private Type DLLVERSIONINFO 	cbSize As Long 	dwMajorVersion As Long 	dwMinorVersion As Long 	dwBuildNumber As Long 	dwPlatformID As Long End Type Public Function GetComCtlVersion(nMajor As Long, nMinor As _	Long) As Boolean 	Dim hComCtl As Long 	Dim hResult As Long 	Dim pDllGetVersion As Long 	Dim dvi As DLLVERSIONINFO 	hComCtl = LoadLibrary("comctl32.dll") 	If hComCtl <> 0 Then 	hResult = S_OK 	pDllGetVersion = GetProcAddress(hComCtl, _		"DllGetVersion") 		If pDllGetVersion <> 0 Then 			dvi.cbSize = Len(dvi) 			hResult = DllGetVersion(dvi) 		If hResult = S_OK Then 				nMajor = dvi.dwMajorVersion 				nMinor = dvi.dwMinorVersion 			End If 		End If 		Call FreeLibrary(hComCtl) 		GetComCtlVersion = True 	End If End Function
Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several

data fivetran pricing

Fivetran Pricing Explained

One of the biggest trends of the 21st century is the massive surge in analytics. Analytics is the process of utilizing data to drive future decision-making. With so much of

kubernetes logging

Kubernetes Logging: What You Need to Know

Kubernetes from Google is one of the most popular open-source and free container management solutions made to make managing and deploying applications easier. It has a solid architecture that makes