G
gxdata
VB.NET, requires reference to CDO v1.21 (MAPI)
Private Function ExchangePresent() As Boolean
Dim sc As MAPI.SessionClass = New MAPI.SessionClass()
' This is a crude logon - I don't do it this way
sc.Logon(Type.Missing, Type.Missing, Type.Missing, Type.Missing, _
Type.Missing, Type.Missing, Type.Missing)
Dim isrs As MAPI.InfoStores = TryCast(sc.InfoStores, MAPI.InfoStores)
Dim index As Integer=1
Do While index <= CInt(Fix(isrs.Count))
If (CType(isrs.Item(index), _
MAPI.InfoStore)).ProviderName.ToString().ToUpper().IndexOf("EXCHANGE")
End If
index += 1
Loop
Return False
End Function
Private Function ExchangePresent() As Boolean
Dim sc As MAPI.SessionClass = New MAPI.SessionClass()
' This is a crude logon - I don't do it this way
sc.Logon(Type.Missing, Type.Missing, Type.Missing, Type.Missing, _
Type.Missing, Type.Missing, Type.Missing)
Dim isrs As MAPI.InfoStores = TryCast(sc.InfoStores, MAPI.InfoStores)
Dim index As Integer=1
Do While index <= CInt(Fix(isrs.Count))
If (CType(isrs.Item(index), _
MAPI.InfoStore)).ProviderName.ToString().ToUpper().IndexOf("EXCHANGE")
Return True= 0 Then
End If
index += 1
Loop
Return False
End Function