[API]
GetOpenFileNameA
GetOpenFileNameW

[INCLUDE]
OPENFILENAME
PeekS

[CODE]
Public Function GetOpenFileName(ByRef xType1 As OPENFILENAME) As String
  Dim xLong1 As Long
  Dim xType2 As OPENFILENAME_Real

  Call OPENFILENAME_Patch(xType1, xType2)
  xType2.Flags = &H81004
  If IsUnicode Then
    xLong1 = GetOpenFileNameW(xType2)
    Else
    xLong1 = GetOpenFileNameA(xType2)
    End If
  If Not xLong1 = 0& Then GetOpenFileName = PeekS(xType2.lpstrFile)
  Call OPENFILENAME_Free(xType2)
  End Function