I am trying to learn API. I started out buy using the findwindow fuction.
It did not work until I changed the return type to integer.

From:
VB Code:
  1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  2.       (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

To:
VB Code:
  1. Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  2.       (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer

Everywhere I look, its show the return type as Long. If I use long, my results are just random numbers.

Why?

VB.NET 2003