October 6th, 1999, 02:07 AM
Hi,
How can I Determine what are the MAIL Enabled Applications installed in my System.. Like Suppose In my system If I am having Microsoft Outlook Express , or Exchange Server or any other third party Mail Server Application. I should be able to display all the application in a COMBO BOX.
Is it possible to know ..
Regards
ROBERT
Aaron Young
October 6th, 1999, 03:13 PM
Mail Clients are stored in the Registry at HKEY_LOCAL_MACHINE\Software\Clients\Mail, you can use the Registry API to access them, eg.
private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (byval hKey as Long, byval lpSubKey as string, phkResult as Long) as Long
private 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
private Declare Function RegCloseKey Lib "advapi32.dll" (byval hKey as Long) as Long
private Const HKEY_LOCAL_MACHINE = &H80000002
private Sub Command1_Click()
Dim sKey as string * 255
Dim lRegKey as Long
Dim iKey as Integer
Combo1.Clear
Call RegOpenKey(HKEY_LOCAL_MACHINE, "Software\Clients\Mail", lRegKey)
While RegEnumKey(lRegKey, iKey, sKey, 255) = 0
Combo1.AddItem Left(sKey, InStr(sKey, Chr(0)) - 1)
iKey = iKey + 1
Wend
Call RegCloseKey(lRegKey)
If Combo1.ListCount then Combo1.ListIndex = 0
End Sub
Aaron Young
Analyst Programmer
adyoung@win.bright.net
aarony@redwingsoftware.com