getting public variable from vb dll

Posted on 2004-11-14
Last Modified: 2008-03-06
I have a vb dll that I am accessing through asp.
in the dll I have a public variable.
is it possible to get the value of that variable into the asp page?
what is the call that I have to make?
I do not have a let or get for the variable just declared public

Question by:shayne23d
    LVL 1

    Accepted Solution

    You answered the question yourself, I think.......
    As far as i am aware you will need an access method ie a Property which exposes the value, then you just create your object and use the prperty to get the value. I think that is the only way to get it. I could very well be wrong though.

    LVL 6

    Expert Comment

    yes, you need to add a public property to the class in your dll

    this is generic but you should get the idea

    Public Property Get test() As Variant
        If IsObject(mvartest) Then
            Set test = mvartest
            test = mvartest
        End If
    End Property

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now