por Fernando D'Angelo
14. fevereiro 2002 00:00
<% Option Explicit
Function IsComponentInstalled(ProgId)
Dim tmpObject
On Error Resume Next
Set tmpObject = Server.CreateObject(ProgId)
If Err.Number = 0 Then
IsComponentInstalled = True
Else
IsComponentInstalled = False
End If
Set tmpObject = Nothing
End Function
'Utilizando a função
If IsComponentInstalled("CDONTS.NewMail") Then
Response.Write "Enviando o e-mail ..."
'...
Else
Response.Write "Não é possível enviar o e-mail (Objeto para envio indisponível)"
'...
End If
%>