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

 

 


Tema destacado: (TUTORIAL) Aprende a emular Sentinel Dongle By Yapis


  Mostrar Mensajes
Páginas: 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [26] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 ... 74
251  Programación / Programación Visual Basic / Re: [VB-SNIPPET] htons() replacement en: 26 Junio 2010, 23:15 pm
Muy buen tip Karcrack

Saludos.
252  Programación / Programación Visual Basic / Re: Ayuda MousePointer en: 15 Junio 2010, 12:08 pm
GetCursor es solo valido para la instancia para el cursor en general usa GetCursorInfo, en este caso no te serviria de nada subclasificar quizas hooks sea lo mas apropiado.

Código:
Option Explicit
Private Declare Function GetCursorInfo Lib "user32.dll" (ByRef pci As PCURSORINFO) As Long

Private Type POINTAPI
    x               As Long
    y               As Long
End Type

Private Type PCURSORINFO
    cbSize          As Long
    flags           As Long
    hCursor         As Long
    ptScreenPos     As POINTAPI
End Type


Dim CI As PCURSORINFO
Dim hMemCursor As Long


Private Sub Form_Load()
    CI.cbSize = Len(CI)
    GetCursorInfo CI
    hMemCursor = CI.hCursor
   
    Timer1.Interval = 10
End Sub

Private Sub Timer1_Timer()
    CI.cbSize = Len(CI)
    GetCursorInfo CI
       
    If hMemCursor <> CI.hCursor Then
          hMemCursor = CI.hCursor
          Me.Print hMemCursor
    End If
End Sub

253  Programación / Programación Visual Basic / Re: Api/Class RichTextBox en: 10 Junio 2010, 02:08 am
Hola, Cobein hizo un modulo clase para leer un .rtf y mostrarlo en un richtextbox creado con apis. pero bueno si vos necesitas las propiedades para modificar el texto y decorarlo ya vas a tener que investigar un poco sobre el tema. hay algo de información en la web.

este es el link de la clase
http://www.advancevb.com.ar/code/RTBOF.rar

Saludos.
254  Programación / Programación Visual Basic / Re: [Ayuda] Evento en La "Ruedita" del Raton en: 6 Junio 2010, 05:16 am
hola Agrega un modulo clase con el nombre "ClsMouseWheel"

dentro de este modulo


Código
  1. ]
  2. Option Explicit
  3. Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
  4. Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
  5. Private Declare Function CallWindowProc Lib "user32.dll" Alias "CallWindowProcA" (ByVal lpPrevWndFunc As Long, ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  6. Private Const GWL_WNDPROC As Long = -4
  7.  
  8. Private Declare Function GetModuleHandle Lib "kernel32.dll" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long
  9. Private Declare Function GetProcAddress Lib "kernel32.dll" (ByVal hModule As Long, ByVal lpProcName As String) As Long
  10.  
  11. Private Declare Function VirtualAlloc Lib "kernel32.dll" (ByRef lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
  12. Private Declare Function VirtualFree Lib "kernel32.dll" (ByRef lpAddress As Long, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long
  13. Private Const MEM_COMMIT As Long = &H1000
  14. Private Const PAGE_EXECUTE_READWRITE As Long = &H40
  15. Private Const MEM_RELEASE As Long = &H8000&
  16.  
  17. Private Const WM_DESTROY As Long = &H2
  18. Private Const WM_MOUSEWHEEL As Long = &H20A
  19.  
  20.  
  21. Private pASMWrapper As Long
  22. Private PrevWndProc As Long
  23. Private hSubclassedWnd As Long
  24.  
  25. Public Event MOUSEWHEEL(ByVal wParam As Long)
  26.  
  27. Public Function WindowProc(ByVal hwnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  28.  
  29.    WindowProc = CallWindowProc(PrevWndProc, hwnd, Msg, wParam, lParam)
  30.  
  31.    If Msg = WM_MOUSEWHEEL Then
  32.        RaiseEvent MOUSEWHEEL(wParam)
  33.    End If
  34.  
  35.    If Msg = WM_DESTROY Then
  36.        Call StopSubclassing
  37.    End If
  38.  
  39. End Function
  40.  
  41. Public Function SetSubclassing(ByVal hwnd As Long) As Boolean
  42.  
  43.    'Setzt Subclassing, sofern nicht schon gesetzt
  44.  
  45.    If PrevWndProc = 0 Then
  46.        If pASMWrapper <> 0 Then
  47.  
  48.            PrevWndProc = SetWindowLong(hwnd, GWL_WNDPROC, pASMWrapper)
  49.  
  50.            If PrevWndProc <> 0 Then
  51.                hSubclassedWnd = hwnd
  52.                SetSubclassing = True
  53.            End If
  54.  
  55.        End If
  56.    End If
  57.  
  58. End Function
  59.  
  60. Public Function StopSubclassing() As Boolean
  61.  
  62.    'Stopt Subclassing, sofern gesetzt
  63.  
  64.    If hSubclassedWnd <> 0 Then
  65.        If PrevWndProc <> 0 Then
  66.  
  67.            Call SetWindowLong(hSubclassedWnd, GWL_WNDPROC, PrevWndProc)
  68.  
  69.            hSubclassedWnd = 0
  70.            PrevWndProc = 0
  71.  
  72.            StopSubclassing = True
  73.  
  74.        End If
  75.    End If
  76.  
  77. End Function
  78.  
  79. Private Sub Class_Initialize()
  80.  
  81.    Dim ASM(0 To 103) As Byte
  82.    Dim pVar As Long
  83.    Dim ThisClass As Long
  84.    Dim CallbackFunction As Long
  85.    Dim pVirtualFree
  86.    Dim i As Long
  87.    Dim sCode As String
  88.  
  89.    pASMWrapper = VirtualAlloc(ByVal 0&, 104, MEM_COMMIT, PAGE_EXECUTE_READWRITE)
  90.    If pASMWrapper <> 0 Then
  91.  
  92.        ThisClass = ObjPtr(Me)
  93.        Call CopyMemory(pVar, ByVal ThisClass, 4)
  94.        Call CopyMemory(CallbackFunction, ByVal (pVar + 28), 4)
  95.        pVirtualFree = GetProcAddress(GetModuleHandle("kernel32.dll"), "VirtualFree")
  96.  
  97.        sCode = "90FF05000000006A0054FF742418FF742418FF742418FF7424186800000000B800000000FFD0FF0D00000000A10000000085C075" & _
  98.                "0458C21000A10000000085C0740458C2100058595858585868008000006A00680000000051B800000000FFE00000000000000000"
  99.  
  100.        For i = 0 To Len(sCode) - 1 Step 2
  101.            ASM(i / 2) = CByte("&h" & Mid$(sCode, i + 1, 2))
  102.        Next
  103.  
  104.        Call CopyMemory(ASM(3), pASMWrapper + 96, 4)
  105.        Call CopyMemory(ASM(40), pASMWrapper + 96, 4)
  106.        Call CopyMemory(ASM(58), pASMWrapper + 96, 4)
  107.        Call CopyMemory(ASM(45), pASMWrapper + 100, 4)
  108.        Call CopyMemory(ASM(84), pASMWrapper, 4)
  109.        Call CopyMemory(ASM(27), ThisClass, 4)
  110.        Call CopyMemory(ASM(32), CallbackFunction, 4)
  111.        Call CopyMemory(ASM(90), pVirtualFree, 4)
  112.        Call CopyMemory(ByVal pASMWrapper, ASM(0), 104)
  113.  
  114.    End If
  115.  
  116. End Sub
  117.  
  118. Private Sub Class_Terminate()
  119.  
  120.    If pASMWrapper <> 0 Then
  121.        Call StopSubclassing
  122.        Call CopyMemory(ByVal (pASMWrapper + 108), 1, 4)
  123.    End If
  124.  
  125. End Sub
  126.  

y en el formulario
Código
  1. Option Explicit
  2. Private WithEvents cRuedaRaton As ClsMouseWheel
  3.  
  4. Private Sub cRuedaRaton_MOUSEWHEEL(ByVal wParam As Long)
  5.    If wParam > 0 Then
  6.        MsgBox "Rueda Girada hacia Arriba"
  7.    Else
  8.        MsgBox "Rueda Girada hacia Abajo"
  9.    End If
  10. End Sub
  11.  
  12. Private Sub Form_Load()
  13.    Set cRuedaRaton = New ClsMouseWheel
  14.    cRuedaRaton.SetSubclassing Me.hwnd
  15. End Sub
  16.  
  17. Private Sub Form_Unload(Cancel As Integer)
  18.    cRuedaRaton.StopSubclassing
  19.    Set cRuedaRaton = Nothing
  20. End Sub
  21.  

Saludos.



255  Programación / Programación Visual Basic / Re: [Ayuda] Como puedo validar esto? en: 31 Mayo 2010, 11:31 am
ya que se sale el tema, pregunto con respecto a valores numericos con los singnos.

he visto que cuando se utiliza una API muchas veces en los valores nulos (cero u otros tambien)  se los pasa con los singos

por ejemplo

Código:
SendMessage THWnd, WM_KEYDOWN, VK_R, 0&

al cero se lo marca como un long

ahora si yo ago esto, es nesesario, esta bien o esta mal?
Código:
dim Valor as  long

Valor = 5&

o esto

Código:
dim B() as byte

redim B(0&)

Saludos.
256  Programación / Programación Visual Basic / Re: Dibujar en hDC de Un Usercontrol Windowless [Solucionado] en: 19 Mayo 2010, 12:18 pm
Sonic88 , el error seguramente es porque haces referencia al parent, o el extender en algun lugar seguramente lo puede solucionar con

If Ambient.UserMode Then

si no funciona pone la linea del error

Saludos.
257  Programación / Programación Visual Basic / Re: Ayuda, Silenciar Webbrowser en: 6 Mayo 2010, 21:25 pm
esa funcion lo que hace es evitar mostrar los errores de javascript, no te va a quitar el sonido del click si es lo que piensas.

Saludos.
258  Programación / Programación Visual Basic / Re: Leandro Socket and Multithread en: 6 Mayo 2010, 21:23 pm
hola, no entendí bien su pregunta, pero no creo que pueda funcionar con multiThread este modulo es para cosas pequeñas, el envio de datos masivos podría provocar la mezcla de datos. y además el envío de datos es sincronizado. usted no puede enviar mas de un dato a al mismo tiempo.

quizás adaptando el modulo a sus necesidades podría lograr lo que buzca.

Saludos.
259  Programación / Programación Visual Basic / Re: [Source] Escritorio Remoto en: 6 Mayo 2010, 11:21 am
Es posible que no funcionase por que intentaba ejecutar el server en un windows 7, si alguien puede probarlo en ese SO y decir si funciona.

No no tiene nada que ver, deberia funcionar bien. lo podes ver en las capturas que puse

Saludos.
260  Programación / Programación Visual Basic / Re: [SRC] Aplicaciones MultiLenguaje mas facil que nunca!!! {mConfig.bas} en: 2 Mayo 2010, 17:53 pm
La capcha no va a funcionar porque el servidor esta con unos problemas con la libreria GD o la que utilizar para los textos,  asi por unos dias esta out.

Saludos.



Páginas: 1 ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 [26] 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 ... 74
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines