Let me offer you this example:
Public Declare Ansi Function GetWindowText Lib "User32.dll" Alias "GetWindowTextA" ( _
ByVal hwnd As Integer, _
ByVal lpString As StringBuilder, _
ByVal nMaxCount As Integer) As Integer
Dim s As New StringBuilder(256)
Win32API.GetWindowText(hwnd, s, s.Capacity)
MessageBox.Show(s.ToString(), Application.ProductName)
Also, for a brief overview of using buffers, take a look at this article:
http://www.elitevb.com/content/01,0075,01/05.aspx