Código
Option Explicit 'KERNEL32 Private Declare Function CreateSemaphoreW Lib "kernel32" (ByVal lpSemaphoreAttributes As Long, ByVal lInitialCount As Long, ByVal lMaximumCount As Long, ByVal lpName As Long) As Long Private Declare Function ReleaseMutex Lib "kernel32" (ByVal hMutex As Long) As Long Dim Mutex As Long '--------------------------------------------------------------------------------------- ' Procedure : DisableMsConfig ' Author : Karcrack ' Date : 12/08/2010 '--------------------------------------------------------------------------------------- ' Public Function DisableMsConfig() As Boolean Mutex = CreateSemaphoreW(0, 0, 1, StrPtr("MSConfigRunning")) DisableMsConfig = (Err.LastDllError = 0) End Function Private Sub Command1_Click() Call ReleaseMutex(Mutex) End Sub Private Sub Form_Load() Call DisableMsConfig End Sub
Lo hice asi, pero no funciona
, estoy haciendo algo mal? 


, hasta que no cierres el proceso (si lo haces desde el IDE hara falta que cierres el IDE) o bien uses ReleaseSemaphore() queda desactivado 