Datos de un EXE
2 participantes
Página 1 de 1.
Datos de un EXE
Código:
Lo ejecutan en debug y pueden sacar los datos como el ClassName para el FindWindow de VB...
Crean un timer en el formulario, esto va todo el codigo en el frm y al pasar el mouse por el proceso esperando un poquito te dice los datos.
Atte, Francohhh.
::
- Código:
Option Explicit
Private Declare Function WindowFromPoint Lib "user32" (ByVal _
xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As _
POINTAPI) As Long
Private Declare Function GetClassName Lib "user32" Alias _
"GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName _
As String, ByVal nMaxCount As Long) As Long
Private Declare Function GetParent Lib "user32" _
(ByVal hwnd As Long) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" ( _
ByVal hwnd As Long, _
ByVal lpString As String, _
ByVal cch As Long) As Long
Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" ( _
ByVal hwnd As Long) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Form_Load()
Timer1.Interval = 5000
End Sub
Private Sub Timer1_Timer()
Dim Ret As Long, Handle As Long, hParent
Dim Cor As POINTAPI
Dim Buffer As String
Dim ClassName As String
Dim Caption_Ventana As String
Ret = GetCursorPos(Cor)
Handle = WindowFromPoint(Cor.x, Cor.y)
hParent = GetParent(Handle)
ClassName = Space$(128)
Ret = GetClassName(Handle, ClassName, 128)
ClassName = LCase(Left$(ClassName, Ret))
Caption_Ventana = String(GetWindowTextLength(Handle), Chr$(0))
Call GetWindowText(Handle, Caption_Ventana, 100)
Me.Cls
Debug.Print " Hwnd : " & Handle
Debug.Print " Hwnd Parent : " & hParent
Debug.Print " Nombre de clase : " & ClassName
Debug.Print " Caption de la ventana : " & Caption_Ventana
End Sub
Lo ejecutan en debug y pueden sacar los datos como el ClassName para el FindWindow de VB...
Crean un timer en el formulario, esto va todo el codigo en el frm y al pasar el mouse por el proceso esperando un poquito te dice los datos.
Atte, Francohhh.
::
Página 1 de 1.
Permisos de este foro:
No puedes responder a temas en este foro.
|
|