PDA

Click to See Complete Forum and Search --> : Sharing Variables Between Classes Sessions


razzaj
Jan 9th, 2001, 11:33 AM
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 ...

Clunietp
Jan 9th, 2001, 11:10 PM
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.

jduckwo
Jan 11th, 2001, 11:32 AM
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