Share via


EnumTimeFormats

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function enumerates the time formats that are available for a specified locale.

Note

If you specify a locale with the LCID (Locale ID) parameter and that locale is not installed or available on the Windows® phone, the function fails with ERROR_INVALID_PARAMETER. To determine whether the locale is supported or not, call IsValidLocale.

Syntax

BOOL EnumTimeFormats(
  TIMEFMT_ENUMPROC lpTimeFmtEnumProc, 
  LCID Locale, 
  DWORD dwFlags 
); 

Parameters

  • lpTimeFmtEnumProc
    [in] Pointer to an application-defined callback function. See the EnumTimeFormatsProc callback function for further details.
  • Locale
    [in] Value that specifies the locale to retrieve time format information for. This parameter can be a locale identifier created by the MAKELCID macro, or one of the following predefined values. The following table shows the values this parameter can take.

    Value Description

    LOCALE_SYSTEM_DEFAULT

    Default system locale.

    LOCALE_USER_DEFAULT

    Default user locale.

    LOCALE_NEUTRAL

    Default language-neutral locale.

  • dwFlags
    [in] Currently unused; set to zero.

Return Value

Nonzero indicates success. Zero indicates failure. To get extended error information, call the GetLastError) function. The following table shows possible return values for the GetLastError function.

Value Description

ERROR_INVALID_PARAMETER

The parameter is incorrect, or the specified LCID is not supported on the device.

For more information about locales, see Language Identifiers and Locales.

Requirements

Header winnls.h
Library Coreloc.lib
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

EnumCalendarInfo
EnumDateFormats
EnumTimeFormatsProc
MAKELCID

Concepts

Language Identifiers and Locales