StrataFrame Forum

Where is logical place to create global object that will live throughout session?

http://forum.strataframe.net/Topic9363.aspx

By AlexSosa - 6/6/2007

Hi,

Where would be the logical place to instantiate a global COM object that should live throughout the life of a session.  This object will be used to communicate with a VFP layer and will be accesed from many places in the application.

Thank you,

Alex

By StrataFrame Team - 6/6/2007

Place it in a Shared (static) variable on a class somewhere.  Then, instantiate it in the InitApplication() method of the AppMain.vb (Program.cs) file and you will be able to access it from anywhere by typing ClassName.GlobalVariableName.
By Ben Hayat - 6/6/2007

Ben Chase (06/06/2007)
Place it in a Shared (static) variable on a class somewhere. Then, instantiate it in the InitApplication() method of the AppMain.vb (Program.cs) file and you will be able to access it from anywhere by typing ClassName.GlobalVariableName.




Ben, any chance you could offer a sample please?