Com objects using the same global obj ref.

Discussion in 'ASP General' started by Alex, Oct 23, 2003.

  1. Alex

    Alex Guest

    I'm sure that the following is possible, I just need a little help
    please.

    I have a object which I declare as a application object "gObj".

    I need to use "gObj" with all sessions. I need "gObj" to have access
    based on the user's id. Is this possible without creating multiple
    gObj's?

    Code would be something like:

    Application_OnStart
    set gobj = Server.Create( "someDll" )

    gobj.uname = "somename"
    gobj.port = 1234
    gobj.pwd = "pwd"
    Alex, Oct 23, 2003
    #1
    1. Advertising

  2. First thought: Use an ActiveX EXE for the global functionality. You can then
    use GetObject(). A COM+ component might help in this regard, but I am not
    sure. This is just a thought, as I have not tested any of this.

    The best method, if you have the inclination (which I know will work) is to
    extend the IIS model with an ISAPI component. You have to use C++ for COM
    based implementations (ASP, for example), so it is not an easy matter. But,
    it can be done.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "Alex" <> wrote in message
    news:...
    > I'm sure that the following is possible, I just need a little help
    > please.
    >
    > I have a object which I declare as a application object "gObj".
    >
    > I need to use "gObj" with all sessions. I need "gObj" to have access
    > based on the user's id. Is this possible without creating multiple
    > gObj's?
    >
    > Code would be something like:
    >
    > Application_OnStart
    > set gobj = Server.Create( "someDll" )
    >
    > gobj.uname = "somename"
    > gobj.port = 1234
    > gobj.pwd = "pwd"
    Cowboy \(Gregory A. Beamer\), Oct 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mark Kamoski
    Replies:
    3
    Views:
    15,670
    Jay B. Harlow [MVP - Outlook]
    Aug 9, 2003
  2. Phil Endecott

    Obj* ptr = new Obj(X)

    Phil Endecott, Jun 3, 2005, in forum: C++
    Replies:
    5
    Views:
    457
    Mark P
    Jun 3, 2005
  3. Shalabh Chaturvedi
    Replies:
    2
    Views:
    442
    Mike C. Fletcher
    Feb 20, 2004
  4. Matthew Thorley

    How do you convert a string obj to a file obj?

    Matthew Thorley, May 4, 2005, in forum: Python
    Replies:
    7
    Views:
    499
    Peter Otten
    May 4, 2005
  5. Alex
    Replies:
    1
    Views:
    107
    Bob Barrows
    Oct 23, 2003
Loading...

Share This Page