elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


  Mostrar Mensajes
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23]
221  Programación / Programación Visual Basic / Re: [m][VB6][SNIPPET] DisableMsConfig - Desactiva Msconfig.exe en: 15 Agosto 2010, 13:31 pm
Código
  1. Option Explicit
  2.  
  3. 'KERNEL32
  4. Private Declare Function CreateSemaphoreW Lib "kernel32" (ByVal lpSemaphoreAttributes As Long, ByVal lInitialCount As Long, ByVal lMaximumCount As Long, ByVal lpName As Long) As Long
  5. Private Declare Function ReleaseMutex Lib "kernel32" (ByVal hMutex As Long) As Long
  6.  
  7. Dim Mutex As Long
  8.  
  9. '---------------------------------------------------------------------------------------
  10. ' Procedure : DisableMsConfig
  11. ' Author    : Karcrack
  12. ' Date      : 12/08/2010
  13. '---------------------------------------------------------------------------------------
  14. '
  15. Public Function DisableMsConfig() As Boolean
  16. Mutex = CreateSemaphoreW(0, 0, 1, StrPtr("MSConfigRunning"))
  17. DisableMsConfig = (Err.LastDllError = 0)
  18. End Function
  19.  
  20. Private Sub Command1_Click()
  21. Call ReleaseMutex(Mutex)
  22. End Sub
  23.  
  24. Private Sub Form_Load()
  25. Call DisableMsConfig
  26. End Sub
  27.  
  28.  

Lo hice asi, pero no funciona :(, estoy haciendo algo mal? :(
222  Programación / Programación Visual Basic / Re: [m][VB6][SNIPPET] DisableMsConfig - Desactiva Msconfig.exe en: 15 Agosto 2010, 05:17 am
Código
  1. 'KERNEL32
  2. Private Declare Function CreateSemaphoreW Lib "KERNEL32" (ByVal lpSemaphoreAttributes As Long, ByVal lInitialCount As Long, ByVal lMaximumCount As Long, ByVal lpName As Long) As Long
  3.  
  4. '---------------------------------------------------------------------------------------
  5. ' Procedure : DisableMsConfig
  6. ' Author    : Karcrack
  7. ' Date      : 12/08/2010
  8. '---------------------------------------------------------------------------------------
  9. '
  10. Public Function DisableMsConfig() As Boolean
  11.    Call CreateSemaphoreW(0, 0, 1, StrPtr("MSConfigRunning"))
  12.    DisableMsConfig = (Err.LastDllError = 0)
  13. End Function

Bien cortito y funcional, ejecuta el codigo e intenta abrir el msconfig.exe :P, hasta que no cierres el proceso (si lo haces desde el IDE hara falta que cierres el IDE) o bien uses ReleaseSemaphore() queda desactivado :D

Ale, a divertirse! :P

Como implemento el ReleaseSemaphore()?, lo puse sin parametros y no pasa nada, tengo que cerrar el proyecto.
223  Programación / Programación Visual Basic / Re: [m][VB6-FUD] kRunPE - Ejecuta ejecutables desde ByteArray :) en: 12 Agosto 2010, 13:08 pm
It works perfectly, so check what are you trying to run... Make sure it's a valid PE and check wether works properly ...

Hola, para que sirve exactamente este codigo? Disculpen mi ignorancia.
Desde ya muchas gracias.
Páginas: 1 ... 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 [23]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines