This is a Win32 service that sets the permissions on a central kernel mutex (the DBWinMutex object) that is used by the debugging system. Windows has what we consider a bug that prevents non-admin users from sending debugging information via the OutputDebugString() API function to a debugger. This happens under common circumstances, and has been very annoying.
After much digging and research, we nailed the problem to the DACL (Discretionary Access Control List) on the DBWinMutex object and a limitation on the behavior of CreateMutex() if the mutex already exists. We have written up a full exposition on this in a Tech Tip, and we'll defer the gory details to it.
This service, which launches at system boot time, creates the required mutex object (or opens it if already present), and then sets the DACL to allow free access to anybody. Once done, it simply sleeps until it's asked to shutdown. As long as it never exits, it retains a HANDLE to this mutex, and it allows OutputDebugString() to work correctly for everybody.
Installation is done from the command line by putting the executable in a suitable place (C:\bin, perhaps) and running it with either the -install (so it requires a manual start at system boot) or -installauto (the service starts automatically at boot) options. The service itself is never launched during installation, but it's easy to do by hand. There's also a "remove" option.
Installing a service requires SC_MANAGER_CREATE_SERVICE rights, which in practice means "Administrator". This is a Win32 limitation, not one of this program: we routinely request the bare minimum of rights when accessing or creating kernel objects.C> CD \BIN C> dbmutex -install install service with manual start C> dbmutex -installauto install service with auto start C> net start dbmutex start the service! C> net stop dbmutex stop the service C> dbmutex -remove stop and remove the service
Once the service is running, it should require no attention. The only thread of execution sits blocked on an Event object that fires when the service is to be shut down, so it should consume zero CPU time.
Wed Dec 10 20:35:33 PST 2003 - version 1.0.1 - Initial releaseNavigate: More Tools