VB6: Single-instance application across all user sessions
问题 I have an application that needs to be a single-instance app across all user sessions on a Windows PC. My research thus far has centered around using a mutex to accomplish this, but I am having an issue that I am not sure is really an issue, this is really a best-practice question I believe. Here's the code first of all: Private Const AppVer = "Global\UNIQUENAME" ' This is not what i am using but the name is unique Public Sub Main() Dim mutexValue As Long mutexValue = CreateMutex(ByVal 0&, 1,