Results 1 to 3 of 3

Thread: Sharing Variables Between Classes Sessions

  1. #1

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    I made a DLL on VB .. and compiled it .. Now to use it in ASP. The following code is used Obj = Server.CreateObject("MyDllName.MyClassNAme") ... Fine till now all works Great ..

    Now what I Need is to be able to have only one instance of the DLL and have Like A global Variable Shared by all instances of the Classes Created .. so that all people on the site can Exchange this info ...

    To be simple ... implementing Sessions ... without using Sessions ...
    - regards -
    - razzaj -

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    Bad idea. If you do this, all calls to your component will be serialized, meaning blocking will occur (other threads will be suspended until the one thread is finished with the object). You should really look at a different way to do what you want to do, like use a database, the application variable, or the MTS/COM+ shared property manager.

  3. #3
    New Member
    Join Date
    Jan 2001
    Posts
    3

    Another way

    Instead of using an ActiveX dll look into using an ActiveX exe. There is some good sample code in the Coffee sample project in MSDN. This should help you create the persistent object it sounds like you are looking for.

    Jake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width