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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET equivalent for Single Threaded ActiveX Exe.

Status
Not open for further replies.

jantie78

Programmer
Jan 4, 2002
58
KR
Hi all,

I would like to create a sort of caching or state
controller mechanism in VB.NET. In VB6 it is possible to
create a single threaded ActiveX executable. With an API
call you can lock an instance of this ActiveX, so it stays
in memory even when no instance is active. And because
it's single threaded, every call returns the same data
stored in the instance.

Now I would like to create a class in .NET with the same
functionality. So basically the class has to provide some
sort of 'shared memory'.

Can someone help me with this problem?

Many thanks,
Jan
 
Sounds like what you want is a singleton.

A singleton is an object that only every has one instance of itself, which it owns. Do a google search on "singleton design pattern".

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top