Add Buddies to ListBox
by Tau
Purpose:
This code will add all of the users buddies to a listbox.
The code supports multiple categories and lagged connections.
Requirements:
This code requires a ListBox named List1 and a Command
Button named Command1. Both of these names can be modified
in the last Sub.
System:
This code will function on Visual Basic versions 5.0 and 6.0,
is to be used with no BAS file, and on America Online
versions 4.0 and 5.0
Private
Declare Function
FindWindow Lib "user32"
Alias "FindWindowA" (ByVal
lpClassName As String,
ByVal lpWindowName As
String) As Long
Private Declare Function
FindWindowEx Lib "user32"
Alias "FindWindowExA" (ByVal
hWnd1 As Long,
ByVal hWnd2 As
Long, ByVal lpsz1
As String, ByVal
lpsz2 As String)
As Long
Private Declare Function
GetTickCount& Lib "kernel32"
()
Private Declare Function
SendMessageByString Lib "user32"
Alias "SendMessageA" (ByVal
hwnd As Long,
ByVal wMsg As
Long, ByVal wParam
As Long, ByVal
lParam As String)
As Long
Private Declare Function
SendMessage Lib "user32"
Alias "SendMessageA" (ByVal
hwnd As Long,
ByVal wMsg As
Long, ByVal wParam
As Long, lParam As Any)
As Long
Private Declare Function
GetWindowThreadProcessId Lib "user32"
(ByVal hwnd As
Long, lpdwProcessId As
Long) As Long
Private Declare Function
OpenProcess Lib "kernel32"
(ByVal dwDesiredAccess
As Long, ByVal
bInheritHandle As Long,
ByVal dwProcessId As
Long) As Long
Private Declare Function
ReadProcessMemory Lib "kernel32"
(ByVal hProcess As
Long, ByVal lpBaseAddress
As Long, ByVal
lpBuffer As String,
ByVal nSize As
Long, ByRef lpNumberOfBytesWritten As
Long) As Long
Private Declare Sub
CopyMemory Lib "kernel32"
Alias "RtlMoveMemory" (destination As Any,
Source As Any, ByVal Length
As Long)
Private Declare Function
SendMessageLong& Lib "user32"
Alias "SendMessageA" (ByVal
hwnd As Long,
ByVal wMsg As
Long, ByVal wParam
As Long, ByVal
lParam As Long)
Private Declare Function
PostMessage Lib "user32"
Alias "PostMessageA" (ByVal
hwnd As Long,
ByVal wMsg As
Long, ByVal wParam
As Long, ByVal
lParam As Long)
As Long
Private Const
WM_GETTEXT = &HD
Private Const
WM_GETTEXTLENGTH = &HE
Private Const
WM_LBUTTONDBLCLK = &H203
Private Const
WM_CLOSE = &H10
Private Const
LB_GETITEMDATA = &H199
Private Const
LB_SETCURSEL = &H186
Private |