[API]
LocalAlloc
LocalFree
RtlMoveMemory

[CODE]
Public Function LocalAllocFromString_Wide(ByVal xChar1 As String) As Long
  Dim xLong1 As Long
  
  xChar1 = xChar1 & vbNullChar
  xLong1 = Len(xChar1) * 2&
  LocalAllocFromString_Wide = LocalAlloc(0&, xLong1)
  If Not LocalAllocFromString_Wide = 0& Then
    Call RtlMoveMemory(ByVal LocalAllocFromString_Wide, ByVal StrPtr(xChar1), xLong1)
    End If
  End Function
