[API]
Public LOGFONT
CreateFontIndirectA
CreateFontIndirectW

[CODE]
Public Function CreateFontIndirect(lpLogFont As LOGFONT) As Long
  Dim xChar1 as String

  xChar1 = lpLogFont.FontName & String(33&, vbNullChar)
  If IsUnicode Then
    Call RtlMoveMemory(ByVal VarPtr(lpLogFont.lfFaceName(0)), ByVal StrPtr(xChar1), 66&)
    CreateFontIndirect = CreateFontIndirectW(VarPtr(lpLogFont))
    Else
    Call RtlMoveMemory(ByVal VarPtr(lpLogFont.lfFaceName(0)), ByVal xChar1, 33&)
    CreateFontIndirect = CreateFontIndirectA(VarPtr(lpLogFont))
    End If
  End Function
