File indexing completed on 2025-01-30 10:02:24
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_WINAPI_CHARACTER_CODE_CONVERSION_HPP_INCLUDED_
0009 #define BOOST_WINAPI_CHARACTER_CODE_CONVERSION_HPP_INCLUDED_
0010
0011 #include <boost/winapi/basic_types.hpp>
0012 #include <boost/winapi/detail/header.hpp>
0013
0014 #ifdef BOOST_HAS_PRAGMA_ONCE
0015 #pragma once
0016 #endif
0017
0018 #if !defined( BOOST_USE_WINDOWS_H )
0019 extern "C" {
0020
0021 BOOST_WINAPI_IMPORT_EXCEPT_WM int BOOST_WINAPI_WINAPI_CC
0022 MultiByteToWideChar(
0023 boost::winapi::UINT_ CodePage,
0024 boost::winapi::DWORD_ dwFlags,
0025 boost::winapi::LPCSTR_ lpMultiByteStr,
0026 int cbMultiByte,
0027 boost::winapi::LPWSTR_ lpWideCharStr,
0028 int cchWideChar);
0029
0030 BOOST_WINAPI_IMPORT_EXCEPT_WM int BOOST_WINAPI_WINAPI_CC
0031 WideCharToMultiByte(
0032 boost::winapi::UINT_ CodePage,
0033 boost::winapi::DWORD_ dwFlags,
0034 boost::winapi::LPCWSTR_ lpWideCharStr,
0035 int cchWideChar,
0036 boost::winapi::LPSTR_ lpMultiByteStr,
0037 int cbMultiByte,
0038 boost::winapi::LPCSTR_ lpDefaultChar,
0039 boost::winapi::LPBOOL_ lpUsedDefaultChar);
0040
0041 }
0042 #endif
0043
0044 namespace boost {
0045 namespace winapi {
0046
0047 #if defined( BOOST_USE_WINDOWS_H )
0048
0049 BOOST_CONSTEXPR_OR_CONST UINT_ CP_ACP_ = CP_ACP;
0050 BOOST_CONSTEXPR_OR_CONST UINT_ CP_OEMCP_ = CP_OEMCP;
0051 BOOST_CONSTEXPR_OR_CONST UINT_ CP_MACCP_ = CP_MACCP;
0052 BOOST_CONSTEXPR_OR_CONST UINT_ CP_THREAD_ACP_ = CP_THREAD_ACP;
0053 BOOST_CONSTEXPR_OR_CONST UINT_ CP_SYMBOL_ = CP_SYMBOL;
0054 BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF7_ = CP_UTF7;
0055 BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF8_ = CP_UTF8;
0056
0057 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_PRECOMPOSED_ = MB_PRECOMPOSED;
0058 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_COMPOSITE_ = MB_COMPOSITE;
0059 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_USEGLYPHCHARS_ = MB_USEGLYPHCHARS;
0060 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_ERR_INVALID_CHARS_ = MB_ERR_INVALID_CHARS;
0061
0062 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_COMPOSITECHECK_ = WC_COMPOSITECHECK;
0063 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DISCARDNS_ = WC_DISCARDNS;
0064 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_SEPCHARS_ = WC_SEPCHARS;
0065 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DEFAULTCHAR_ = WC_DEFAULTCHAR;
0066 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
0067 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_NO_BEST_FIT_CHARS_ = WC_NO_BEST_FIT_CHARS;
0068 #endif
0069
0070 #else
0071
0072 BOOST_CONSTEXPR_OR_CONST UINT_ CP_ACP_ = 0u;
0073 BOOST_CONSTEXPR_OR_CONST UINT_ CP_OEMCP_ = 1u;
0074 BOOST_CONSTEXPR_OR_CONST UINT_ CP_MACCP_ = 2u;
0075 BOOST_CONSTEXPR_OR_CONST UINT_ CP_THREAD_ACP_ = 3u;
0076 BOOST_CONSTEXPR_OR_CONST UINT_ CP_SYMBOL_ = 42u;
0077 BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF7_ = 65000u;
0078 BOOST_CONSTEXPR_OR_CONST UINT_ CP_UTF8_ = 65001u;
0079
0080 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_PRECOMPOSED_ = 0x00000001;
0081 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_COMPOSITE_ = 0x00000002;
0082 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_USEGLYPHCHARS_ = 0x00000004;
0083 BOOST_CONSTEXPR_OR_CONST DWORD_ MB_ERR_INVALID_CHARS_ = 0x00000008;
0084
0085 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_COMPOSITECHECK_ = 0x00000200;
0086 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DISCARDNS_ = 0x00000010;
0087 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_SEPCHARS_ = 0x00000020;
0088 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_DEFAULTCHAR_ = 0x00000040;
0089 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN2K
0090 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_NO_BEST_FIT_CHARS_ = 0x00000400;
0091 #endif
0092
0093 #endif
0094
0095 #if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
0096
0097 BOOST_CONSTEXPR_OR_CONST DWORD_ WC_ERR_INVALID_CHARS_ = 0x00000080;
0098 #endif
0099
0100 using ::MultiByteToWideChar;
0101 using ::WideCharToMultiByte;
0102
0103 }
0104 }
0105
0106 #include <boost/winapi/detail/footer.hpp>
0107
0108 #endif