ok i see people puting code with decleration like the one bellow, and my question is how do i find the name of a dll i need or lib i need, do i use an helping software like spy++ or how do i find the decleration i need?

decleration like this:

VB Code:
  1. Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)
  2. Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias "InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal dwReserved As Long) As Long
  3. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Any) As Long
  4. Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
  5. Private Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, Byval szApp As String, Byval szOtherStuff As String, Byval hIcon As Long) As Long
  6. Private Declare Function GetCurrentThread Lib "kernel32" () As Long
  7. Private Declare Function SendMessageString Lib "user32" _
  8. Alias "SendMessageA" (ByVal hwnd As Long, Byval wMsg As Long, Byval wParam As Long, Byval lParam As String) As Long
  9. Declare Function ProcessFirst Lib "kernel32" Alias "Process32First" (ByVal hSnapshot As Long, uProcess As PROCESSENTRY32) As Long
  10. Private Declare Function GetComName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String,