Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: Karcrack en 7 Septiembre 2009, 17:48 pm



Título: [SRC] Deshabilitar Regedit *NUEVO METODO*
Publicado por: Karcrack en 7 Septiembre 2009, 17:48 pm
Metodo similar a este:
Código:
http://foro.elhacker.net/programacion_vb/src_deshabilitar_taskmgr_nuevo_metodo-t266708.0.html
Código
  1. Option Explicit
  2. '---------------------------------------------------------------------------------------
  3. ' Module    : mKillRegedit
  4. ' Author    : Karcrack
  5. ' Now$      : 07/09/09 17:25
  6. ' Used for? : Disable Regedit
  7. ' TestedOn  : Windows XP SP3
  8. '---------------------------------------------------------------------------------------
  9.  
  10. 'USER32
  11. Private Declare Function CreateWindowEx Lib "USER32" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, ByRef lpParam As Any) As Long
  12. Private Declare Function RegisterClass Lib "USER32" Alias "RegisterClassA" (ByRef Class As WNDCLASS) As Long
  13. Private Declare Function DefWindowProc Lib "USER32" Alias "DefWindowProcA" (ByVal Hwnd As Long, ByVal msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  14.  
  15. Private Type WNDCLASS
  16.    style           As Long
  17.    lpfnwndproc     As Long
  18.    cbClsextra      As Long
  19.    cbWndExtra2     As Long
  20.    hInstance       As Long
  21.    hIcon           As Long
  22.    hCursor         As Long
  23.    hbrBackground   As Long
  24.    lpszMenuName    As String
  25.    lpszClassName   As String
  26. End Type
  27.  
  28. Public Sub DisableRegedit()
  29.    Dim tWC     As WNDCLASS
  30.  
  31.    With tWC
  32.        .style = &H6008
  33.        .hInstance = App.hInstance
  34.        .lpfnwndproc = GetPtr(AddressOf WndProc)
  35.        .lpszMenuName = "#103"
  36.        .lpszClassName = "RegEdit_RegEdit"
  37.    End With
  38.  
  39.    If RegisterClass(tWC) Then
  40.        Call CreateWindowEx(&H40000, "RegEdit_RegEdit", vbNullString, ByVal 0&, 0, 0, 0, 0, 0, 0, App.hInstance, ByVal 0&)
  41.    End If
  42. End Sub
  43.  
  44. Private Function WndProc(ByVal Hwnd As Long, ByVal uMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  45.    WndProc = DefWindowProc(Hwnd, uMsg, wParam, lParam)
  46. End Function
  47.  
  48. Private Function GetPtr(ByVal lPtr As Long) As Long
  49.    GetPtr = lPtr
  50. End Function

Saludos ;)


MOD: Se me olvidaba! Para ejecutar multiples instancias del Regedit pueden hacer esto:
Código:
regedit -m
Con lo que se saltarian esta 'deshabilitacion' :xD


Título: Re: [SRC] Deshabilitar Regedit *NUEVO METODO*
Publicado por: ssccaann43 © en 7 Septiembre 2009, 20:59 pm
Karcrack, excelente codigo... Igual al otro...!