Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

static class variable in COM object

Status
Not open for further replies.

BeanDog

Programmer
Jul 15, 2000
60
US
I need to store a single integer value that can be accessed by any instance of a COM class running on a machine. Is there any way to do this? COM does not allow static member variables or global variables. On top of that, it seems to load a new copy of the class itself every time someone tries to connect to the DLL/EXE, so a global isn't really global anyway. Any ideas?



~BenDilts( void );
 
How about popping it into a database somewhere (especially if you've already got connection functionality in the object)?

At least that would be better than a flat file since it would help with concurrency issues.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top