| 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. |
| 6 |
use ctypes::c_int; |
| 7 |
use shared::minwindef::{BOOL, DWORD, LPARAM, LPBOOL, LPVOID, LPWORD, UINT}; |
| 8 |
use um::winnls::LPNLSVERSIONINFO; |
| 9 |
use um::winnt::{LCID, LPCSTR, LPCWCH, LPCWSTR, LPSTR, LPWSTR, PCNZWCH}; |
| 10 |
extern "system" { |
| 11 |
pub fn CompareStringEx( |
| 12 |
lpLocaleName: LPCWSTR, |
| 13 |
dwCmpFlags: DWORD, |
| 14 |
lpString1: LPCWCH, |
| 15 |
cchCount1: c_int, |
| 16 |
lpString2: LPCWCH, |
| 17 |
cchCount2: c_int, |
| 18 |
lpVersionInformation: LPNLSVERSIONINFO, |
| 19 |
lpReserved: LPVOID, |
| 20 |
lParam: LPARAM, |
| 21 |
) -> c_int; |
| 22 |
pub fn CompareStringOrdinal( |
| 23 |
lpString1: LPCWCH, |
| 24 |
cchCount1: c_int, |
| 25 |
lpString2: LPCWCH, |
| 26 |
cchCount2: c_int, |
| 27 |
bIgnoreCase: BOOL, |
| 28 |
) -> c_int; |
| 29 |
pub fn CompareStringW( |
| 30 |
Locale: LCID, |
| 31 |
dwCmpFlags: DWORD, |
| 32 |
lpString1: PCNZWCH, |
| 33 |
cchCount1: c_int, |
| 34 |
lpString2: PCNZWCH, |
| 35 |
cchCount2: c_int, |
| 36 |
) -> c_int; |
| 37 |
pub fn FoldStringW( |
| 38 |
dwMapFlags: DWORD, |
| 39 |
lpSrcStr: LPCWCH, |
| 40 |
cchSrc: c_int, |
| 41 |
lpDestStr: LPWSTR, |
| 42 |
cchDest: c_int, |
| 43 |
) -> c_int; |
| 44 |
pub fn GetStringTypeExW( |
| 45 |
Locale: LCID, |
| 46 |
dwInfoType: DWORD, |
| 47 |
lpSrcStr: LPCWCH, |
| 48 |
cchSrc: c_int, |
| 49 |
lpCharType: LPWORD, |
| 50 |
) -> BOOL; |
| 51 |
pub fn GetStringTypeW( |
| 52 |
dwInfoType: DWORD, |
| 53 |
lpSrcStr: LPCWCH, |
| 54 |
cchSrc: c_int, |
| 55 |
lpCharType: LPWORD, |
| 56 |
) -> BOOL; |
| 57 |
pub fn MultiByteToWideChar( |
| 58 |
CodePage: UINT, |
| 59 |
dwFlags: DWORD, |
| 60 |
lpMultiByteStr: LPCSTR, |
| 61 |
cbMultiByte: c_int, |
| 62 |
lpWideCharStr: LPWSTR, |
| 63 |
cchWideChar: c_int, |
| 64 |
) -> c_int; |
| 65 |
pub fn WideCharToMultiByte( |
| 66 |
CodePage: UINT, |
| 67 |
dwFlags: DWORD, |
| 68 |
lpWideCharStr: LPCWSTR, |
| 69 |
cchWideChar: c_int, |
| 70 |
lpMultiByteStr: LPSTR, |
| 71 |
cbMultiByte: c_int, |
| 72 |
lpDefaultChar: LPCSTR, |
| 73 |
lpUsedDefaultChar: LPBOOL, |
| 74 |
) -> c_int; |
| 75 |
} |