winapi_ui_automation/um/
datetimeapi.rs

1// Licensed under the Apache License, Version 2.0
2// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4// All files in the project carrying such notice may not be copied, modified, or distributed
5// except according to those terms.
6use ctypes::c_int;
7use shared::minwindef::DWORD;
8use um::minwinbase::SYSTEMTIME;
9use um::winnt::{LCID, LPCSTR, LPCWSTR, LPSTR, LPWSTR};
10extern "system" {
11    pub fn GetDateFormatA(
12        Locale: LCID,
13        dwFlags: DWORD,
14        lpDate: *const SYSTEMTIME,
15        lpFormat: LPCSTR,
16        lpDateStr: LPSTR,
17        cchDate: c_int,
18    ) -> c_int;
19    pub fn GetDateFormatW(
20        Locale: LCID,
21        dwFlags: DWORD,
22        lpDate: *const SYSTEMTIME,
23        lpFormat: LPCWSTR,
24        lpDateStr: LPWSTR,
25        cchDate: c_int,
26    ) -> c_int;
27    pub fn GetTimeFormatA(
28        Locale: LCID,
29        dwFlags: DWORD,
30        lpTime: *const SYSTEMTIME,
31        lpFormat: LPCSTR,
32        lpTimeStr: LPSTR,
33        cchTime: c_int,
34    ) -> c_int;
35    pub fn GetTimeFormatW(
36        Locale: LCID,
37        dwFlags: DWORD,
38        lpTime: *const SYSTEMTIME,
39        lpFormat: LPCWSTR,
40        lpTimeStr: LPWSTR,
41        cchTime: c_int,
42    ) -> c_int;
43    pub fn GetTimeFormatEx(
44        lpLocaleName: LPCWSTR,
45        dwFlags: DWORD,
46        lpTime: *const SYSTEMTIME,
47        lpFormat: LPCWSTR,
48        lpTimeStr: LPWSTR,
49        cchTime: c_int,
50    ) -> c_int;
51    pub fn GetDateFormatEx(
52        lpLocaleName: LPCWSTR,
53        dwFlags: DWORD,
54        lpDate: *const SYSTEMTIME,
55        lpFormat: LPCWSTR,
56        lpDateStr: LPWSTR,
57        cchDate: c_int,
58        lpCalendar: LPCWSTR,
59    ) -> c_int;
60}