[API]
RtlMoveMemory

[CODE]
Public Sub PokeS(ByVal ptrMem As Long, ByVal xChar1 As String, ByVal MaxSize As Long, Optional ByVal NullByteExtraReserved As Boolean = False)
  Dim xLong1 As Long
  'Dim xLong2 As Long
  
  xLong1 = Len(xChar1)
  MaxSize = MaxSize - 1& - CLng(NullByteExtraReserved)
  If xLong1 > MaxSize Then
    xChar1 = Left(xChar1, MaxSize)
    xLong1 = MaxSize
    Else
    xLong1 = xLong1 + 1&
    End If
  xChar1 = xChar1 & vbNullChar
  If IsUnicode Then
    Call RtlMoveMemory(ByVal ptrMem, ByVal StrPtr(xChar1), xLong1 * 2&)
    Else
    Call RtlMoveMemory(ByVal ptrMem, ByVal xChar1, xLong1)
    End If
  End Sub
