windows-pr 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. data/CHANGES +15 -0
  2. data/MANIFEST +65 -65
  3. data/README +149 -149
  4. data/Rakefile +37 -52
  5. data/doc/conversion_guide.txt +37 -37
  6. data/lib/windows/clipboard.rb +2 -0
  7. data/lib/windows/com.rb +2 -0
  8. data/lib/windows/com/accessibility.rb +12 -10
  9. data/lib/windows/com/automation.rb +149 -147
  10. data/lib/windows/com/variant.rb +24 -22
  11. data/lib/windows/console.rb +114 -112
  12. data/lib/windows/debug.rb +35 -33
  13. data/lib/windows/device_io.rb +248 -246
  14. data/lib/windows/directory.rb +2 -0
  15. data/lib/windows/error.rb +2 -0
  16. data/lib/windows/eventlog.rb +2 -0
  17. data/lib/windows/file.rb +264 -262
  18. data/lib/windows/file_mapping.rb +25 -23
  19. data/lib/windows/filesystem.rb +2 -0
  20. data/lib/windows/gdi/bitmap.rb +65 -63
  21. data/lib/windows/gdi/device_context.rb +46 -44
  22. data/lib/windows/gdi/metafile.rb +40 -38
  23. data/lib/windows/gdi/painting_drawing.rb +115 -113
  24. data/lib/windows/handle.rb +2 -0
  25. data/lib/windows/library.rb +2 -0
  26. data/lib/windows/limits.rb +34 -31
  27. data/lib/windows/mailslot.rb +2 -0
  28. data/lib/windows/memory.rb +2 -0
  29. data/lib/windows/msvcrt/buffer.rb +75 -73
  30. data/lib/windows/msvcrt/directory.rb +31 -29
  31. data/lib/windows/msvcrt/file.rb +47 -45
  32. data/lib/windows/msvcrt/io.rb +62 -60
  33. data/lib/windows/msvcrt/string.rb +2 -0
  34. data/lib/windows/msvcrt/time.rb +169 -167
  35. data/lib/windows/national.rb +580 -578
  36. data/lib/windows/network/management.rb +525 -523
  37. data/lib/windows/network/snmp.rb +92 -90
  38. data/lib/windows/network/winsock.rb +128 -126
  39. data/lib/windows/nio.rb +2 -0
  40. data/lib/windows/ntfs/winternl.rb +96 -82
  41. data/lib/windows/path.rb +143 -141
  42. data/lib/windows/pipe.rb +42 -40
  43. data/lib/windows/process.rb +2 -0
  44. data/lib/windows/registry.rb +171 -126
  45. data/lib/windows/security.rb +479 -477
  46. data/lib/windows/security/authentication.rb +32 -30
  47. data/lib/windows/service.rb +142 -140
  48. data/lib/windows/shell.rb +171 -169
  49. data/lib/windows/socket.rb +86 -0
  50. data/lib/windows/sound.rb +39 -37
  51. data/lib/windows/synchronize.rb +133 -131
  52. data/lib/windows/system_info.rb +4 -2
  53. data/lib/windows/thread.rb +2 -0
  54. data/lib/windows/time.rb +48 -46
  55. data/lib/windows/tool_helper.rb +36 -34
  56. data/lib/windows/unicode.rb +2 -0
  57. data/lib/windows/volume.rb +61 -59
  58. data/lib/windows/window.rb +81 -79
  59. data/lib/windows/window/classes.rb +59 -57
  60. data/lib/windows/window/dialog.rb +91 -89
  61. data/lib/windows/window/menu.rb +102 -100
  62. data/lib/windows/window/message.rb +297 -295
  63. data/lib/windows/window/properties.rb +20 -18
  64. data/lib/windows/window/timer.rb +19 -17
  65. data/lib/windows/wsa.rb +102 -0
  66. data/test/tc_clipboard.rb +41 -41
  67. data/test/tc_com.rb +32 -32
  68. data/test/tc_com_automation.rb +15 -15
  69. data/test/tc_console.rb +108 -108
  70. data/test/tc_debug.rb +48 -48
  71. data/test/tc_device_io.rb +29 -29
  72. data/test/tc_directory.rb +25 -25
  73. data/test/tc_error.rb +38 -50
  74. data/test/tc_eventlog.rb +58 -58
  75. data/test/tc_file.rb +67 -67
  76. data/test/tc_file_mapping.rb +38 -38
  77. data/test/tc_filesystem.rb +27 -27
  78. data/test/tc_gdi_bitmap.rb +25 -25
  79. data/test/tc_gdi_metafile.rb +23 -23
  80. data/test/tc_handle.rb +36 -36
  81. data/test/tc_library.rb +37 -37
  82. data/test/tc_limits.rb +34 -34
  83. data/test/tc_mailslot.rb +22 -22
  84. data/test/tc_memory.rb +44 -44
  85. data/test/tc_msvcrt_buffer.rb +59 -68
  86. data/test/tc_msvcrt_directory.rb +96 -98
  87. data/test/tc_msvcrt_file.rb +80 -80
  88. data/test/tc_msvcrt_io.rb +48 -48
  89. data/test/tc_msvcrt_string.rb +94 -93
  90. data/test/tc_msvcrt_time.rb +19 -29
  91. data/test/tc_national.rb +38 -38
  92. data/test/tc_network_management.rb +32 -32
  93. data/test/tc_network_snmp.rb +31 -31
  94. data/test/tc_network_winsock.rb +34 -34
  95. data/test/tc_nio.rb +32 -32
  96. data/test/tc_ntfs_winternl.rb +33 -18
  97. data/test/tc_path.rb +90 -90
  98. data/test/tc_pipe.rb +53 -53
  99. data/test/tc_process.rb +24 -24
  100. data/test/tc_registry.rb +29 -29
  101. data/test/tc_security.rb +104 -104
  102. data/test/tc_security_authentication.rb +34 -34
  103. data/test/tc_service.rb +57 -57
  104. data/test/tc_shell.rb +34 -34
  105. data/test/tc_socket.rb +20 -0
  106. data/test/tc_sound.rb +37 -37
  107. data/test/tc_synchronize.rb +75 -75
  108. data/test/tc_system_info.rb +33 -43
  109. data/test/tc_thread.rb +29 -29
  110. data/test/tc_time.rb +32 -32
  111. data/test/tc_tool_helper.rb +29 -29
  112. data/test/tc_unicode.rb +62 -62
  113. data/test/tc_volume.rb +47 -47
  114. data/test/tc_window.rb +45 -45
  115. data/test/tc_window_classes.rb +33 -33
  116. data/test/tc_window_dialog.rb +33 -33
  117. data/test/tc_window_menu.rb +29 -29
  118. data/test/tc_window_message.rb +33 -33
  119. data/test/tc_window_properties.rb +29 -29
  120. data/test/tc_window_timer.rb +29 -29
  121. data/test/tc_wsa.rb +19 -0
  122. data/windows-pr.gemspec +1 -1
  123. metadata +13 -7
@@ -7,6 +7,8 @@ module Windows
7
7
  API.auto_method = false # We need to handle 0 & nil explicitly
8
8
  API.auto_unicode = false
9
9
 
10
+ private
11
+
10
12
  Strchr = API.new('strchr', 'PI', 'P', MSVCRT_DLL)
11
13
  Strcmp = API.new('strcmp', 'PP', 'I', MSVCRT_DLL)
12
14
  Strcpy = API.new('strcpy', 'PL', 'L', MSVCRT_DLL)
@@ -1,167 +1,169 @@
1
- require 'windows/api'
2
-
3
- module Windows
4
- module MSVCRT
5
- module Time
6
- API.auto_constant = false # Avoid name clash with Ruby
7
- API.auto_method = false
8
- API.auto_unicode = false
9
-
10
- Asctime = API.new('asctime', 'P', 'P', MSVCRT_DLL)
11
- Clock = API.new('clock', 'V', 'L', MSVCRT_DLL)
12
- Ctime = API.new('ctime', 'P', 'P', 'msvcrt')
13
- Ctime64 = API.new('_ctime64', 'P', 'P', MSVCRT_DLL)
14
- Difftime = API.new('difftime', 'LL', 'L', 'msvcrt')
15
- Ftime = API.new('_ftime', 'P', 'L', 'msvcrt')
16
- Ftime64 = API.new('_ftime64', 'P', 'L', MSVCRT_DLL)
17
- Futime = API.new('_futime', 'IP', 'I', 'msvcrt')
18
- Futime64 = API.new('_futime64', 'IP', 'I', MSVCRT_DLL)
19
- Gmtime = API.new('gmtime', 'P', 'P', 'msvcrt')
20
- Gmtime64 = API.new('_gmtime64', 'P', 'P', MSVCRT_DLL)
21
- Localtime = API.new('localtime', 'P', 'P', 'msvcrt')
22
- Localtime64 = API.new('_localtime64', 'P', 'P', MSVCRT_DLL)
23
- Mktime = API.new('mktime', 'P', 'L', 'msvcrt')
24
- Mktime64 = API.new('_mktime64', 'P', 'L', MSVCRT_DLL)
25
- Strdate = API.new('_strdate', 'P', 'P', MSVCRT_DLL)
26
- Strftime = API.new('strftime', 'PLPP', 'L', MSVCRT_DLL)
27
- Strtime = API.new('_strtime', 'P', 'P', MSVCRT_DLL)
28
- WinTime = API.new('time', 'P', 'L', 'msvcrt') # Avoid conflict
29
- WinTime64 = API.new('_time64', 'P', 'L', MSVCRT_DLL) # Avoid conflict
30
- Tzset = API.new('_tzset', 'V', 'V', MSVCRT_DLL)
31
- Utime = API.new('_utime', 'PP', 'I', 'msvcrt')
32
- Utime64 = API.new('_utime64', 'PP', 'I', MSVCRT_DLL)
33
- Wasctime = API.new('_wasctime', 'P', 'P', MSVCRT_DLL)
34
- Wctime = API.new('_wctime', 'P', 'P', 'msvcrt')
35
- Wctime64 = API.new('_wctime64', 'P', 'P', MSVCRT_DLL)
36
- Wstrdate = API.new('_wstrdate', 'P', 'L', MSVCRT_DLL)
37
- Wcsftime = API.new('wcsftime', 'PLPP', 'L', MSVCRT_DLL)
38
- Wstrtime = API.new('_wstrtime', 'P', 'P', MSVCRT_DLL)
39
- Wutime = API.new('_wutime', 'PP', 'I', 'msvcrt')
40
- Wutime64 = API.new('_wutime64', 'PP', 'I', MSVCRT_DLL)
41
-
42
- def asctime(timeptr)
43
- Asctime.call(timeptr)
44
- end
45
-
46
- def clock
47
- Clock.call
48
- end
49
-
50
- def ctime(timer)
51
- Ctime.call(timer)
52
- end
53
-
54
- def ctime64(timer)
55
- Ctime64.call(timer)
56
- end
57
-
58
- def difftime(timer1, timer0)
59
- Difftime.call(timer1, timer0)
60
- end
61
-
62
- def ftime(timeptr)
63
- Ftime.call(timeptr)
64
- end
65
-
66
- def ftime64(timeptr)
67
- Ftime64.call(timeptr)
68
- end
69
-
70
- def futime(fd, filetime)
71
- Futime.call(fd, filetime)
72
- end
73
-
74
- def futime64(fd, filetime)
75
- Futime64.call(fd, filetime)
76
- end
77
-
78
- def gmtime(timer)
79
- Gmtime.call(timer)
80
- end
81
-
82
- def gmtime64(timer)
83
- Gmtime64.call(timer)
84
- end
85
-
86
- def localtime(timer)
87
- Localtime.call(timer)
88
- end
89
-
90
- def localtime64(timer)
91
- Localtime64.call(timer)
92
- end
93
-
94
- def mktime(timeptr)
95
- Mktime.call(timeptr)
96
- end
97
-
98
- def mktime64(timeptr)
99
- Mktime64.call(timeptr)
100
- end
101
-
102
- def strdate(datestr)
103
- Strdate.call(datestr)
104
- end
105
-
106
- def strftime(dest, maxsize, format, timeptr)
107
- Strftime.call(dest, maxsize, format, timeptr)
108
- end
109
-
110
- def strtime(timestr)
111
- Strtime.call(timestr)
112
- end
113
-
114
- def time(timer)
115
- WinTime.call(timer)
116
- end
117
-
118
- def time64(timer)
119
- WinTime64.call(timer)
120
- end
121
-
122
- def tzset
123
- Tzset.call
124
- end
125
-
126
- def utime(filename, times)
127
- Utime.call(filename, times)
128
- end
129
-
130
- def utime64(filename, times)
131
- Utime64.call(filename, times)
132
- end
133
-
134
- def wasctime(timeptr)
135
- Wasctime.call(timeptr)
136
- end
137
-
138
- def wcsftime(dest, maxsize, format, timeptr)
139
- Wcsftime.call(dest, maxsize, format, timeptr)
140
- end
141
-
142
- def wctime(timer)
143
- Wctime.call(timer)
144
- end
145
-
146
- def wctime64(timer)
147
- Wctime64.call(timer)
148
- end
149
-
150
- def wstrdate(datestr)
151
- Wstrdate.call(datestr)
152
- end
153
-
154
- def wstrtime(timestr)
155
- Wstrtime.call(timestr)
156
- end
157
-
158
- def wutime(filename, times)
159
- Wutime.call(filename, times)
160
- end
161
-
162
- def wutime64(filename, times)
163
- Wutime64.call(filename, times)
164
- end
165
- end
166
- end
167
- end
1
+ require 'windows/api'
2
+
3
+ module Windows
4
+ module MSVCRT
5
+ module Time
6
+ API.auto_constant = false # Avoid name clash with Ruby
7
+ API.auto_method = false
8
+ API.auto_unicode = false
9
+
10
+ private
11
+
12
+ Asctime = API.new('asctime', 'P', 'P', MSVCRT_DLL)
13
+ Clock = API.new('clock', 'V', 'L', MSVCRT_DLL)
14
+ Ctime = API.new('ctime', 'P', 'P', 'msvcrt')
15
+ Ctime64 = API.new('_ctime64', 'P', 'P', MSVCRT_DLL)
16
+ Difftime = API.new('difftime', 'LL', 'L', 'msvcrt')
17
+ Ftime = API.new('_ftime', 'P', 'L', 'msvcrt')
18
+ Ftime64 = API.new('_ftime64', 'P', 'L', MSVCRT_DLL)
19
+ Futime = API.new('_futime', 'IP', 'I', 'msvcrt')
20
+ Futime64 = API.new('_futime64', 'IP', 'I', MSVCRT_DLL)
21
+ Gmtime = API.new('gmtime', 'P', 'P', 'msvcrt')
22
+ Gmtime64 = API.new('_gmtime64', 'P', 'P', MSVCRT_DLL)
23
+ Localtime = API.new('localtime', 'P', 'P', 'msvcrt')
24
+ Localtime64 = API.new('_localtime64', 'P', 'P', MSVCRT_DLL)
25
+ Mktime = API.new('mktime', 'P', 'L', 'msvcrt')
26
+ Mktime64 = API.new('_mktime64', 'P', 'L', MSVCRT_DLL)
27
+ Strdate = API.new('_strdate', 'P', 'P', MSVCRT_DLL)
28
+ Strftime = API.new('strftime', 'PLPP', 'L', MSVCRT_DLL)
29
+ Strtime = API.new('_strtime', 'P', 'P', MSVCRT_DLL)
30
+ WinTime = API.new('time', 'P', 'L', 'msvcrt') # Avoid conflict
31
+ WinTime64 = API.new('_time64', 'P', 'L', MSVCRT_DLL) # Avoid conflict
32
+ Tzset = API.new('_tzset', 'V', 'V', MSVCRT_DLL)
33
+ Utime = API.new('_utime', 'PP', 'I', 'msvcrt')
34
+ Utime64 = API.new('_utime64', 'PP', 'I', MSVCRT_DLL)
35
+ Wasctime = API.new('_wasctime', 'P', 'P', MSVCRT_DLL)
36
+ Wctime = API.new('_wctime', 'P', 'P', 'msvcrt')
37
+ Wctime64 = API.new('_wctime64', 'P', 'P', MSVCRT_DLL)
38
+ Wstrdate = API.new('_wstrdate', 'P', 'L', MSVCRT_DLL)
39
+ Wcsftime = API.new('wcsftime', 'PLPP', 'L', MSVCRT_DLL)
40
+ Wstrtime = API.new('_wstrtime', 'P', 'P', MSVCRT_DLL)
41
+ Wutime = API.new('_wutime', 'PP', 'I', 'msvcrt')
42
+ Wutime64 = API.new('_wutime64', 'PP', 'I', MSVCRT_DLL)
43
+
44
+ def asctime(timeptr)
45
+ Asctime.call(timeptr)
46
+ end
47
+
48
+ def clock
49
+ Clock.call
50
+ end
51
+
52
+ def ctime(timer)
53
+ Ctime.call(timer)
54
+ end
55
+
56
+ def ctime64(timer)
57
+ Ctime64.call(timer)
58
+ end
59
+
60
+ def difftime(timer1, timer0)
61
+ Difftime.call(timer1, timer0)
62
+ end
63
+
64
+ def ftime(timeptr)
65
+ Ftime.call(timeptr)
66
+ end
67
+
68
+ def ftime64(timeptr)
69
+ Ftime64.call(timeptr)
70
+ end
71
+
72
+ def futime(fd, filetime)
73
+ Futime.call(fd, filetime)
74
+ end
75
+
76
+ def futime64(fd, filetime)
77
+ Futime64.call(fd, filetime)
78
+ end
79
+
80
+ def gmtime(timer)
81
+ Gmtime.call(timer)
82
+ end
83
+
84
+ def gmtime64(timer)
85
+ Gmtime64.call(timer)
86
+ end
87
+
88
+ def localtime(timer)
89
+ Localtime.call(timer)
90
+ end
91
+
92
+ def localtime64(timer)
93
+ Localtime64.call(timer)
94
+ end
95
+
96
+ def mktime(timeptr)
97
+ Mktime.call(timeptr)
98
+ end
99
+
100
+ def mktime64(timeptr)
101
+ Mktime64.call(timeptr)
102
+ end
103
+
104
+ def strdate(datestr)
105
+ Strdate.call(datestr)
106
+ end
107
+
108
+ def strftime(dest, maxsize, format, timeptr)
109
+ Strftime.call(dest, maxsize, format, timeptr)
110
+ end
111
+
112
+ def strtime(timestr)
113
+ Strtime.call(timestr)
114
+ end
115
+
116
+ def time(timer)
117
+ WinTime.call(timer)
118
+ end
119
+
120
+ def time64(timer)
121
+ WinTime64.call(timer)
122
+ end
123
+
124
+ def tzset
125
+ Tzset.call
126
+ end
127
+
128
+ def utime(filename, times)
129
+ Utime.call(filename, times)
130
+ end
131
+
132
+ def utime64(filename, times)
133
+ Utime64.call(filename, times)
134
+ end
135
+
136
+ def wasctime(timeptr)
137
+ Wasctime.call(timeptr)
138
+ end
139
+
140
+ def wcsftime(dest, maxsize, format, timeptr)
141
+ Wcsftime.call(dest, maxsize, format, timeptr)
142
+ end
143
+
144
+ def wctime(timer)
145
+ Wctime.call(timer)
146
+ end
147
+
148
+ def wctime64(timer)
149
+ Wctime64.call(timer)
150
+ end
151
+
152
+ def wstrdate(datestr)
153
+ Wstrdate.call(datestr)
154
+ end
155
+
156
+ def wstrtime(timestr)
157
+ Wstrtime.call(timestr)
158
+ end
159
+
160
+ def wutime(filename, times)
161
+ Wutime.call(filename, times)
162
+ end
163
+
164
+ def wutime64(filename, times)
165
+ Wutime64.call(filename, times)
166
+ end
167
+ end
168
+ end
169
+ end
@@ -1,578 +1,580 @@
1
- require 'windows/api'
2
-
3
- module Windows
4
- module National
5
- API.auto_namespace = 'Windows::National'
6
- API.auto_constant = true
7
- API.auto_method = true
8
- API.auto_unicode = true
9
-
10
- # Code page identifiers. Used for get_acp_string method.
11
- CODE_PAGE = {
12
- 037 => 'IBM EBCDIC = U.S./Canada',
13
- 437 => 'OEM = United States',
14
- 500 => 'IBM EBCDIC - International',
15
- 708 => 'Arabic - ASMO 708',
16
- 709 => 'Arabic - ASMO 449+, BCON V4',
17
- 710 => 'Arabic - Transparent Arabic',
18
- 720 => 'Arabic - Transparent ASMO',
19
- 737 => 'OEM - Greek (formerly 437G)',
20
- 775 => 'OEM - Baltic',
21
- 850 => 'OEM - Multilingual Latin I',
22
- 852 => 'OEM - Latin II',
23
- 855 => 'OEM - Cyrillic (primarily Russian)',
24
- 857 => 'OEM - Turkish',
25
- 858 => 'OEM - Multilingual Latin I + Euro symbol',
26
- 860 => 'OEM - Portuguese',
27
- 861 => 'OEM - Icelandic',
28
- 862 => 'OEM - Hebrew',
29
- 863 => 'OEM - Canadian-French',
30
- 864 => 'OEM - Arabic',
31
- 865 => 'OEM - Nordic',
32
- 866 => 'OEM - Russian',
33
- 869 => 'OEM - Modern Greek',
34
- 870 => 'IBM EBCDIC - Multilingual/ROECE (Latin-2)',
35
- 874 => 'ANSI/OEM - Thai (same as 28605, ISO 8859-15)',
36
- 875 => 'IBM EBCDIC - Modern Greek',
37
- 932 => 'ANSI/OEM - Japanese, Shift-JIS',
38
- 936 => 'ANSI/OEM - Simplified Chinese (PRC, Singapore)',
39
- 949 => 'ANSI/OEM - Korean (Unified Hangul Code)',
40
- 950 => 'ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)',
41
- 1026 => 'IBM EBCDIC - Turkish (Latin-5)',
42
- 1047 => 'IBM EBCDIC - Latin 1/Open System',
43
- 1140 => 'IBM EBCDIC - U.S./Canada (037 + Euro symbol)',
44
- 1141 => 'IBM EBCDIC - Germany (20273 + Euro symbol)',
45
- 1142 => 'IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)',
46
- 1143 => 'IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)',
47
- 1144 => 'IBM EBCDIC - Italy (20280 + Euro symbol)',
48
- 1145 => 'IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)',
49
- 1146 => 'IBM EBCDIC - United Kingdom (20285 + Euro symbol)',
50
- 1147 => 'IBM EBCDIC - France (20297 + Euro symbol)',
51
- 1148 => 'IBM EBCDIC - International (500 + Euro symbol)',
52
- 1149 => 'IBM EBCDIC - Icelandic (20871 + Euro symbol)',
53
- 1200 => 'Unicode UCS-2 Little-Endian (BMP of ISO 10646)',
54
- 1201 => 'Unicode UCS-2 Big-Endian',
55
- 1250 => 'ANSI - Central European',
56
- 1251 => 'ANSI - Cyrillic',
57
- 1252 => 'ANSI - Latin I',
58
- 1253 => 'ANSI - Greek',
59
- 1254 => 'ANSI - Turkish',
60
- 1255 => 'ANSI - Hebrew',
61
- 1256 => 'ANSI - Arabic',
62
- 1257 => 'ANSI - Baltic',
63
- 1258 => 'ANSI/OEM - Vietnamese',
64
- 1361 => 'Korean (Johab)',
65
- 10000 => 'MAC - Roman',
66
- 10001 => 'MAC - Japanese',
67
- 10002 => 'MAC - Traditional Chinese (Big5)',
68
- 10003 => 'MAC - Korean',
69
- 10004 => 'MAC - Arabic',
70
- 10005 => 'MAC - Hebrew',
71
- 10006 => 'MAC - Greek I',
72
- 10007 => 'MAC - Cyrillic',
73
- 10008 => 'MAC - Simplified Chinese (GB 2312)',
74
- 10010 => 'MAC - Romania',
75
- 10017 => 'MAC - Ukraine',
76
- 10021 => 'MAC - Thai',
77
- 10029 => 'MAC - Latin II',
78
- 10079 => 'MAC - Icelandic',
79
- 10081 => 'MAC - Turkish',
80
- 10082 => 'MAC - Croatia',
81
- 12000 => 'Unicode UCS-4 Little-Endian',
82
- 12001 => 'Unicode UCS-4 Big-Endian',
83
- 20000 => 'CNS - Taiwan',
84
- 20001 => 'TCA - Taiwan',
85
- 20002 => 'Eten - Taiwan',
86
- 20003 => 'IBM5550 - Taiwan',
87
- 20004 => 'TeleText - Taiwan',
88
- 20005 => 'Wang - Taiwan',
89
- 20105 => 'IA5 IRV International Alphabet No. 5 (7-bit)',
90
- 20106 => 'IA5 German (7-bit)',
91
- 20107 => 'IA5 Swedish (7-bit)',
92
- 20108 => 'IA5 Norwegian (7-bit)',
93
- 20127 => 'US-ASCII (7-bit)',
94
- 20261 => 'T.61',
95
- 20269 => 'ISO 6937 Non-Spacing Accent',
96
- 20273 => 'IBM EBCDIC - Germany',
97
- 20277 => 'IBM EBCDIC - Denmark/Norway',
98
- 20278 => 'IBM EBCDIC - Finland/Sweden',
99
- 20280 => 'IBM EBCDIC - Italy',
100
- 20284 => 'IBM EBCDIC - Latin America/Spain',
101
- 20285 => 'IBM EBCDIC - United Kingdom',
102
- 20290 => 'IBM EBCDIC - Japanese Katakana Extended',
103
- 20297 => 'IBM EBCDIC - France',
104
- 20420 => 'IBM EBCDIC - Arabic',
105
- 20423 => 'IBM EBCDIC - Greek',
106
- 20424 => 'IBM EBCDIC - Hebrew',
107
- 20833 => 'IBM EBCDIC - Korean Extended',
108
- 20838 => 'IBM EBCDIC - Thai',
109
- 20866 => 'Russian - KOI8-R',
110
- 20871 => 'IBM EBCDIC - Icelandic',
111
- 20880 => 'IBM EBCDIC - Cyrillic (Russian)',
112
- 20905 => 'IBM EBCDIC - Turkish',
113
- 20924 => 'IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)',
114
- 20932 => 'JIS X 0208-1990 & 0121-1990',
115
- 20936 => 'Simplified Chinese (GB2312)',
116
- 21025 => 'IBM EBCDIC - Cyrillic (Serbian, Bulgarian)',
117
- 21027 => '(deprecated)',
118
- 21866 => 'Ukrainian (KOI8-U)',
119
- 28591 => 'ISO 8859-1 Latin I',
120
- 28592 => 'ISO 8859-2 Central Europe',
121
- 28593 => 'ISO 8859-3 Latin 3',
122
- 28594 => 'ISO 8859-4 Baltic',
123
- 28595 => 'ISO 8859-5 Cyrillic',
124
- 28596 => 'ISO 8859-6 Arabic',
125
- 28597 => 'ISO 8859-7 Greek',
126
- 28598 => 'ISO 8859-8 Hebrew',
127
- 28599 => 'ISO 8859-9 Latin 5',
128
- 28605 => 'ISO 8859-15 Latin 9',
129
- 29001 => 'Europa 3',
130
- 38598 => 'ISO 8859-8 Hebrew',
131
- 50220 => 'ISO 2022 Japanese with no halfwidth Katakana',
132
- 50221 => 'ISO 2022 Japanese with halfwidth Katakana',
133
- 50222 => 'ISO 2022 Japanese JIS X 0201-1989',
134
- 50225 => 'ISO 2022 Korean',
135
- 50227 => 'ISO 2022 Simplified Chinese',
136
- 50229 => 'ISO 2022 Traditional Chinese',
137
- 50930 => 'Japanese (Katakana) Extended',
138
- 50931 => 'US/Canada and Japanese',
139
- 50933 => 'Korean Extended and Korean',
140
- 50935 => 'Simplified Chinese Extended and Simplified Chinese',
141
- 50936 => 'Simplified Chinese',
142
- 50937 => 'US/Canada and Traditional Chinese',
143
- 50939 => 'Japanese (Latin) Extended and Japanese',
144
- 51932 => 'EUC - Japanese',
145
- 51936 => 'EUC - Simplified Chinese',
146
- 51949 => 'EUC - Korean',
147
- 51950 => 'EUC - Traditional Chinese',
148
- 52936 => 'HZ-GB2312 Simplified Chinese',
149
- 54936 => 'Windows XP: GB18030 Simplified Chinese (4 Byte)',
150
- 57002 => 'ISCII Devanagari',
151
- 57003 => 'ISCII Bengali',
152
- 57004 => 'ISCII Tamil',
153
- 57005 => 'ISCII Telugu',
154
- 57006 => 'ISCII Assamese',
155
- 57007 => 'ISCII Oriya',
156
- 57008 => 'ISCII Kannada',
157
- 57009 => 'ISCII Malayalam',
158
- 57010 => 'ISCII Gujarati',
159
- 57011 => 'ISCII Punjabi',
160
- 65000 => 'Unicode UTF-7',
161
- 65001 => 'Unicode UTF-8'
162
- }
163
-
164
- LANG_NEUTRAL = 0x00
165
- LANG_INVARIANT = 0x7f
166
-
167
- LANG_AFRIKAANS = 0x36
168
- LANG_ALBANIAN = 0x1c
169
- LANG_ARABIC = 0x01
170
- LANG_ARMENIAN = 0x2b
171
- LANG_ASSAMESE = 0x4d
172
- LANG_AZERI = 0x2c
173
- LANG_BASQUE = 0x2d
174
- LANG_BELARUSIAN = 0x23
175
- LANG_BENGALI = 0x45
176
- LANG_BOSNIAN = 0x1a
177
- LANG_BULGARIAN = 0x02
178
- LANG_CATALAN = 0x03
179
- LANG_CHINESE = 0x04
180
- LANG_CROATIAN = 0x1a
181
- LANG_CZECH = 0x05
182
- LANG_DANISH = 0x06
183
- LANG_DIVEHI = 0x65
184
- LANG_DUTCH = 0x13
185
- LANG_ENGLISH = 0x09
186
- LANG_ESTONIAN = 0x25
187
- LANG_FAEROESE = 0x38
188
- LANG_FARSI = 0x29
189
- LANG_FINNISH = 0x0b
190
- LANG_FRENCH = 0x0c
191
- LANG_GALICIAN = 0x56
192
- LANG_GEORGIAN = 0x37
193
- LANG_GERMAN = 0x07
194
- LANG_GREEK = 0x08
195
- LANG_GUJARATI = 0x47
196
- LANG_HEBREW = 0x0d
197
- LANG_HINDI = 0x39
198
- LANG_HUNGARIAN = 0x0e
199
- LANG_ICELANDIC = 0x0f
200
- LANG_INDONESIAN = 0x21
201
- LANG_ITALIAN = 0x10
202
- LANG_JAPANESE = 0x11
203
- LANG_KANNADA = 0x4b
204
- LANG_KASHMIRI = 0x60
205
- LANG_KAZAK = 0x3f
206
- LANG_KONKANI = 0x57
207
- LANG_KOREAN = 0x12
208
- LANG_KYRGYZ = 0x40
209
- LANG_LATVIAN = 0x26
210
- LANG_LITHUANIAN = 0x27
211
- LANG_MACEDONIAN = 0x2f
212
- LANG_MALAY = 0x3e
213
- LANG_MALAYALAM = 0x4c
214
- LANG_MALTESE = 0x3a
215
- LANG_MANIPURI = 0x58
216
- LANG_MAORI = 0x81
217
- LANG_MARATHI = 0x4e
218
- LANG_MONGOLIAN = 0x50
219
- LANG_NEPALI = 0x61
220
- LANG_NORWEGIAN = 0x14
221
- LANG_ORIYA = 0x48
222
- LANG_POLISH = 0x15
223
- LANG_PORTUGUESE = 0x16
224
- LANG_PUNJABI = 0x46
225
- LANG_QUECHUA = 0x6b
226
- LANG_ROMANIAN = 0x18
227
- LANG_RUSSIAN = 0x19
228
- LANG_SAMI = 0x3b
229
- LANG_SANSKRIT = 0x4f
230
- LANG_SERBIAN = 0x1a
231
- LANG_SINDHI = 0x59
232
- LANG_SLOVAK = 0x1b
233
- LANG_SLOVENIAN = 0x24
234
- LANG_SOTHO = 0x6c
235
- LANG_SPANISH = 0x0a
236
- LANG_SWAHILI = 0x41
237
- LANG_SWEDISH = 0x1d
238
- LANG_SYRIAC = 0x5a
239
- LANG_TAMIL = 0x49
240
- LANG_TATAR = 0x44
241
- LANG_TELUGU = 0x4a
242
- LANG_THAI = 0x1e
243
- LANG_TSWANA = 0x32
244
- LANG_TURKISH = 0x1f
245
- LANG_UKRAINIAN = 0x22
246
- LANG_URDU = 0x20
247
- LANG_UZBEK = 0x43
248
- LANG_VIETNAMESE = 0x2a
249
- LANG_WELSH = 0x52
250
- LANG_XHOSA = 0x34
251
- LANG_ZULU = 0x35
252
-
253
- SUBLANG_NEUTRAL = 0x00 # language neutral
254
- SUBLANG_DEFAULT = 0x01 # user default
255
- SUBLANG_SYS_DEFAULT = 0x02 # system default
256
-
257
- SUBLANG_ARABIC_SAUDI_ARABIA = 0x01 # Arabic (Saudi Arabia)
258
- SUBLANG_ARABIC_IRAQ = 0x02 # Arabic (Iraq)
259
- SUBLANG_ARABIC_EGYPT = 0x03 # Arabic (Egypt)
260
- SUBLANG_ARABIC_LIBYA = 0x04 # Arabic (Libya)
261
- SUBLANG_ARABIC_ALGERIA = 0x05 # Arabic (Algeria)
262
- SUBLANG_ARABIC_MOROCCO = 0x06 # Arabic (Morocco)
263
- SUBLANG_ARABIC_TUNISIA = 0x07 # Arabic (Tunisia)
264
- SUBLANG_ARABIC_OMAN = 0x08 # Arabic (Oman)
265
- SUBLANG_ARABIC_YEMEN = 0x09 # Arabic (Yemen)
266
- SUBLANG_ARABIC_SYRIA = 0x0a # Arabic (Syria)
267
- SUBLANG_ARABIC_JORDAN = 0x0b # Arabic (Jordan)
268
- SUBLANG_ARABIC_LEBANON = 0x0c # Arabic (Lebanon)
269
- SUBLANG_ARABIC_KUWAIT = 0x0d # Arabic (Kuwait)
270
- SUBLANG_ARABIC_UAE = 0x0e # Arabic (U.A.E)
271
- SUBLANG_ARABIC_BAHRAIN = 0x0f # Arabic (Bahrain)
272
- SUBLANG_ARABIC_QATAR = 0x10 # Arabic (Qatar)
273
- SUBLANG_AZERI_LATIN = 0x01 # Azeri (Latin)
274
- SUBLANG_AZERI_CYRILLIC = 0x02 # Azeri (Cyrillic)
275
- SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05 # Bosnian (Bosnia and Herzegovina - Latin)
276
- SUBLANG_CHINESE_TRADITIONAL = 0x01 # Chinese (Taiwan)
277
- SUBLANG_CHINESE_SIMPLIFIED = 0x02 # Chinese (PR China)
278
- SUBLANG_CHINESE_HONGKONG = 0x03 # Chinese (Hong Kong S.A.R., P.R.C.)
279
- SUBLANG_CHINESE_SINGAPORE = 0x04 # Chinese (Singapore)
280
- SUBLANG_CHINESE_MACAU = 0x05 # Chinese (Macau S.A.R.)
281
- SUBLANG_CROATIAN_CROATIA = 0x01 # Croatian (Croatia)
282
- SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04 # Croatian (Bosnia and Herzegovina - Latin)
283
- SUBLANG_DUTCH = 0x01 # Dutch
284
- SUBLANG_DUTCH_BELGIAN = 0x02 # Dutch (Belgian)
285
- SUBLANG_ENGLISH_US = 0x01 # English (USA)
286
- SUBLANG_ENGLISH_UK = 0x02 # English (UK)
287
- SUBLANG_ENGLISH_AUS = 0x03 # English (Australian)
288
- SUBLANG_ENGLISH_CAN = 0x04 # English (Canadian)
289
- SUBLANG_ENGLISH_NZ = 0x05 # English (New Zealand)
290
- SUBLANG_ENGLISH_EIRE = 0x06 # English (Irish)
291
- SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07 # English (South Africa)
292
- SUBLANG_ENGLISH_JAMAICA = 0x08 # English (Jamaica)
293
- SUBLANG_ENGLISH_CARIBBEAN = 0x09 # English (Caribbean)
294
- SUBLANG_ENGLISH_BELIZE = 0x0a # English (Belize)
295
- SUBLANG_ENGLISH_TRINIDAD = 0x0b # English (Trinidad)
296
- SUBLANG_ENGLISH_ZIMBABWE = 0x0c # English (Zimbabwe)
297
- SUBLANG_ENGLISH_PHILIPPINES = 0x0d # English (Philippines)
298
- SUBLANG_FRENCH = 0x01 # French
299
- SUBLANG_FRENCH_BELGIAN = 0x02 # French (Belgian)
300
- SUBLANG_FRENCH_CANADIAN = 0x03 # French (Canadian)
301
- SUBLANG_FRENCH_SWISS = 0x04 # French (Swiss)
302
- SUBLANG_FRENCH_LUXEMBOURG = 0x05 # French (Luxembourg)
303
- SUBLANG_FRENCH_MONACO = 0x06 # French (Monaco)
304
- SUBLANG_GERMAN = 0x01 # German
305
- SUBLANG_GERMAN_SWISS = 0x02 # German (Swiss)
306
- SUBLANG_GERMAN_AUSTRIAN = 0x03 # German (Austrian)
307
- SUBLANG_GERMAN_LUXEMBOURG = 0x04 # German (Luxembourg)
308
- SUBLANG_GERMAN_LIECHTENSTEIN = 0x05 # German (Liechtenstein)
309
- SUBLANG_ITALIAN = 0x01 # Italian
310
- SUBLANG_ITALIAN_SWISS = 0x02 # Italian (Swiss)
311
- SUBLANG_KASHMIRI_SASIA = 0x02 # Kashmiri (South Asia)
312
- SUBLANG_KASHMIRI_INDIA = 0x02 # For app compatibility only
313
- SUBLANG_KOREAN = 0x01 # Korean (Extended Wansung)
314
- SUBLANG_LITHUANIAN = 0x01 # Lithuanian
315
- SUBLANG_MALAY_MALAYSIA = 0x01 # Malay (Malaysia)
316
- SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02 # Malay (Brunei Darussalam)
317
- SUBLANG_NEPALI_INDIA = 0x02 # Nepali (India)
318
- SUBLANG_NORWEGIAN_BOKMAL = 0x01 # Norwegian (Bokmal)
319
- SUBLANG_NORWEGIAN_NYNORSK = 0x02 # Norwegian (Nynorsk)
320
- SUBLANG_PORTUGUESE = 0x02 # Portuguese
321
- SUBLANG_PORTUGUESE_BRAZILIAN = 0x01 # Portuguese (Brazilian)
322
- SUBLANG_QUECHUA_BOLIVIA = 0x01 # Quechua (Bolivia)
323
- SUBLANG_QUECHUA_ECUADOR = 0x02 # Quechua (Ecuador)
324
- SUBLANG_QUECHUA_PERU = 0x03 # Quechua (Peru)
325
- SUBLANG_SAMI_NORTHERN_NORWAY = 0x01 # Northern Sami (Norway)
326
- SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02 # Northern Sami (Sweden)
327
- SUBLANG_SAMI_NORTHERN_FINLAND = 0x03 # Northern Sami (Finland)
328
- SUBLANG_SAMI_LULE_NORWAY = 0x04 # Lule Sami (Norway)
329
- SUBLANG_SAMI_LULE_SWEDEN = 0x05 # Lule Sami (Sweden)
330
- SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06 # Southern Sami (Norway)
331
- SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07 # Southern Sami (Sweden)
332
- SUBLANG_SAMI_SKOLT_FINLAND = 0x08 # Skolt Sami (Finland)
333
- SUBLANG_SAMI_INARI_FINLAND = 0x09 # Inari Sami (Finland)
334
- SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06 # Serbian (Bosnia and Herzegovina - Latin)
335
- SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07 # Serbian (Bosnia and Herzegovina - Cyrillic)
336
- SUBLANG_SERBIAN_LATIN = 0x02 # Serbian (Latin)
337
- SUBLANG_SERBIAN_CYRILLIC = 0x03 # Serbian (Cyrillic)
338
- SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01 # Northern Sotho (South Africa)
339
- SUBLANG_SPANISH = 0x01 # Spanish (Castilian)
340
- SUBLANG_SPANISH_MEXICAN = 0x02 # Spanish (Mexican)
341
- SUBLANG_SPANISH_MODERN = 0x03 # Spanish (Modern)
342
- SUBLANG_SPANISH_GUATEMALA = 0x04 # Spanish (Guatemala)
343
- SUBLANG_SPANISH_COSTA_RICA = 0x05 # Spanish (Costa Rica)
344
- SUBLANG_SPANISH_PANAMA = 0x06 # Spanish (Panama)
345
- SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07 # Spanish (Dominican Republic)
346
- SUBLANG_SPANISH_VENEZUELA = 0x08 # Spanish (Venezuela)
347
- SUBLANG_SPANISH_COLOMBIA = 0x09 # Spanish (Colombia)
348
- SUBLANG_SPANISH_PERU = 0x0a # Spanish (Peru)
349
- SUBLANG_SPANISH_ARGENTINA = 0x0b # Spanish (Argentina)
350
- SUBLANG_SPANISH_ECUADOR = 0x0c # Spanish (Ecuador)
351
- SUBLANG_SPANISH_CHILE = 0x0d # Spanish (Chile)
352
- SUBLANG_SPANISH_URUGUAY = 0x0e # Spanish (Uruguay)
353
- SUBLANG_SPANISH_PARAGUAY = 0x0f # Spanish (Paraguay)
354
- SUBLANG_SPANISH_BOLIVIA = 0x10 # Spanish (Bolivia)
355
- SUBLANG_SPANISH_EL_SALVADOR = 0x11 # Spanish (El Salvador)
356
- SUBLANG_SPANISH_HONDURAS = 0x12 # Spanish (Honduras)
357
- SUBLANG_SPANISH_NICARAGUA = 0x13 # Spanish (Nicaragua)
358
- SUBLANG_SPANISH_PUERTO_RICO = 0x14 # Spanish (Puerto Rico)
359
- SUBLANG_SWEDISH = 0x01 # Swedish
360
- SUBLANG_SWEDISH_FINLAND = 0x02 # Swedish (Finland)
361
- SUBLANG_URDU_PAKISTAN = 0x01 # Urdu (Pakistan)
362
- SUBLANG_URDU_INDIA = 0x02 # Urdu (India)
363
- SUBLANG_UZBEK_LATIN = 0x01 # Uzbek (Latin)
364
- SUBLANG_UZBEK_CYRILLIC = 0x02 # Uzbek (Cyrillic)
365
-
366
- LOCALE_NOUSEROVERRIDE = 0x80000000
367
- LOCALE_USE_CP_ACP = 0x40000000
368
- LOCALE_RETURN_NUMBER = 0x20000000
369
-
370
- LOCALE_ILANGUAGE = 0x00000001 # Language ID
371
- LOCALE_SLANGUAGE = 0x00000002 # Localized name of language
372
- LOCALE_SENGLANGUAGE = 0x00001001 # English name of language
373
- LOCALE_SABBREVLANGNAME = 0x00000003 # Abbreviated language name
374
- LOCALE_SNATIVELANGNAME = 0x00000004 # Native name of language
375
-
376
- LOCALE_ICOUNTRY = 0x00000005 # Country code
377
- LOCALE_SCOUNTRY = 0x00000006 # Localized name of country
378
- LOCALE_SENGCOUNTRY = 0x00001002 # English name of country
379
- LOCALE_SABBREVCTRYNAME = 0x00000007 # Abbreviated country name
380
- LOCALE_SNATIVECTRYNAME = 0x00000008 # Native name of country
381
-
382
- LOCALE_IDEFAULTLANGUAGE = 0x00000009 # default language id
383
- LOCALE_IDEFAULTCOUNTRY = 0x0000000A # default country code
384
- LOCALE_IDEFAULTCODEPAGE = 0x0000000B # default oem code page
385
- LOCALE_IDEFAULTANSICODEPAGE = 0x00001004 # default ansi code page
386
- LOCALE_IDEFAULTMACCODEPAGE = 0x00001011 # default mac code page
387
-
388
- LOCALE_SLIST = 0x0000000C # list item separator
389
- LOCALE_IMEASURE = 0x0000000D # 0 = metric, 1 = US
390
-
391
- LOCALE_SDECIMAL = 0x0000000E # decimal separator
392
- LOCALE_STHOUSAND = 0x0000000F # thousand separator
393
- LOCALE_SGROUPING = 0x00000010 # digit grouping
394
- LOCALE_IDIGITS = 0x00000011 # number of fractional digits
395
- LOCALE_ILZERO = 0x00000012 # leading zeros for decimal
396
- LOCALE_INEGNUMBER = 0x00001010 # negative number mode
397
- LOCALE_SNATIVEDIGITS = 0x00000013 # native ascii 0-9
398
-
399
- LOCALE_SCURRENCY = 0x00000014 # local monetary symbol
400
- LOCALE_SINTLSYMBOL = 0x00000015 # intl monetary symbol
401
- LOCALE_SMONDECIMALSEP = 0x00000016 # monetary decimal separator
402
- LOCALE_SMONTHOUSANDSEP = 0x00000017 # monetary thousand separator
403
- LOCALE_SMONGROUPING = 0x00000018 # monetary grouping
404
- LOCALE_ICURRDIGITS = 0x00000019 # # local monetary digits
405
- LOCALE_IINTLCURRDIGITS = 0x0000001A # # intl monetary digits
406
- LOCALE_ICURRENCY = 0x0000001B # positive currency mode
407
- LOCALE_INEGCURR = 0x0000001C # negative currency mode
408
-
409
- LOCALE_SDATE = 0x0000001D # date separator
410
- LOCALE_STIME = 0x0000001E # time separator
411
- LOCALE_SSHORTDATE = 0x0000001F # short date format string
412
- LOCALE_SLONGDATE = 0x00000020 # long date format string
413
- LOCALE_STIMEFORMAT = 0x00001003 # time format string
414
- LOCALE_IDATE = 0x00000021 # short date format ordering
415
- LOCALE_ILDATE = 0x00000022 # long date format ordering
416
- LOCALE_ITIME = 0x00000023 # time format specifier
417
- LOCALE_ITIMEMARKPOSN = 0x00001005 # time marker position
418
- LOCALE_ICENTURY = 0x00000024 # century format specifier (short date)
419
- LOCALE_ITLZERO = 0x00000025 # leading zeros in time field
420
- LOCALE_IDAYLZERO = 0x00000026 # leading zeros in day field (short date)
421
- LOCALE_IMONLZERO = 0x00000027 # leading zeros in month field (short date)
422
- LOCALE_S1159 = 0x00000028 # AM designator
423
- LOCALE_S2359 = 0x00000029 # PM designator
424
-
425
- LOCALE_ICALENDARTYPE = 0x00001009 # type of calendar specifier
426
- LOCALE_IOPTIONALCALENDAR = 0x0000100B # additional calendar types specifier
427
- LOCALE_IFIRSTDAYOFWEEK = 0x0000100C # first day of week specifier
428
- LOCALE_IFIRSTWEEKOFYEAR = 0x0000100D # first week of year specifier
429
-
430
- LOCALE_SDAYNAME1 = 0x0000002A # long name for Monday
431
- LOCALE_SDAYNAME2 = 0x0000002B # long name for Tuesday
432
- LOCALE_SDAYNAME3 = 0x0000002C # long name for Wednesday
433
- LOCALE_SDAYNAME4 = 0x0000002D # long name for Thursday
434
- LOCALE_SDAYNAME5 = 0x0000002E # long name for Friday
435
- LOCALE_SDAYNAME6 = 0x0000002F # long name for Saturday
436
- LOCALE_SDAYNAME7 = 0x00000030 # long name for Sunday
437
- LOCALE_SABBREVDAYNAME1 = 0x00000031 # abbreviated name for Monday
438
- LOCALE_SABBREVDAYNAME2 = 0x00000032 # abbreviated name for Tuesday
439
- LOCALE_SABBREVDAYNAME3 = 0x00000033 # abbreviated name for Wednesday
440
- LOCALE_SABBREVDAYNAME4 = 0x00000034 # abbreviated name for Thursday
441
- LOCALE_SABBREVDAYNAME5 = 0x00000035 # abbreviated name for Friday
442
- LOCALE_SABBREVDAYNAME6 = 0x00000036 # abbreviated name for Saturday
443
- LOCALE_SABBREVDAYNAME7 = 0x00000037 # abbreviated name for Sunday
444
- LOCALE_SMONTHNAME1 = 0x00000038 # long name for January
445
- LOCALE_SMONTHNAME2 = 0x00000039 # long name for February
446
- LOCALE_SMONTHNAME3 = 0x0000003A # long name for March
447
- LOCALE_SMONTHNAME4 = 0x0000003B # long name for April
448
- LOCALE_SMONTHNAME5 = 0x0000003C # long name for May
449
- LOCALE_SMONTHNAME6 = 0x0000003D # long name for June
450
- LOCALE_SMONTHNAME7 = 0x0000003E # long name for July
451
- LOCALE_SMONTHNAME8 = 0x0000003F # long name for August
452
- LOCALE_SMONTHNAME9 = 0x00000040 # long name for September
453
- LOCALE_SMONTHNAME10 = 0x00000041 # long name for October
454
- LOCALE_SMONTHNAME11 = 0x00000042 # long name for November
455
- LOCALE_SMONTHNAME12 = 0x00000043 # long name for December
456
- LOCALE_SMONTHNAME13 = 0x0000100E # long name for 13th month (if exists)
457
- LOCALE_SABBREVMONTHNAME1 = 0x00000044 # abbreviated name for January
458
- LOCALE_SABBREVMONTHNAME2 = 0x00000045 # abbreviated name for February
459
- LOCALE_SABBREVMONTHNAME3 = 0x00000046 # abbreviated name for March
460
- LOCALE_SABBREVMONTHNAME4 = 0x00000047 # abbreviated name for April
461
- LOCALE_SABBREVMONTHNAME5 = 0x00000048 # abbreviated name for May
462
- LOCALE_SABBREVMONTHNAME6 = 0x00000049 # abbreviated name for June
463
- LOCALE_SABBREVMONTHNAME7 = 0x0000004A # abbreviated name for July
464
- LOCALE_SABBREVMONTHNAME8 = 0x0000004B # abbreviated name for August
465
- LOCALE_SABBREVMONTHNAME9 = 0x0000004C # abbreviated name for September
466
- LOCALE_SABBREVMONTHNAME10 = 0x0000004D # abbreviated name for October
467
- LOCALE_SABBREVMONTHNAME11 = 0x0000004E # abbreviated name for November
468
- LOCALE_SABBREVMONTHNAME12 = 0x0000004F # abbreviated name for December
469
- LOCALE_SABBREVMONTHNAME13 = 0x0000100F # abbreviated name for 13th month (if exists)
470
-
471
- LOCALE_SPOSITIVESIGN = 0x00000050 # positive sign
472
- LOCALE_SNEGATIVESIGN = 0x00000051 # negative sign
473
- LOCALE_IPOSSIGNPOSN = 0x00000052 # positive sign position
474
- LOCALE_INEGSIGNPOSN = 0x00000053 # negative sign position
475
- LOCALE_IPOSSYMPRECEDES = 0x00000054 # mon sym precedes pos amt
476
- LOCALE_IPOSSEPBYSPACE = 0x00000055 # mon sym sep by space from pos amt
477
- LOCALE_INEGSYMPRECEDES = 0x00000056 # mon sym precedes neg amt
478
- LOCALE_INEGSEPBYSPACE = 0x00000057 # mon sym sep by space from neg amt
479
-
480
- LOCALE_FONTSIGNATURE = 0x00000058 # font signature
481
- LOCALE_SISO639LANGNAME = 0x00000059 # ISO abbreviated language name
482
- LOCALE_SISO3166CTRYNAME = 0x0000005A # ISO abbreviated country name
483
-
484
- LOCALE_IDEFAULTEBCDICCODEPAGE = 0x00001012 # default ebcdic code page
485
- LOCALE_IPAPERSIZE = 0x0000100A # 1 = letter, 5 = legal, 8 = a3, 9 = a4
486
- LOCALE_SENGCURRNAME = 0x00001007 # english name of currency
487
- LOCALE_SNATIVECURRNAME = 0x00001008 # native name of currency
488
- LOCALE_SYEARMONTH = 0x00001006 # year month format string
489
- LOCALE_SSORTNAME = 0x00001013 # sort name
490
- LOCALE_IDIGITSUBSTITUTION = 0x00001014 # 0 = context, 1 = none, 2 = national
491
-
492
- TIME_NOMINUTESORSECONDS = 0x00000001 # do not use minutes or seconds
493
- TIME_NOSECONDS = 0x00000002 # do not use seconds
494
- TIME_NOTIMEMARKER = 0x00000004 # do not use time marker
495
- TIME_FORCE24HOURFORMAT = 0x00000008 # always use 24 hour format
496
-
497
- DATE_SHORTDATE = 0x00000001 # use short date picture
498
- DATE_LONGDATE = 0x00000002 # use long date picture
499
- DATE_USE_ALT_CALENDAR = 0x00000004 # use alternate calendar (if any)
500
-
501
- DATE_YEARMONTH = 0x00000008 # use year month picture
502
- DATE_LTRREADING = 0x00000010 # add marks for left to right reading order layout
503
- DATE_RTLREADING = 0x00000020 # add marks for right to left reading order layout
504
-
505
- SORT_DEFAULT = 0x0 # sorting default
506
-
507
- SORT_JAPANESE_XJIS = 0x0 # Japanese XJIS order
508
- SORT_JAPANESE_UNICODE = 0x1 # Japanese Unicode order
509
-
510
- SORT_CHINESE_BIG5 = 0x0 # Chinese BIG5 order
511
- SORT_CHINESE_PRCP = 0x0 # PRC Chinese Phonetic order
512
- SORT_CHINESE_UNICODE = 0x1 # Chinese Unicode order
513
- SORT_CHINESE_PRC = 0x2 # PRC Chinese Stroke Count order
514
- SORT_CHINESE_BOPOMOFO = 0x3 # Traditional Chinese Bopomofo order
515
-
516
- SORT_KOREAN_KSC = 0x0 # Korean KSC order
517
- SORT_KOREAN_UNICODE = 0x1 # Korean Unicode order
518
-
519
- SORT_GERMAN_PHONE_BOOK = 0x1 # German Phone Book order
520
-
521
- SORT_HUNGARIAN_DEFAULT = 0x0 # Hungarian Default order
522
- SORT_HUNGARIAN_TECHNICAL = 0x1 # Hungarian Technical order
523
-
524
- SORT_GEORGIAN_TRADITIONAL = 0x0 # Georgian Traditional order
525
- SORT_GEORGIAN_MODERN = 0x1 # Georgian Modern order
526
-
527
- LANG_SYSTEM_DEFAULT = 2048
528
- LANG_USER_DEFAULT = 1024
529
- LOCALE_SYSTEM_DEFAULT = 2048
530
- LOCALE_USER_DEFAULT = 1024
531
- LOCALE_INVARIANT = 8323072
532
-
533
- API.new('CompareString', 'LLPIPI', 'I')
534
- API.new('EnumDateFormats', 'KLL', 'B')
535
- API.new('EnumDateFormatsEx', 'KLL', 'B')
536
- API.new('EnumSystemCodePages', 'KL', 'L')
537
- API.new('EnumSystemLocales', 'KL', 'L')
538
- API.new('EnumTimeFormats', 'KLL', 'B')
539
- API.new('GetACP', 'V', 'I')
540
- API.new('GetCPInfo', 'LP', 'B')
541
- API.new('GetCPInfoEx', 'LLP', 'B')
542
- API.new('GetCurrencyFormat', 'LLPPPI', 'I')
543
- API.new('GetDateFormat', 'LLPPPI', 'I')
544
- API.new('GetLocaleInfo', 'LLPL', 'I')
545
- API.new('GetSystemDefaultLangID', 'V', 'L')
546
- API.new('GetSystemDefaultLCID', 'V', 'L')
547
- API.new('GetUserDefaultLangID', 'V', 'L')
548
- API.new('GetUserDefaultLCID', 'V', 'L')
549
-
550
- begin
551
- API.new('AdjustCalendarDate', 'PLP', 'B')
552
- API.new('EnumTimeFormatsEx', 'KSLP', 'B')
553
- API.new('GetCurrencyFormatEx', 'PLPPPI', 'I')
554
- API.new('GetDateFormatEx', 'SLPSPIS', 'I')
555
- rescue Win32::API::LoadLibraryError
556
- # Windows Vista or later
557
- end
558
-
559
- # Convenience method for converting the results of the GetACP()
560
- # function to a human readable string.
561
- #
562
- def get_acp_string
563
- CODE_PAGE[GetACP.call]
564
- end
565
-
566
- # Equivalent of the MAKELCID macro in WinNT.h
567
- #
568
- def MAKELCID(srtid, lgid)
569
- srtid << 16 | lgid
570
- end
571
-
572
- # Equivalent of the MAKELANGID macro in WinNT.h
573
- #
574
- def MAKELANGID(x, s)
575
- s << 10 | x
576
- end
577
- end
578
- end
1
+ require 'windows/api'
2
+
3
+ module Windows
4
+ module National
5
+ API.auto_namespace = 'Windows::National'
6
+ API.auto_constant = true
7
+ API.auto_method = true
8
+ API.auto_unicode = true
9
+
10
+ private
11
+
12
+ # Code page identifiers. Used for get_acp_string method.
13
+ CODE_PAGE = {
14
+ 037 => 'IBM EBCDIC = U.S./Canada',
15
+ 437 => 'OEM = United States',
16
+ 500 => 'IBM EBCDIC - International',
17
+ 708 => 'Arabic - ASMO 708',
18
+ 709 => 'Arabic - ASMO 449+, BCON V4',
19
+ 710 => 'Arabic - Transparent Arabic',
20
+ 720 => 'Arabic - Transparent ASMO',
21
+ 737 => 'OEM - Greek (formerly 437G)',
22
+ 775 => 'OEM - Baltic',
23
+ 850 => 'OEM - Multilingual Latin I',
24
+ 852 => 'OEM - Latin II',
25
+ 855 => 'OEM - Cyrillic (primarily Russian)',
26
+ 857 => 'OEM - Turkish',
27
+ 858 => 'OEM - Multilingual Latin I + Euro symbol',
28
+ 860 => 'OEM - Portuguese',
29
+ 861 => 'OEM - Icelandic',
30
+ 862 => 'OEM - Hebrew',
31
+ 863 => 'OEM - Canadian-French',
32
+ 864 => 'OEM - Arabic',
33
+ 865 => 'OEM - Nordic',
34
+ 866 => 'OEM - Russian',
35
+ 869 => 'OEM - Modern Greek',
36
+ 870 => 'IBM EBCDIC - Multilingual/ROECE (Latin-2)',
37
+ 874 => 'ANSI/OEM - Thai (same as 28605, ISO 8859-15)',
38
+ 875 => 'IBM EBCDIC - Modern Greek',
39
+ 932 => 'ANSI/OEM - Japanese, Shift-JIS',
40
+ 936 => 'ANSI/OEM - Simplified Chinese (PRC, Singapore)',
41
+ 949 => 'ANSI/OEM - Korean (Unified Hangul Code)',
42
+ 950 => 'ANSI/OEM - Traditional Chinese (Taiwan; Hong Kong SAR, PRC)',
43
+ 1026 => 'IBM EBCDIC - Turkish (Latin-5)',
44
+ 1047 => 'IBM EBCDIC - Latin 1/Open System',
45
+ 1140 => 'IBM EBCDIC - U.S./Canada (037 + Euro symbol)',
46
+ 1141 => 'IBM EBCDIC - Germany (20273 + Euro symbol)',
47
+ 1142 => 'IBM EBCDIC - Denmark/Norway (20277 + Euro symbol)',
48
+ 1143 => 'IBM EBCDIC - Finland/Sweden (20278 + Euro symbol)',
49
+ 1144 => 'IBM EBCDIC - Italy (20280 + Euro symbol)',
50
+ 1145 => 'IBM EBCDIC - Latin America/Spain (20284 + Euro symbol)',
51
+ 1146 => 'IBM EBCDIC - United Kingdom (20285 + Euro symbol)',
52
+ 1147 => 'IBM EBCDIC - France (20297 + Euro symbol)',
53
+ 1148 => 'IBM EBCDIC - International (500 + Euro symbol)',
54
+ 1149 => 'IBM EBCDIC - Icelandic (20871 + Euro symbol)',
55
+ 1200 => 'Unicode UCS-2 Little-Endian (BMP of ISO 10646)',
56
+ 1201 => 'Unicode UCS-2 Big-Endian',
57
+ 1250 => 'ANSI - Central European',
58
+ 1251 => 'ANSI - Cyrillic',
59
+ 1252 => 'ANSI - Latin I',
60
+ 1253 => 'ANSI - Greek',
61
+ 1254 => 'ANSI - Turkish',
62
+ 1255 => 'ANSI - Hebrew',
63
+ 1256 => 'ANSI - Arabic',
64
+ 1257 => 'ANSI - Baltic',
65
+ 1258 => 'ANSI/OEM - Vietnamese',
66
+ 1361 => 'Korean (Johab)',
67
+ 10000 => 'MAC - Roman',
68
+ 10001 => 'MAC - Japanese',
69
+ 10002 => 'MAC - Traditional Chinese (Big5)',
70
+ 10003 => 'MAC - Korean',
71
+ 10004 => 'MAC - Arabic',
72
+ 10005 => 'MAC - Hebrew',
73
+ 10006 => 'MAC - Greek I',
74
+ 10007 => 'MAC - Cyrillic',
75
+ 10008 => 'MAC - Simplified Chinese (GB 2312)',
76
+ 10010 => 'MAC - Romania',
77
+ 10017 => 'MAC - Ukraine',
78
+ 10021 => 'MAC - Thai',
79
+ 10029 => 'MAC - Latin II',
80
+ 10079 => 'MAC - Icelandic',
81
+ 10081 => 'MAC - Turkish',
82
+ 10082 => 'MAC - Croatia',
83
+ 12000 => 'Unicode UCS-4 Little-Endian',
84
+ 12001 => 'Unicode UCS-4 Big-Endian',
85
+ 20000 => 'CNS - Taiwan',
86
+ 20001 => 'TCA - Taiwan',
87
+ 20002 => 'Eten - Taiwan',
88
+ 20003 => 'IBM5550 - Taiwan',
89
+ 20004 => 'TeleText - Taiwan',
90
+ 20005 => 'Wang - Taiwan',
91
+ 20105 => 'IA5 IRV International Alphabet No. 5 (7-bit)',
92
+ 20106 => 'IA5 German (7-bit)',
93
+ 20107 => 'IA5 Swedish (7-bit)',
94
+ 20108 => 'IA5 Norwegian (7-bit)',
95
+ 20127 => 'US-ASCII (7-bit)',
96
+ 20261 => 'T.61',
97
+ 20269 => 'ISO 6937 Non-Spacing Accent',
98
+ 20273 => 'IBM EBCDIC - Germany',
99
+ 20277 => 'IBM EBCDIC - Denmark/Norway',
100
+ 20278 => 'IBM EBCDIC - Finland/Sweden',
101
+ 20280 => 'IBM EBCDIC - Italy',
102
+ 20284 => 'IBM EBCDIC - Latin America/Spain',
103
+ 20285 => 'IBM EBCDIC - United Kingdom',
104
+ 20290 => 'IBM EBCDIC - Japanese Katakana Extended',
105
+ 20297 => 'IBM EBCDIC - France',
106
+ 20420 => 'IBM EBCDIC - Arabic',
107
+ 20423 => 'IBM EBCDIC - Greek',
108
+ 20424 => 'IBM EBCDIC - Hebrew',
109
+ 20833 => 'IBM EBCDIC - Korean Extended',
110
+ 20838 => 'IBM EBCDIC - Thai',
111
+ 20866 => 'Russian - KOI8-R',
112
+ 20871 => 'IBM EBCDIC - Icelandic',
113
+ 20880 => 'IBM EBCDIC - Cyrillic (Russian)',
114
+ 20905 => 'IBM EBCDIC - Turkish',
115
+ 20924 => 'IBM EBCDIC - Latin-1/Open System (1047 + Euro symbol)',
116
+ 20932 => 'JIS X 0208-1990 & 0121-1990',
117
+ 20936 => 'Simplified Chinese (GB2312)',
118
+ 21025 => 'IBM EBCDIC - Cyrillic (Serbian, Bulgarian)',
119
+ 21027 => '(deprecated)',
120
+ 21866 => 'Ukrainian (KOI8-U)',
121
+ 28591 => 'ISO 8859-1 Latin I',
122
+ 28592 => 'ISO 8859-2 Central Europe',
123
+ 28593 => 'ISO 8859-3 Latin 3',
124
+ 28594 => 'ISO 8859-4 Baltic',
125
+ 28595 => 'ISO 8859-5 Cyrillic',
126
+ 28596 => 'ISO 8859-6 Arabic',
127
+ 28597 => 'ISO 8859-7 Greek',
128
+ 28598 => 'ISO 8859-8 Hebrew',
129
+ 28599 => 'ISO 8859-9 Latin 5',
130
+ 28605 => 'ISO 8859-15 Latin 9',
131
+ 29001 => 'Europa 3',
132
+ 38598 => 'ISO 8859-8 Hebrew',
133
+ 50220 => 'ISO 2022 Japanese with no halfwidth Katakana',
134
+ 50221 => 'ISO 2022 Japanese with halfwidth Katakana',
135
+ 50222 => 'ISO 2022 Japanese JIS X 0201-1989',
136
+ 50225 => 'ISO 2022 Korean',
137
+ 50227 => 'ISO 2022 Simplified Chinese',
138
+ 50229 => 'ISO 2022 Traditional Chinese',
139
+ 50930 => 'Japanese (Katakana) Extended',
140
+ 50931 => 'US/Canada and Japanese',
141
+ 50933 => 'Korean Extended and Korean',
142
+ 50935 => 'Simplified Chinese Extended and Simplified Chinese',
143
+ 50936 => 'Simplified Chinese',
144
+ 50937 => 'US/Canada and Traditional Chinese',
145
+ 50939 => 'Japanese (Latin) Extended and Japanese',
146
+ 51932 => 'EUC - Japanese',
147
+ 51936 => 'EUC - Simplified Chinese',
148
+ 51949 => 'EUC - Korean',
149
+ 51950 => 'EUC - Traditional Chinese',
150
+ 52936 => 'HZ-GB2312 Simplified Chinese',
151
+ 54936 => 'Windows XP: GB18030 Simplified Chinese (4 Byte)',
152
+ 57002 => 'ISCII Devanagari',
153
+ 57003 => 'ISCII Bengali',
154
+ 57004 => 'ISCII Tamil',
155
+ 57005 => 'ISCII Telugu',
156
+ 57006 => 'ISCII Assamese',
157
+ 57007 => 'ISCII Oriya',
158
+ 57008 => 'ISCII Kannada',
159
+ 57009 => 'ISCII Malayalam',
160
+ 57010 => 'ISCII Gujarati',
161
+ 57011 => 'ISCII Punjabi',
162
+ 65000 => 'Unicode UTF-7',
163
+ 65001 => 'Unicode UTF-8'
164
+ }
165
+
166
+ LANG_NEUTRAL = 0x00
167
+ LANG_INVARIANT = 0x7f
168
+
169
+ LANG_AFRIKAANS = 0x36
170
+ LANG_ALBANIAN = 0x1c
171
+ LANG_ARABIC = 0x01
172
+ LANG_ARMENIAN = 0x2b
173
+ LANG_ASSAMESE = 0x4d
174
+ LANG_AZERI = 0x2c
175
+ LANG_BASQUE = 0x2d
176
+ LANG_BELARUSIAN = 0x23
177
+ LANG_BENGALI = 0x45
178
+ LANG_BOSNIAN = 0x1a
179
+ LANG_BULGARIAN = 0x02
180
+ LANG_CATALAN = 0x03
181
+ LANG_CHINESE = 0x04
182
+ LANG_CROATIAN = 0x1a
183
+ LANG_CZECH = 0x05
184
+ LANG_DANISH = 0x06
185
+ LANG_DIVEHI = 0x65
186
+ LANG_DUTCH = 0x13
187
+ LANG_ENGLISH = 0x09
188
+ LANG_ESTONIAN = 0x25
189
+ LANG_FAEROESE = 0x38
190
+ LANG_FARSI = 0x29
191
+ LANG_FINNISH = 0x0b
192
+ LANG_FRENCH = 0x0c
193
+ LANG_GALICIAN = 0x56
194
+ LANG_GEORGIAN = 0x37
195
+ LANG_GERMAN = 0x07
196
+ LANG_GREEK = 0x08
197
+ LANG_GUJARATI = 0x47
198
+ LANG_HEBREW = 0x0d
199
+ LANG_HINDI = 0x39
200
+ LANG_HUNGARIAN = 0x0e
201
+ LANG_ICELANDIC = 0x0f
202
+ LANG_INDONESIAN = 0x21
203
+ LANG_ITALIAN = 0x10
204
+ LANG_JAPANESE = 0x11
205
+ LANG_KANNADA = 0x4b
206
+ LANG_KASHMIRI = 0x60
207
+ LANG_KAZAK = 0x3f
208
+ LANG_KONKANI = 0x57
209
+ LANG_KOREAN = 0x12
210
+ LANG_KYRGYZ = 0x40
211
+ LANG_LATVIAN = 0x26
212
+ LANG_LITHUANIAN = 0x27
213
+ LANG_MACEDONIAN = 0x2f
214
+ LANG_MALAY = 0x3e
215
+ LANG_MALAYALAM = 0x4c
216
+ LANG_MALTESE = 0x3a
217
+ LANG_MANIPURI = 0x58
218
+ LANG_MAORI = 0x81
219
+ LANG_MARATHI = 0x4e
220
+ LANG_MONGOLIAN = 0x50
221
+ LANG_NEPALI = 0x61
222
+ LANG_NORWEGIAN = 0x14
223
+ LANG_ORIYA = 0x48
224
+ LANG_POLISH = 0x15
225
+ LANG_PORTUGUESE = 0x16
226
+ LANG_PUNJABI = 0x46
227
+ LANG_QUECHUA = 0x6b
228
+ LANG_ROMANIAN = 0x18
229
+ LANG_RUSSIAN = 0x19
230
+ LANG_SAMI = 0x3b
231
+ LANG_SANSKRIT = 0x4f
232
+ LANG_SERBIAN = 0x1a
233
+ LANG_SINDHI = 0x59
234
+ LANG_SLOVAK = 0x1b
235
+ LANG_SLOVENIAN = 0x24
236
+ LANG_SOTHO = 0x6c
237
+ LANG_SPANISH = 0x0a
238
+ LANG_SWAHILI = 0x41
239
+ LANG_SWEDISH = 0x1d
240
+ LANG_SYRIAC = 0x5a
241
+ LANG_TAMIL = 0x49
242
+ LANG_TATAR = 0x44
243
+ LANG_TELUGU = 0x4a
244
+ LANG_THAI = 0x1e
245
+ LANG_TSWANA = 0x32
246
+ LANG_TURKISH = 0x1f
247
+ LANG_UKRAINIAN = 0x22
248
+ LANG_URDU = 0x20
249
+ LANG_UZBEK = 0x43
250
+ LANG_VIETNAMESE = 0x2a
251
+ LANG_WELSH = 0x52
252
+ LANG_XHOSA = 0x34
253
+ LANG_ZULU = 0x35
254
+
255
+ SUBLANG_NEUTRAL = 0x00 # language neutral
256
+ SUBLANG_DEFAULT = 0x01 # user default
257
+ SUBLANG_SYS_DEFAULT = 0x02 # system default
258
+
259
+ SUBLANG_ARABIC_SAUDI_ARABIA = 0x01 # Arabic (Saudi Arabia)
260
+ SUBLANG_ARABIC_IRAQ = 0x02 # Arabic (Iraq)
261
+ SUBLANG_ARABIC_EGYPT = 0x03 # Arabic (Egypt)
262
+ SUBLANG_ARABIC_LIBYA = 0x04 # Arabic (Libya)
263
+ SUBLANG_ARABIC_ALGERIA = 0x05 # Arabic (Algeria)
264
+ SUBLANG_ARABIC_MOROCCO = 0x06 # Arabic (Morocco)
265
+ SUBLANG_ARABIC_TUNISIA = 0x07 # Arabic (Tunisia)
266
+ SUBLANG_ARABIC_OMAN = 0x08 # Arabic (Oman)
267
+ SUBLANG_ARABIC_YEMEN = 0x09 # Arabic (Yemen)
268
+ SUBLANG_ARABIC_SYRIA = 0x0a # Arabic (Syria)
269
+ SUBLANG_ARABIC_JORDAN = 0x0b # Arabic (Jordan)
270
+ SUBLANG_ARABIC_LEBANON = 0x0c # Arabic (Lebanon)
271
+ SUBLANG_ARABIC_KUWAIT = 0x0d # Arabic (Kuwait)
272
+ SUBLANG_ARABIC_UAE = 0x0e # Arabic (U.A.E)
273
+ SUBLANG_ARABIC_BAHRAIN = 0x0f # Arabic (Bahrain)
274
+ SUBLANG_ARABIC_QATAR = 0x10 # Arabic (Qatar)
275
+ SUBLANG_AZERI_LATIN = 0x01 # Azeri (Latin)
276
+ SUBLANG_AZERI_CYRILLIC = 0x02 # Azeri (Cyrillic)
277
+ SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN = 0x05 # Bosnian (Bosnia and Herzegovina - Latin)
278
+ SUBLANG_CHINESE_TRADITIONAL = 0x01 # Chinese (Taiwan)
279
+ SUBLANG_CHINESE_SIMPLIFIED = 0x02 # Chinese (PR China)
280
+ SUBLANG_CHINESE_HONGKONG = 0x03 # Chinese (Hong Kong S.A.R., P.R.C.)
281
+ SUBLANG_CHINESE_SINGAPORE = 0x04 # Chinese (Singapore)
282
+ SUBLANG_CHINESE_MACAU = 0x05 # Chinese (Macau S.A.R.)
283
+ SUBLANG_CROATIAN_CROATIA = 0x01 # Croatian (Croatia)
284
+ SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN = 0x04 # Croatian (Bosnia and Herzegovina - Latin)
285
+ SUBLANG_DUTCH = 0x01 # Dutch
286
+ SUBLANG_DUTCH_BELGIAN = 0x02 # Dutch (Belgian)
287
+ SUBLANG_ENGLISH_US = 0x01 # English (USA)
288
+ SUBLANG_ENGLISH_UK = 0x02 # English (UK)
289
+ SUBLANG_ENGLISH_AUS = 0x03 # English (Australian)
290
+ SUBLANG_ENGLISH_CAN = 0x04 # English (Canadian)
291
+ SUBLANG_ENGLISH_NZ = 0x05 # English (New Zealand)
292
+ SUBLANG_ENGLISH_EIRE = 0x06 # English (Irish)
293
+ SUBLANG_ENGLISH_SOUTH_AFRICA = 0x07 # English (South Africa)
294
+ SUBLANG_ENGLISH_JAMAICA = 0x08 # English (Jamaica)
295
+ SUBLANG_ENGLISH_CARIBBEAN = 0x09 # English (Caribbean)
296
+ SUBLANG_ENGLISH_BELIZE = 0x0a # English (Belize)
297
+ SUBLANG_ENGLISH_TRINIDAD = 0x0b # English (Trinidad)
298
+ SUBLANG_ENGLISH_ZIMBABWE = 0x0c # English (Zimbabwe)
299
+ SUBLANG_ENGLISH_PHILIPPINES = 0x0d # English (Philippines)
300
+ SUBLANG_FRENCH = 0x01 # French
301
+ SUBLANG_FRENCH_BELGIAN = 0x02 # French (Belgian)
302
+ SUBLANG_FRENCH_CANADIAN = 0x03 # French (Canadian)
303
+ SUBLANG_FRENCH_SWISS = 0x04 # French (Swiss)
304
+ SUBLANG_FRENCH_LUXEMBOURG = 0x05 # French (Luxembourg)
305
+ SUBLANG_FRENCH_MONACO = 0x06 # French (Monaco)
306
+ SUBLANG_GERMAN = 0x01 # German
307
+ SUBLANG_GERMAN_SWISS = 0x02 # German (Swiss)
308
+ SUBLANG_GERMAN_AUSTRIAN = 0x03 # German (Austrian)
309
+ SUBLANG_GERMAN_LUXEMBOURG = 0x04 # German (Luxembourg)
310
+ SUBLANG_GERMAN_LIECHTENSTEIN = 0x05 # German (Liechtenstein)
311
+ SUBLANG_ITALIAN = 0x01 # Italian
312
+ SUBLANG_ITALIAN_SWISS = 0x02 # Italian (Swiss)
313
+ SUBLANG_KASHMIRI_SASIA = 0x02 # Kashmiri (South Asia)
314
+ SUBLANG_KASHMIRI_INDIA = 0x02 # For app compatibility only
315
+ SUBLANG_KOREAN = 0x01 # Korean (Extended Wansung)
316
+ SUBLANG_LITHUANIAN = 0x01 # Lithuanian
317
+ SUBLANG_MALAY_MALAYSIA = 0x01 # Malay (Malaysia)
318
+ SUBLANG_MALAY_BRUNEI_DARUSSALAM = 0x02 # Malay (Brunei Darussalam)
319
+ SUBLANG_NEPALI_INDIA = 0x02 # Nepali (India)
320
+ SUBLANG_NORWEGIAN_BOKMAL = 0x01 # Norwegian (Bokmal)
321
+ SUBLANG_NORWEGIAN_NYNORSK = 0x02 # Norwegian (Nynorsk)
322
+ SUBLANG_PORTUGUESE = 0x02 # Portuguese
323
+ SUBLANG_PORTUGUESE_BRAZILIAN = 0x01 # Portuguese (Brazilian)
324
+ SUBLANG_QUECHUA_BOLIVIA = 0x01 # Quechua (Bolivia)
325
+ SUBLANG_QUECHUA_ECUADOR = 0x02 # Quechua (Ecuador)
326
+ SUBLANG_QUECHUA_PERU = 0x03 # Quechua (Peru)
327
+ SUBLANG_SAMI_NORTHERN_NORWAY = 0x01 # Northern Sami (Norway)
328
+ SUBLANG_SAMI_NORTHERN_SWEDEN = 0x02 # Northern Sami (Sweden)
329
+ SUBLANG_SAMI_NORTHERN_FINLAND = 0x03 # Northern Sami (Finland)
330
+ SUBLANG_SAMI_LULE_NORWAY = 0x04 # Lule Sami (Norway)
331
+ SUBLANG_SAMI_LULE_SWEDEN = 0x05 # Lule Sami (Sweden)
332
+ SUBLANG_SAMI_SOUTHERN_NORWAY = 0x06 # Southern Sami (Norway)
333
+ SUBLANG_SAMI_SOUTHERN_SWEDEN = 0x07 # Southern Sami (Sweden)
334
+ SUBLANG_SAMI_SKOLT_FINLAND = 0x08 # Skolt Sami (Finland)
335
+ SUBLANG_SAMI_INARI_FINLAND = 0x09 # Inari Sami (Finland)
336
+ SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_LATIN = 0x06 # Serbian (Bosnia and Herzegovina - Latin)
337
+ SUBLANG_SERBIAN_BOSNIA_HERZEGOVINA_CYRILLIC = 0x07 # Serbian (Bosnia and Herzegovina - Cyrillic)
338
+ SUBLANG_SERBIAN_LATIN = 0x02 # Serbian (Latin)
339
+ SUBLANG_SERBIAN_CYRILLIC = 0x03 # Serbian (Cyrillic)
340
+ SUBLANG_SOTHO_NORTHERN_SOUTH_AFRICA = 0x01 # Northern Sotho (South Africa)
341
+ SUBLANG_SPANISH = 0x01 # Spanish (Castilian)
342
+ SUBLANG_SPANISH_MEXICAN = 0x02 # Spanish (Mexican)
343
+ SUBLANG_SPANISH_MODERN = 0x03 # Spanish (Modern)
344
+ SUBLANG_SPANISH_GUATEMALA = 0x04 # Spanish (Guatemala)
345
+ SUBLANG_SPANISH_COSTA_RICA = 0x05 # Spanish (Costa Rica)
346
+ SUBLANG_SPANISH_PANAMA = 0x06 # Spanish (Panama)
347
+ SUBLANG_SPANISH_DOMINICAN_REPUBLIC = 0x07 # Spanish (Dominican Republic)
348
+ SUBLANG_SPANISH_VENEZUELA = 0x08 # Spanish (Venezuela)
349
+ SUBLANG_SPANISH_COLOMBIA = 0x09 # Spanish (Colombia)
350
+ SUBLANG_SPANISH_PERU = 0x0a # Spanish (Peru)
351
+ SUBLANG_SPANISH_ARGENTINA = 0x0b # Spanish (Argentina)
352
+ SUBLANG_SPANISH_ECUADOR = 0x0c # Spanish (Ecuador)
353
+ SUBLANG_SPANISH_CHILE = 0x0d # Spanish (Chile)
354
+ SUBLANG_SPANISH_URUGUAY = 0x0e # Spanish (Uruguay)
355
+ SUBLANG_SPANISH_PARAGUAY = 0x0f # Spanish (Paraguay)
356
+ SUBLANG_SPANISH_BOLIVIA = 0x10 # Spanish (Bolivia)
357
+ SUBLANG_SPANISH_EL_SALVADOR = 0x11 # Spanish (El Salvador)
358
+ SUBLANG_SPANISH_HONDURAS = 0x12 # Spanish (Honduras)
359
+ SUBLANG_SPANISH_NICARAGUA = 0x13 # Spanish (Nicaragua)
360
+ SUBLANG_SPANISH_PUERTO_RICO = 0x14 # Spanish (Puerto Rico)
361
+ SUBLANG_SWEDISH = 0x01 # Swedish
362
+ SUBLANG_SWEDISH_FINLAND = 0x02 # Swedish (Finland)
363
+ SUBLANG_URDU_PAKISTAN = 0x01 # Urdu (Pakistan)
364
+ SUBLANG_URDU_INDIA = 0x02 # Urdu (India)
365
+ SUBLANG_UZBEK_LATIN = 0x01 # Uzbek (Latin)
366
+ SUBLANG_UZBEK_CYRILLIC = 0x02 # Uzbek (Cyrillic)
367
+
368
+ LOCALE_NOUSEROVERRIDE = 0x80000000
369
+ LOCALE_USE_CP_ACP = 0x40000000
370
+ LOCALE_RETURN_NUMBER = 0x20000000
371
+
372
+ LOCALE_ILANGUAGE = 0x00000001 # Language ID
373
+ LOCALE_SLANGUAGE = 0x00000002 # Localized name of language
374
+ LOCALE_SENGLANGUAGE = 0x00001001 # English name of language
375
+ LOCALE_SABBREVLANGNAME = 0x00000003 # Abbreviated language name
376
+ LOCALE_SNATIVELANGNAME = 0x00000004 # Native name of language
377
+
378
+ LOCALE_ICOUNTRY = 0x00000005 # Country code
379
+ LOCALE_SCOUNTRY = 0x00000006 # Localized name of country
380
+ LOCALE_SENGCOUNTRY = 0x00001002 # English name of country
381
+ LOCALE_SABBREVCTRYNAME = 0x00000007 # Abbreviated country name
382
+ LOCALE_SNATIVECTRYNAME = 0x00000008 # Native name of country
383
+
384
+ LOCALE_IDEFAULTLANGUAGE = 0x00000009 # default language id
385
+ LOCALE_IDEFAULTCOUNTRY = 0x0000000A # default country code
386
+ LOCALE_IDEFAULTCODEPAGE = 0x0000000B # default oem code page
387
+ LOCALE_IDEFAULTANSICODEPAGE = 0x00001004 # default ansi code page
388
+ LOCALE_IDEFAULTMACCODEPAGE = 0x00001011 # default mac code page
389
+
390
+ LOCALE_SLIST = 0x0000000C # list item separator
391
+ LOCALE_IMEASURE = 0x0000000D # 0 = metric, 1 = US
392
+
393
+ LOCALE_SDECIMAL = 0x0000000E # decimal separator
394
+ LOCALE_STHOUSAND = 0x0000000F # thousand separator
395
+ LOCALE_SGROUPING = 0x00000010 # digit grouping
396
+ LOCALE_IDIGITS = 0x00000011 # number of fractional digits
397
+ LOCALE_ILZERO = 0x00000012 # leading zeros for decimal
398
+ LOCALE_INEGNUMBER = 0x00001010 # negative number mode
399
+ LOCALE_SNATIVEDIGITS = 0x00000013 # native ascii 0-9
400
+
401
+ LOCALE_SCURRENCY = 0x00000014 # local monetary symbol
402
+ LOCALE_SINTLSYMBOL = 0x00000015 # intl monetary symbol
403
+ LOCALE_SMONDECIMALSEP = 0x00000016 # monetary decimal separator
404
+ LOCALE_SMONTHOUSANDSEP = 0x00000017 # monetary thousand separator
405
+ LOCALE_SMONGROUPING = 0x00000018 # monetary grouping
406
+ LOCALE_ICURRDIGITS = 0x00000019 # # local monetary digits
407
+ LOCALE_IINTLCURRDIGITS = 0x0000001A # # intl monetary digits
408
+ LOCALE_ICURRENCY = 0x0000001B # positive currency mode
409
+ LOCALE_INEGCURR = 0x0000001C # negative currency mode
410
+
411
+ LOCALE_SDATE = 0x0000001D # date separator
412
+ LOCALE_STIME = 0x0000001E # time separator
413
+ LOCALE_SSHORTDATE = 0x0000001F # short date format string
414
+ LOCALE_SLONGDATE = 0x00000020 # long date format string
415
+ LOCALE_STIMEFORMAT = 0x00001003 # time format string
416
+ LOCALE_IDATE = 0x00000021 # short date format ordering
417
+ LOCALE_ILDATE = 0x00000022 # long date format ordering
418
+ LOCALE_ITIME = 0x00000023 # time format specifier
419
+ LOCALE_ITIMEMARKPOSN = 0x00001005 # time marker position
420
+ LOCALE_ICENTURY = 0x00000024 # century format specifier (short date)
421
+ LOCALE_ITLZERO = 0x00000025 # leading zeros in time field
422
+ LOCALE_IDAYLZERO = 0x00000026 # leading zeros in day field (short date)
423
+ LOCALE_IMONLZERO = 0x00000027 # leading zeros in month field (short date)
424
+ LOCALE_S1159 = 0x00000028 # AM designator
425
+ LOCALE_S2359 = 0x00000029 # PM designator
426
+
427
+ LOCALE_ICALENDARTYPE = 0x00001009 # type of calendar specifier
428
+ LOCALE_IOPTIONALCALENDAR = 0x0000100B # additional calendar types specifier
429
+ LOCALE_IFIRSTDAYOFWEEK = 0x0000100C # first day of week specifier
430
+ LOCALE_IFIRSTWEEKOFYEAR = 0x0000100D # first week of year specifier
431
+
432
+ LOCALE_SDAYNAME1 = 0x0000002A # long name for Monday
433
+ LOCALE_SDAYNAME2 = 0x0000002B # long name for Tuesday
434
+ LOCALE_SDAYNAME3 = 0x0000002C # long name for Wednesday
435
+ LOCALE_SDAYNAME4 = 0x0000002D # long name for Thursday
436
+ LOCALE_SDAYNAME5 = 0x0000002E # long name for Friday
437
+ LOCALE_SDAYNAME6 = 0x0000002F # long name for Saturday
438
+ LOCALE_SDAYNAME7 = 0x00000030 # long name for Sunday
439
+ LOCALE_SABBREVDAYNAME1 = 0x00000031 # abbreviated name for Monday
440
+ LOCALE_SABBREVDAYNAME2 = 0x00000032 # abbreviated name for Tuesday
441
+ LOCALE_SABBREVDAYNAME3 = 0x00000033 # abbreviated name for Wednesday
442
+ LOCALE_SABBREVDAYNAME4 = 0x00000034 # abbreviated name for Thursday
443
+ LOCALE_SABBREVDAYNAME5 = 0x00000035 # abbreviated name for Friday
444
+ LOCALE_SABBREVDAYNAME6 = 0x00000036 # abbreviated name for Saturday
445
+ LOCALE_SABBREVDAYNAME7 = 0x00000037 # abbreviated name for Sunday
446
+ LOCALE_SMONTHNAME1 = 0x00000038 # long name for January
447
+ LOCALE_SMONTHNAME2 = 0x00000039 # long name for February
448
+ LOCALE_SMONTHNAME3 = 0x0000003A # long name for March
449
+ LOCALE_SMONTHNAME4 = 0x0000003B # long name for April
450
+ LOCALE_SMONTHNAME5 = 0x0000003C # long name for May
451
+ LOCALE_SMONTHNAME6 = 0x0000003D # long name for June
452
+ LOCALE_SMONTHNAME7 = 0x0000003E # long name for July
453
+ LOCALE_SMONTHNAME8 = 0x0000003F # long name for August
454
+ LOCALE_SMONTHNAME9 = 0x00000040 # long name for September
455
+ LOCALE_SMONTHNAME10 = 0x00000041 # long name for October
456
+ LOCALE_SMONTHNAME11 = 0x00000042 # long name for November
457
+ LOCALE_SMONTHNAME12 = 0x00000043 # long name for December
458
+ LOCALE_SMONTHNAME13 = 0x0000100E # long name for 13th month (if exists)
459
+ LOCALE_SABBREVMONTHNAME1 = 0x00000044 # abbreviated name for January
460
+ LOCALE_SABBREVMONTHNAME2 = 0x00000045 # abbreviated name for February
461
+ LOCALE_SABBREVMONTHNAME3 = 0x00000046 # abbreviated name for March
462
+ LOCALE_SABBREVMONTHNAME4 = 0x00000047 # abbreviated name for April
463
+ LOCALE_SABBREVMONTHNAME5 = 0x00000048 # abbreviated name for May
464
+ LOCALE_SABBREVMONTHNAME6 = 0x00000049 # abbreviated name for June
465
+ LOCALE_SABBREVMONTHNAME7 = 0x0000004A # abbreviated name for July
466
+ LOCALE_SABBREVMONTHNAME8 = 0x0000004B # abbreviated name for August
467
+ LOCALE_SABBREVMONTHNAME9 = 0x0000004C # abbreviated name for September
468
+ LOCALE_SABBREVMONTHNAME10 = 0x0000004D # abbreviated name for October
469
+ LOCALE_SABBREVMONTHNAME11 = 0x0000004E # abbreviated name for November
470
+ LOCALE_SABBREVMONTHNAME12 = 0x0000004F # abbreviated name for December
471
+ LOCALE_SABBREVMONTHNAME13 = 0x0000100F # abbreviated name for 13th month (if exists)
472
+
473
+ LOCALE_SPOSITIVESIGN = 0x00000050 # positive sign
474
+ LOCALE_SNEGATIVESIGN = 0x00000051 # negative sign
475
+ LOCALE_IPOSSIGNPOSN = 0x00000052 # positive sign position
476
+ LOCALE_INEGSIGNPOSN = 0x00000053 # negative sign position
477
+ LOCALE_IPOSSYMPRECEDES = 0x00000054 # mon sym precedes pos amt
478
+ LOCALE_IPOSSEPBYSPACE = 0x00000055 # mon sym sep by space from pos amt
479
+ LOCALE_INEGSYMPRECEDES = 0x00000056 # mon sym precedes neg amt
480
+ LOCALE_INEGSEPBYSPACE = 0x00000057 # mon sym sep by space from neg amt
481
+
482
+ LOCALE_FONTSIGNATURE = 0x00000058 # font signature
483
+ LOCALE_SISO639LANGNAME = 0x00000059 # ISO abbreviated language name
484
+ LOCALE_SISO3166CTRYNAME = 0x0000005A # ISO abbreviated country name
485
+
486
+ LOCALE_IDEFAULTEBCDICCODEPAGE = 0x00001012 # default ebcdic code page
487
+ LOCALE_IPAPERSIZE = 0x0000100A # 1 = letter, 5 = legal, 8 = a3, 9 = a4
488
+ LOCALE_SENGCURRNAME = 0x00001007 # english name of currency
489
+ LOCALE_SNATIVECURRNAME = 0x00001008 # native name of currency
490
+ LOCALE_SYEARMONTH = 0x00001006 # year month format string
491
+ LOCALE_SSORTNAME = 0x00001013 # sort name
492
+ LOCALE_IDIGITSUBSTITUTION = 0x00001014 # 0 = context, 1 = none, 2 = national
493
+
494
+ TIME_NOMINUTESORSECONDS = 0x00000001 # do not use minutes or seconds
495
+ TIME_NOSECONDS = 0x00000002 # do not use seconds
496
+ TIME_NOTIMEMARKER = 0x00000004 # do not use time marker
497
+ TIME_FORCE24HOURFORMAT = 0x00000008 # always use 24 hour format
498
+
499
+ DATE_SHORTDATE = 0x00000001 # use short date picture
500
+ DATE_LONGDATE = 0x00000002 # use long date picture
501
+ DATE_USE_ALT_CALENDAR = 0x00000004 # use alternate calendar (if any)
502
+
503
+ DATE_YEARMONTH = 0x00000008 # use year month picture
504
+ DATE_LTRREADING = 0x00000010 # add marks for left to right reading order layout
505
+ DATE_RTLREADING = 0x00000020 # add marks for right to left reading order layout
506
+
507
+ SORT_DEFAULT = 0x0 # sorting default
508
+
509
+ SORT_JAPANESE_XJIS = 0x0 # Japanese XJIS order
510
+ SORT_JAPANESE_UNICODE = 0x1 # Japanese Unicode order
511
+
512
+ SORT_CHINESE_BIG5 = 0x0 # Chinese BIG5 order
513
+ SORT_CHINESE_PRCP = 0x0 # PRC Chinese Phonetic order
514
+ SORT_CHINESE_UNICODE = 0x1 # Chinese Unicode order
515
+ SORT_CHINESE_PRC = 0x2 # PRC Chinese Stroke Count order
516
+ SORT_CHINESE_BOPOMOFO = 0x3 # Traditional Chinese Bopomofo order
517
+
518
+ SORT_KOREAN_KSC = 0x0 # Korean KSC order
519
+ SORT_KOREAN_UNICODE = 0x1 # Korean Unicode order
520
+
521
+ SORT_GERMAN_PHONE_BOOK = 0x1 # German Phone Book order
522
+
523
+ SORT_HUNGARIAN_DEFAULT = 0x0 # Hungarian Default order
524
+ SORT_HUNGARIAN_TECHNICAL = 0x1 # Hungarian Technical order
525
+
526
+ SORT_GEORGIAN_TRADITIONAL = 0x0 # Georgian Traditional order
527
+ SORT_GEORGIAN_MODERN = 0x1 # Georgian Modern order
528
+
529
+ LANG_SYSTEM_DEFAULT = 2048
530
+ LANG_USER_DEFAULT = 1024
531
+ LOCALE_SYSTEM_DEFAULT = 2048
532
+ LOCALE_USER_DEFAULT = 1024
533
+ LOCALE_INVARIANT = 8323072
534
+
535
+ API.new('CompareString', 'LLPIPI', 'I')
536
+ API.new('EnumDateFormats', 'KLL', 'B')
537
+ API.new('EnumDateFormatsEx', 'KLL', 'B')
538
+ API.new('EnumSystemCodePages', 'KL', 'L')
539
+ API.new('EnumSystemLocales', 'KL', 'L')
540
+ API.new('EnumTimeFormats', 'KLL', 'B')
541
+ API.new('GetACP', 'V', 'I')
542
+ API.new('GetCPInfo', 'LP', 'B')
543
+ API.new('GetCPInfoEx', 'LLP', 'B')
544
+ API.new('GetCurrencyFormat', 'LLPPPI', 'I')
545
+ API.new('GetDateFormat', 'LLPPPI', 'I')
546
+ API.new('GetLocaleInfo', 'LLPL', 'I')
547
+ API.new('GetSystemDefaultLangID', 'V', 'L')
548
+ API.new('GetSystemDefaultLCID', 'V', 'L')
549
+ API.new('GetUserDefaultLangID', 'V', 'L')
550
+ API.new('GetUserDefaultLCID', 'V', 'L')
551
+
552
+ begin
553
+ API.new('AdjustCalendarDate', 'PLP', 'B')
554
+ API.new('EnumTimeFormatsEx', 'KSLP', 'B')
555
+ API.new('GetCurrencyFormatEx', 'PLPPPI', 'I')
556
+ API.new('GetDateFormatEx', 'SLPSPIS', 'I')
557
+ rescue Win32::API::LoadLibraryError
558
+ # Windows Vista or later
559
+ end
560
+
561
+ # Convenience method for converting the results of the GetACP()
562
+ # function to a human readable string.
563
+ #
564
+ def get_acp_string
565
+ CODE_PAGE[GetACP.call]
566
+ end
567
+
568
+ # Equivalent of the MAKELCID macro in WinNT.h
569
+ #
570
+ def MAKELCID(srtid, lgid)
571
+ srtid << 16 | lgid
572
+ end
573
+
574
+ # Equivalent of the MAKELANGID macro in WinNT.h
575
+ #
576
+ def MAKELANGID(x, s)
577
+ s << 10 | x
578
+ end
579
+ end
580
+ end