Calling C language functions extended example

Sub Initialize
	Dim winTitle As String, winTitleLength As Long
	winTitle$ = String(255, 0)
	Dim findWinTitle As String, tempWinTitle As String
	Dim curWin As Long, found As Integer
	tempWinTitle = "I'm working here now!"
	findWinTitle = Inputbox("What window do you want _
    to use?")
	If findWinTitle = "" Then Exit Sub
	curWin = GetActiveWindow
	Do While curWin <> 0
		curWin = GetWindow(curWin, GW_HWNDNEXT)
		winTitleLength = GetWindowText(curWin, winTitle, _
		If Instr(1, winTitle, findWinTitle, 1) > 0 Then
			found = True
			Exit Do
		End If
	If found Then
		Call SetWindowText(curWin, tempWinTitle)
		Call SetActiveWindow(curWin)
		While GetActiveWindow = curWin
		winTitle = Left(winTitle, winTitleLength)
		Messagebox "Done working with " & winTitle & "!"
		Call SetWindowText(curWin, winTitle)
		Messagebox "Window not found!"
	End If
End Sub