[API]
GetTimeFormatA
GetTimeFormatW
SYSTEMTIME
GetSystemTime

[INCLUDE]
GenericInit

[CODE]
Public Function GetTimeFormatNow(Optional ByVal xMode As Long = 0&) As String
  Dim xLong1 As Long
  Dim xType1 As SYSTEMTIME
  
  Call GetSystemTime(xType1)
  If IsUnicode Then
    xLong1 = GetTimeFormatW(1024&, 0&, xType1, 0&, ptrTemp, ptrTempSizeXW)
    Else
    xLong1 = GetTimeFormatA(1024&, 0&, xType1, 0&, ptrTemp, ptrTempSizeX)
    End If
  If xLong1 > 0& Then GetTimeFormatNow = PeekS(ptrTemp, xLong1)
  End Function
