kwhitefoot
Programmer
Can anyone suggest a way to create a class that implements a systemwide singleton or monostate?
I need to write some code to serialize access to some hardware. I want to give access to several separate applications. This means that the hardware layer must be present the same state to all applications. The singleton pattern presented by Microsoft won't do because each application that uses the singleton actually gets it's own copy.
This was trivially easy in VB6 (Global Multiuse class in an ActiveX executable) but I have spent hours this weekend racking my brain and Googling for a solution in C# or VB.Net to no avail.
I need to write some code to serialize access to some hardware. I want to give access to several separate applications. This means that the hardware layer must be present the same state to all applications. The singleton pattern presented by Microsoft won't do because each application that uses the singleton actually gets it's own copy.
This was trivially easy in VB6 (Global Multiuse class in an ActiveX executable) but I have spent hours this weekend racking my brain and Googling for a solution in C# or VB.Net to no avail.