How to get all installed Mail Applications
Posted on January 5, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 'System & API - How to get all installed Mail Applications Option Explicit Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, _ ByVal lpSubKey As String, phkResult As Long) As Long Declare Function RegEnumKey Lib "advapi32.dll" Alias "RegEnumKeyA" (ByVal hKey As Long, _ ByVal dwIndex As Long, ByVal lpName As String, ByVal cbName As Long) As Long Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long Public Const HKEY_LOCAL_MACHINE = &H80000002 'Add a listbox and a command buton Private Sub Command1_Click() Dim sKey As String * 255 Dim lRegKey As Long Dim iKey As Integer List1.Clear Call RegOpenKey(HKEY_LOCAL_MACHINE, "Software\Clients\Mail", lRegKey) While RegEnumKey(lRegKey, iKey, sKey, 255) = 0 List1.AddItem Left(sKey, InStr(sKey, chr ( 0 ) ) - 1) iKey = iKey + 1 Wend Call RegCloseKey(lRegKey) End Sub |