Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
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 EnumTimeFormatsProccallback 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 MAKELCIDmacro, 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 GetLastErrorfunction.

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