Advertisement
Java_Volume1 Windows API Call/ Explanation #96899

SnadBoy Imitator (Password Unmasker)

You've all seen the *'s that are used to hide passwords. This program reveals the text behind these stars. Extremely easy to follow, only 19 lines of code, including API declarations. Easy enough for an intermediate beginner.

AI

Ringkasan AI: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Kode Sumber
original-source
'(C) Copyright 1999 Matt Fredrikson
Private Declare Function WindowFromPoint Lib "user32.dll" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hWnd As Long, ByVal Msg As Long, wParam As Any, lParam As Any) As Long
Private Declare Function GetCursorPos Lib "user32.dll" (lpPoint As POINT_TYPE) As Long
Private Type POINT_TYPE
 x As Long
 y As Long
End Type
Private Const WM_GETTEXT = &HD
Private Const TXT_LEN = 100
Private Sub Timer1_Timer()
 Dim ppoint As POINT_TYPE
 Dim ttxt As String
 ttxt = Space(100) 'Give space for window text
 errval = GetCursorPos(ppoint) 'Get Cursor Point
 thwnd = WindowFromPoint(ppoint.x, ppoint.y) 'Get window handle of window under cursor
 errval = SendMessage(thwnd, WM_GETTEXT, ByVal TXT_LEN, ByVal ttxt) 'Get text of that window
 ttxt = RTrim(ttxt) 'Remove Spaces
 Text1.Text = ttxt 'Display results
End Sub
Upload
Komentar Asli (3)
Dipulihkan dari Wayback Machine