Click here to Skip to main content
14,984,271 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a DLL written in VB6 that works with IIS7 using classic ASP to call it. I was able to make a Class DLL to work in and make it COM Interop. I get the parameter value for "s" but I don't understand why I have to use an index for the QueryString below to the get value. It always seems to have to be (1). I discovered this because at first the result was "you cannot assign a string value to a lString". Does anyone have an explanation for this?

Public Function HelloYou() As String

    Dim objAppServer As COMSVCSLib.AppServer
    Dim objContext As COMSVCSLib.ObjectContext
    Dim objRequest As ASPTypeLibrary.Request

    objAppServer = New COMSVCSLib.AppServer
    objContext = objAppServer.GetObjectContext()
    objRequest = objContext.Item("Request")

    HelloYou = objRequest.QueryString("s")(1)
    End Function

The ASP page that calls this class looks like this:

set ceprocs=Server.CreateObject("ClassLibrary1.Class1")
response.write ceprocs.HelloYou()

I added the references:
COM+ Services Type library
Micrsoft Active Services Type Library

Any insight would be appreciated.
Updated 18-May-13 4:10am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900