Private Declare Sub FillMemory Lib "kernel32.dll" Alias "RtlFillMemory" (Destination As Any, ByVal Length As Long, ByVal Fill As Byte)
Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" (Destination As Any, ByVal Length As Long)
Private Sub Form_Load()
Dim TestString As String
'Mak sure Visual Basic repaint the form automatically
Me.AutoRedraw = True
'Create a buffer string
TestString = String(25, "X")
Me.Print "This is our initial string: " + TestString
'Fill the buffer-string with A's
FillMemory ByVal TestString, Len(TestString), Asc("A")
Me.Print "This is our string after FillMemory: " + TestString
'Empty the string
ZeroMemory ByVal TestString, Len(TestString)
Me.Print "This is our string after ZeroMemory: " + TestString
End Sub