31 unsigned long iLanguageID;
32 WCHAR szLanguageIdString[9];
39 L"SYSTEM\\CurrentControlSet\\Control\\NLS\\Language",
48 dwValueSize =
sizeof(szLanguageIdString);
53 (
LPBYTE)szLanguageIdString,
61 iLanguageID =
wcstoul(szLanguageIdString,
NULL, 16);
70 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
157 dwValueSize =
sizeof(*Index);
169 dwValueSize =
sizeof(*TimeZoneInfo);
179 if (
Description && DescriptionSize && *DescriptionSize > 0)
191 if (StandardName && StandardNameSize && *StandardNameSize > 0)
203 if (DaylightName && DaylightNameSize && *DaylightNameSize > 0)
232 WCHAR szKeyName[256];
236 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones",
244 for (dwIndex = 0; ; dwIndex++)
246 dwNameSize =
sizeof(szKeyName);
292 L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
300 dwValueSize =
sizeof(dwDisabled);
302 L"DisableAutoDaylightTimeSet",
324 IN BOOL EnableAutoDaylightTime)
331 L"SYSTEM\\CurrentControlSet\\Control\\TimeZoneInformation",
338 if (!EnableAutoDaylightTime)
343 L"DisableAutoDaylightTimeSet",
#define RegCloseKey(hKey)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
static const WCHAR Description[]
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
_Out_ PULONG _Out_ PULONG pIndex
#define KEY_ENUMERATE_SUB_KEYS
_In_ ULONG _In_ ULONG _In_ ULONG Length
PULONG MinorVersion OPTIONAL
VOID EnumerateTimeZoneList(IN PENUM_TIMEZONE_CALLBACK Callback, IN PVOID Context OPTIONAL)
LONG QueryTimeZoneData(IN HKEY hZoneKey, OUT PULONG Index OPTIONAL, OUT PREG_TZI_FORMAT TimeZoneInfo, OUT PWCHAR Description OPTIONAL, IN OUT PULONG DescriptionSize OPTIONAL, OUT PWCHAR StandardName OPTIONAL, IN OUT PULONG StandardNameSize OPTIONAL, OUT PWCHAR DaylightName OPTIONAL, IN OUT PULONG DaylightNameSize OPTIONAL)
VOID SetAutoDaylight(IN BOOL EnableAutoDaylightTime)
BOOL GetAutoDaylight(VOID)
BOOL GetTimeZoneListIndex(IN OUT PULONG pIndex)
LONG(* PENUM_TIMEZONE_CALLBACK)(IN HKEY hZoneKey, IN PVOID Context OPTIONAL)
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
#define HKEY_LOCAL_MACHINE