Hello,
I have found Win32 service as todo item.Maybe I can help ?See attachment. I can add CriticalSection and other features if you need it.
Best regardsRony