Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2004, 08:10
Littlew
 
Fecha de Ingreso: noviembre-2003
Ubicación: Murcia
Mensajes: 34
Antigüedad: 20 años, 6 meses
Puntos: 0
ActiveX y ASP

Buenas. Expongo mi problema aqui ya que tiene relacion con programacion en Visual Basic, espero q me podais ayudar...

Estoy empezando a aprender como se utilizan los controles ActiveX con ASP. He hecho una prueba pero no consigo que me funcione. He creado una DLL con el Visual Basic, el codigo es el siguiente:

Option Explicit

Private ScriptingContext As ScriptingContext
Private Application As Application
Private Request As Request
Private Response As Response
Private Server As Server
Private Session As Session

Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set ScriptingContext = PassedScriptingContext
Set Application = ScriptingContext.Application
Set Request = ScriptingContext.Request
Set Response = ScriptingContext.Response
Set Server = ScriptingContext.Server
Set Session = ScriptingContext.Session
End Sub

Public Sub OnEndPage()
Set ScriptingContext = Nothing
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
End Sub

Public Sub Mensaje(Texto As String)
Response.Write "<b><font color='red'>" & Texto & "</font></b>"
End Sub

He generado la dll correspondiente.
Y tb he creado una pagina ASP que llama a esta dll:

<html>
<body>
<%
Dim Test

Set Test = Server.CreateObject("ASPTest.Test")

Test.Mensaje "Hola, esta es una prueba."

Set Test = Nothing

%>
</body>
</html>

Me da un error en la linea
Set Test = Server.CreateObject("ASPTest.Test")
Objeto Server, ASP 0177 (0x800401F3)
Cadena clase no válida


Estoy usando IIS con WindowsXP. Las paginas en ASP me funcionan, pero cuando le añado controles ACTIVEX, no. ¿Q puede pasar? aparte del problema de mi ignorancia...

GRACIAS