Attempt #1 to implement Matt Curland's Singleton [Resolved + New Complete Source]
All,
I've tried to implement the Singleton project - discussed in Matt Curland's "Advanced Visual Basic 6". He supplies a sample project called TimeServer which implements the ROTHook lightweight Object.
Of course his code works fine. But when I tried to create a StateServer based on his Client and Server projects, I get a slightly broken scenario.
As seen from this figure (the 4 Clients are on the left, the Server is on the right):
http://www.vbforums.com/attachment.p...postid=1821655
The first client I load is never in sync with either the server or with the rest of the clients. However every other Client loaded after the 1st (2nd, 3rd, 4th, etc) works correctly and as expected.
You will need to own a copy of the book to run my projects, so if you do, here they are:
http://www.vbforums.com/attachment.p...postid=1821658
I've included both the Client EXE and the ActiveX EXE Server.
It's as if the 1st Client is getting it's own instance of "a" server, but not the one that's running. However, when the 1st client gets loaded, the server does get loaded.