chef 10.28.2-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (960) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/README.rdoc +177 -0
  4. data/Rakefile +128 -0
  5. data/bin/chef-client +26 -0
  6. data/bin/chef-solo +25 -0
  7. data/bin/knife +26 -0
  8. data/bin/shef +34 -0
  9. data/distro/README +2 -0
  10. data/distro/arch/etc/conf.d/chef-client.conf +5 -0
  11. data/distro/arch/etc/conf.d/chef-expander.conf +8 -0
  12. data/distro/arch/etc/conf.d/chef-server-webui.conf +10 -0
  13. data/distro/arch/etc/conf.d/chef-server.conf +10 -0
  14. data/distro/arch/etc/conf.d/chef-solr.conf +8 -0
  15. data/distro/arch/etc/rc.d/chef-client +90 -0
  16. data/distro/arch/etc/rc.d/chef-expander +78 -0
  17. data/distro/arch/etc/rc.d/chef-server +78 -0
  18. data/distro/arch/etc/rc.d/chef-server-webui +78 -0
  19. data/distro/arch/etc/rc.d/chef-solr +78 -0
  20. data/distro/common/html/chef-client.8.html +145 -0
  21. data/distro/common/html/chef-expander.8.html +164 -0
  22. data/distro/common/html/chef-expanderctl.8.html +146 -0
  23. data/distro/common/html/chef-server-webui.8.html +185 -0
  24. data/distro/common/html/chef-server.8.html +182 -0
  25. data/distro/common/html/chef-solo.8.html +185 -0
  26. data/distro/common/html/chef-solr.8.html +165 -0
  27. data/distro/common/html/knife-bootstrap.1.html +241 -0
  28. data/distro/common/html/knife-client.1.html +219 -0
  29. data/distro/common/html/knife-configure.1.html +170 -0
  30. data/distro/common/html/knife-cookbook-site.1.html +241 -0
  31. data/distro/common/html/knife-cookbook.1.html +381 -0
  32. data/distro/common/html/knife-data-bag.1.html +235 -0
  33. data/distro/common/html/knife-environment.1.html +265 -0
  34. data/distro/common/html/knife-exec.1.html +134 -0
  35. data/distro/common/html/knife-index.1.html +125 -0
  36. data/distro/common/html/knife-node.1.html +250 -0
  37. data/distro/common/html/knife-recipe.1.html +92 -0
  38. data/distro/common/html/knife-role.1.html +200 -0
  39. data/distro/common/html/knife-search.1.html +288 -0
  40. data/distro/common/html/knife-ssh.1.html +156 -0
  41. data/distro/common/html/knife-status.1.html +128 -0
  42. data/distro/common/html/knife-tag.1.html +137 -0
  43. data/distro/common/html/knife.1.html +320 -0
  44. data/distro/common/html/shef.1.html +283 -0
  45. data/distro/common/man/man1/knife-bootstrap.1 +201 -0
  46. data/distro/common/man/man1/knife-client.1 +99 -0
  47. data/distro/common/man/man1/knife-configure.1 +88 -0
  48. data/distro/common/man/man1/knife-cookbook-site.1 +145 -0
  49. data/distro/common/man/man1/knife-cookbook.1 +332 -0
  50. data/distro/common/man/man1/knife-data-bag.1 +123 -0
  51. data/distro/common/man/man1/knife-environment.1 +168 -0
  52. data/distro/common/man/man1/knife-exec.1 +46 -0
  53. data/distro/common/man/man1/knife-index.1 +29 -0
  54. data/distro/common/man/man1/knife-node.1 +134 -0
  55. data/distro/common/man/man1/knife-role.1 +88 -0
  56. data/distro/common/man/man1/knife-search.1 +280 -0
  57. data/distro/common/man/man1/knife-ssh.1 +79 -0
  58. data/distro/common/man/man1/knife-status.1 +29 -0
  59. data/distro/common/man/man1/knife-tag.1 +43 -0
  60. data/distro/common/man/man1/knife.1 +288 -0
  61. data/distro/common/man/man1/shef.1 +256 -0
  62. data/distro/common/man/man8/chef-client.8 +104 -0
  63. data/distro/common/man/man8/chef-expander.8 +97 -0
  64. data/distro/common/man/man8/chef-expanderctl.8 +62 -0
  65. data/distro/common/man/man8/chef-server-webui.8 +155 -0
  66. data/distro/common/man/man8/chef-server.8 +147 -0
  67. data/distro/common/man/man8/chef-solo.8 +126 -0
  68. data/distro/common/man/man8/chef-solr.8 +122 -0
  69. data/distro/common/markdown/README +3 -0
  70. data/distro/common/markdown/man1/knife-bootstrap.mkd +141 -0
  71. data/distro/common/markdown/man1/knife-client.mkd +103 -0
  72. data/distro/common/markdown/man1/knife-configure.mkd +70 -0
  73. data/distro/common/markdown/man1/knife-cookbook-site.mkd +123 -0
  74. data/distro/common/markdown/man1/knife-cookbook.mkd +263 -0
  75. data/distro/common/markdown/man1/knife-data-bag.mkd +121 -0
  76. data/distro/common/markdown/man1/knife-environment.mkd +151 -0
  77. data/distro/common/markdown/man1/knife-exec.mkd +37 -0
  78. data/distro/common/markdown/man1/knife-index.mkd +30 -0
  79. data/distro/common/markdown/man1/knife-node.mkd +130 -0
  80. data/distro/common/markdown/man1/knife-role.mkd +85 -0
  81. data/distro/common/markdown/man1/knife-search.mkd +180 -0
  82. data/distro/common/markdown/man1/knife-ssh.mkd +69 -0
  83. data/distro/common/markdown/man1/knife-status.mkd +36 -0
  84. data/distro/common/markdown/man1/knife-tag.mkd +39 -0
  85. data/distro/common/markdown/man1/knife.mkd +218 -0
  86. data/distro/common/markdown/man1/shef.mkd +189 -0
  87. data/distro/common/markdown/man8/chef-client.mkd +74 -0
  88. data/distro/common/markdown/man8/chef-expander.mkd +82 -0
  89. data/distro/common/markdown/man8/chef-expanderctl.mkd +58 -0
  90. data/distro/common/markdown/man8/chef-server-webui.mkd +121 -0
  91. data/distro/common/markdown/man8/chef-server.mkd +121 -0
  92. data/distro/common/markdown/man8/chef-solo.mkd +107 -0
  93. data/distro/common/markdown/man8/chef-solr.mkd +89 -0
  94. data/distro/debian/etc/default/chef-client +5 -0
  95. data/distro/debian/etc/default/chef-expander +8 -0
  96. data/distro/debian/etc/default/chef-server +9 -0
  97. data/distro/debian/etc/default/chef-server-webui +9 -0
  98. data/distro/debian/etc/default/chef-solr +8 -0
  99. data/distro/debian/etc/init.d/chef-client +210 -0
  100. data/distro/debian/etc/init.d/chef-expander +176 -0
  101. data/distro/debian/etc/init.d/chef-server +122 -0
  102. data/distro/debian/etc/init.d/chef-server-webui +123 -0
  103. data/distro/debian/etc/init.d/chef-solr +176 -0
  104. data/distro/debian/etc/init/chef-client.conf +17 -0
  105. data/distro/debian/etc/init/chef-expander.conf +17 -0
  106. data/distro/debian/etc/init/chef-server-webui.conf +17 -0
  107. data/distro/debian/etc/init/chef-server.conf +17 -0
  108. data/distro/debian/etc/init/chef-solr.conf +17 -0
  109. data/distro/redhat/etc/init.d/chef-client +121 -0
  110. data/distro/redhat/etc/init.d/chef-expander +104 -0
  111. data/distro/redhat/etc/init.d/chef-server +112 -0
  112. data/distro/redhat/etc/init.d/chef-server-webui +112 -0
  113. data/distro/redhat/etc/init.d/chef-solr +104 -0
  114. data/distro/redhat/etc/logrotate.d/chef-client +8 -0
  115. data/distro/redhat/etc/logrotate.d/chef-expander +8 -0
  116. data/distro/redhat/etc/logrotate.d/chef-server +8 -0
  117. data/distro/redhat/etc/logrotate.d/chef-server-webui +8 -0
  118. data/distro/redhat/etc/logrotate.d/chef-solr +8 -0
  119. data/distro/redhat/etc/sysconfig/chef-client +15 -0
  120. data/distro/redhat/etc/sysconfig/chef-expander +7 -0
  121. data/distro/redhat/etc/sysconfig/chef-server +14 -0
  122. data/distro/redhat/etc/sysconfig/chef-server-webui +14 -0
  123. data/distro/redhat/etc/sysconfig/chef-solr +8 -0
  124. data/distro/windows/service_manager.rb +164 -0
  125. data/lib/chef.rb +41 -0
  126. data/lib/chef/api_client.rb +293 -0
  127. data/lib/chef/application.rb +168 -0
  128. data/lib/chef/application/agent.rb +18 -0
  129. data/lib/chef/application/client.rb +322 -0
  130. data/lib/chef/application/knife.rb +183 -0
  131. data/lib/chef/application/solo.rb +248 -0
  132. data/lib/chef/application/windows_service.rb +227 -0
  133. data/lib/chef/applications.rb +4 -0
  134. data/lib/chef/certificate.rb +161 -0
  135. data/lib/chef/checksum.rb +167 -0
  136. data/lib/chef/checksum/storage.rb +18 -0
  137. data/lib/chef/checksum/storage/filesystem.rb +56 -0
  138. data/lib/chef/checksum_cache.rb +190 -0
  139. data/lib/chef/client.rb +499 -0
  140. data/lib/chef/config.rb +330 -0
  141. data/lib/chef/cookbook/chefignore.rb +66 -0
  142. data/lib/chef/cookbook/cookbook_collection.rb +45 -0
  143. data/lib/chef/cookbook/cookbook_version_loader.rb +171 -0
  144. data/lib/chef/cookbook/file_system_file_vendor.rb +56 -0
  145. data/lib/chef/cookbook/file_vendor.rb +48 -0
  146. data/lib/chef/cookbook/metadata.rb +629 -0
  147. data/lib/chef/cookbook/remote_file_vendor.rb +84 -0
  148. data/lib/chef/cookbook/synchronizer.rb +218 -0
  149. data/lib/chef/cookbook/syntax_check.rb +136 -0
  150. data/lib/chef/cookbook_loader.rb +121 -0
  151. data/lib/chef/cookbook_site_streaming_uploader.rb +244 -0
  152. data/lib/chef/cookbook_uploader.rb +173 -0
  153. data/lib/chef/cookbook_version.rb +1081 -0
  154. data/lib/chef/cookbook_version_selector.rb +168 -0
  155. data/lib/chef/couchdb.rb +246 -0
  156. data/lib/chef/daemon.rb +187 -0
  157. data/lib/chef/data_bag.rb +239 -0
  158. data/lib/chef/data_bag_item.rb +277 -0
  159. data/lib/chef/encrypted_data_bag_item.rb +268 -0
  160. data/lib/chef/environment.rb +458 -0
  161. data/lib/chef/event_dispatch/base.rb +311 -0
  162. data/lib/chef/event_dispatch/dispatcher.rb +42 -0
  163. data/lib/chef/exceptions.rb +192 -0
  164. data/lib/chef/file_access_control.rb +75 -0
  165. data/lib/chef/file_access_control/unix.rb +216 -0
  166. data/lib/chef/file_access_control/windows.rb +310 -0
  167. data/lib/chef/file_cache.rb +220 -0
  168. data/lib/chef/formatters/base.rb +247 -0
  169. data/lib/chef/formatters/doc.rb +236 -0
  170. data/lib/chef/formatters/error_descriptor.rb +66 -0
  171. data/lib/chef/formatters/error_inspectors.rb +19 -0
  172. data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +111 -0
  173. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +106 -0
  174. data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +146 -0
  175. data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +80 -0
  176. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +125 -0
  177. data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +137 -0
  178. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +109 -0
  179. data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +118 -0
  180. data/lib/chef/formatters/error_mapper.rb +85 -0
  181. data/lib/chef/formatters/minimal.rb +235 -0
  182. data/lib/chef/handler.rb +235 -0
  183. data/lib/chef/handler/error_report.rb +33 -0
  184. data/lib/chef/handler/json_file.rb +64 -0
  185. data/lib/chef/index_queue.rb +29 -0
  186. data/lib/chef/index_queue/amqp_client.rb +116 -0
  187. data/lib/chef/index_queue/consumer.rb +76 -0
  188. data/lib/chef/index_queue/indexable.rb +109 -0
  189. data/lib/chef/json_compat.rb +149 -0
  190. data/lib/chef/knife.rb +537 -0
  191. data/lib/chef/knife/bootstrap.rb +233 -0
  192. data/lib/chef/knife/bootstrap/archlinux-gems.erb +62 -0
  193. data/lib/chef/knife/bootstrap/centos5-gems.erb +62 -0
  194. data/lib/chef/knife/bootstrap/chef-full.erb +60 -0
  195. data/lib/chef/knife/bootstrap/fedora13-gems.erb +44 -0
  196. data/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +53 -0
  197. data/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +48 -0
  198. data/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +46 -0
  199. data/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb +60 -0
  200. data/lib/chef/knife/client_bulk_delete.rb +65 -0
  201. data/lib/chef/knife/client_create.rb +80 -0
  202. data/lib/chef/knife/client_delete.rb +46 -0
  203. data/lib/chef/knife/client_edit.rb +45 -0
  204. data/lib/chef/knife/client_list.rb +42 -0
  205. data/lib/chef/knife/client_reregister.rb +59 -0
  206. data/lib/chef/knife/client_show.rb +52 -0
  207. data/lib/chef/knife/configure.rb +168 -0
  208. data/lib/chef/knife/configure_client.rb +50 -0
  209. data/lib/chef/knife/cookbook_bulk_delete.rb +72 -0
  210. data/lib/chef/knife/cookbook_create.rb +447 -0
  211. data/lib/chef/knife/cookbook_delete.rb +151 -0
  212. data/lib/chef/knife/cookbook_download.rb +137 -0
  213. data/lib/chef/knife/cookbook_list.rb +47 -0
  214. data/lib/chef/knife/cookbook_metadata.rb +107 -0
  215. data/lib/chef/knife/cookbook_metadata_from_file.rb +44 -0
  216. data/lib/chef/knife/cookbook_show.rb +102 -0
  217. data/lib/chef/knife/cookbook_site_download.rb +109 -0
  218. data/lib/chef/knife/cookbook_site_install.rb +164 -0
  219. data/lib/chef/knife/cookbook_site_list.rb +62 -0
  220. data/lib/chef/knife/cookbook_site_search.rb +51 -0
  221. data/lib/chef/knife/cookbook_site_share.rb +114 -0
  222. data/lib/chef/knife/cookbook_site_show.rb +60 -0
  223. data/lib/chef/knife/cookbook_site_unshare.rb +56 -0
  224. data/lib/chef/knife/cookbook_site_vendor.rb +46 -0
  225. data/lib/chef/knife/cookbook_test.rb +93 -0
  226. data/lib/chef/knife/cookbook_upload.rb +290 -0
  227. data/lib/chef/knife/core/bootstrap_context.rb +106 -0
  228. data/lib/chef/knife/core/cookbook_scm_repo.rb +160 -0
  229. data/lib/chef/knife/core/generic_presenter.rb +191 -0
  230. data/lib/chef/knife/core/node_editor.rb +130 -0
  231. data/lib/chef/knife/core/node_presenter.rb +137 -0
  232. data/lib/chef/knife/core/object_loader.rb +112 -0
  233. data/lib/chef/knife/core/subcommand_loader.rb +112 -0
  234. data/lib/chef/knife/core/text_formatter.rb +100 -0
  235. data/lib/chef/knife/core/ui.rb +217 -0
  236. data/lib/chef/knife/data_bag_create.rb +93 -0
  237. data/lib/chef/knife/data_bag_delete.rb +51 -0
  238. data/lib/chef/knife/data_bag_edit.rb +94 -0
  239. data/lib/chef/knife/data_bag_from_file.rb +136 -0
  240. data/lib/chef/knife/data_bag_list.rb +46 -0
  241. data/lib/chef/knife/data_bag_show.rb +81 -0
  242. data/lib/chef/knife/environment_create.rb +53 -0
  243. data/lib/chef/knife/environment_delete.rb +45 -0
  244. data/lib/chef/knife/environment_edit.rb +45 -0
  245. data/lib/chef/knife/environment_from_file.rb +83 -0
  246. data/lib/chef/knife/environment_list.rb +42 -0
  247. data/lib/chef/knife/environment_show.rb +46 -0
  248. data/lib/chef/knife/exec.rb +86 -0
  249. data/lib/chef/knife/help.rb +103 -0
  250. data/lib/chef/knife/help_topics.rb +4 -0
  251. data/lib/chef/knife/index_rebuild.rb +50 -0
  252. data/lib/chef/knife/node_bulk_delete.rb +80 -0
  253. data/lib/chef/knife/node_create.rb +50 -0
  254. data/lib/chef/knife/node_delete.rb +47 -0
  255. data/lib/chef/knife/node_edit.rb +72 -0
  256. data/lib/chef/knife/node_from_file.rb +50 -0
  257. data/lib/chef/knife/node_list.rb +46 -0
  258. data/lib/chef/knife/node_run_list_add.rb +75 -0
  259. data/lib/chef/knife/node_run_list_remove.rb +48 -0
  260. data/lib/chef/knife/node_show.rb +73 -0
  261. data/lib/chef/knife/recipe_list.rb +32 -0
  262. data/lib/chef/knife/role_bulk_delete.rb +70 -0
  263. data/lib/chef/knife/role_create.rb +55 -0
  264. data/lib/chef/knife/role_delete.rb +47 -0
  265. data/lib/chef/knife/role_edit.rb +48 -0
  266. data/lib/chef/knife/role_from_file.rb +56 -0
  267. data/lib/chef/knife/role_list.rb +43 -0
  268. data/lib/chef/knife/role_show.rb +54 -0
  269. data/lib/chef/knife/search.rb +141 -0
  270. data/lib/chef/knife/ssh.rb +459 -0
  271. data/lib/chef/knife/status.rb +119 -0
  272. data/lib/chef/knife/tag_create.rb +52 -0
  273. data/lib/chef/knife/tag_delete.rb +60 -0
  274. data/lib/chef/knife/tag_list.rb +47 -0
  275. data/lib/chef/log.rb +39 -0
  276. data/lib/chef/mash.rb +225 -0
  277. data/lib/chef/mixin/check_helper.rb +31 -0
  278. data/lib/chef/mixin/checksum.rb +32 -0
  279. data/lib/chef/mixin/command.rb +164 -0
  280. data/lib/chef/mixin/command/unix.rb +220 -0
  281. data/lib/chef/mixin/command/windows.rb +76 -0
  282. data/lib/chef/mixin/convert_to_class_name.rb +65 -0
  283. data/lib/chef/mixin/create_path.rb +57 -0
  284. data/lib/chef/mixin/deep_merge.rb +247 -0
  285. data/lib/chef/mixin/deprecation.rb +65 -0
  286. data/lib/chef/mixin/enforce_ownership_and_permissions.rb +39 -0
  287. data/lib/chef/mixin/file_class.rb +46 -0
  288. data/lib/chef/mixin/from_file.rb +50 -0
  289. data/lib/chef/mixin/get_source_from_package.rb +42 -0
  290. data/lib/chef/mixin/language.rb +249 -0
  291. data/lib/chef/mixin/language_include_attribute.rb +61 -0
  292. data/lib/chef/mixin/language_include_recipe.rb +58 -0
  293. data/lib/chef/mixin/params_validate.rb +238 -0
  294. data/lib/chef/mixin/path_sanity.rb +67 -0
  295. data/lib/chef/mixin/recipe_definition_dsl_core.rb +86 -0
  296. data/lib/chef/mixin/securable.rb +180 -0
  297. data/lib/chef/mixin/shell_out.rb +69 -0
  298. data/lib/chef/mixin/template.rb +100 -0
  299. data/lib/chef/mixin/why_run.rb +332 -0
  300. data/lib/chef/mixin/xml_escape.rb +140 -0
  301. data/lib/chef/mixins.rb +18 -0
  302. data/lib/chef/monkey_patches/dir.rb +36 -0
  303. data/lib/chef/monkey_patches/fileutils.rb +65 -0
  304. data/lib/chef/monkey_patches/moneta.rb +50 -0
  305. data/lib/chef/monkey_patches/net_http.rb +22 -0
  306. data/lib/chef/monkey_patches/numeric.rb +15 -0
  307. data/lib/chef/monkey_patches/object.rb +9 -0
  308. data/lib/chef/monkey_patches/regexp.rb +34 -0
  309. data/lib/chef/monkey_patches/string.rb +49 -0
  310. data/lib/chef/monkey_patches/tempfile.rb +64 -0
  311. data/lib/chef/nil_argument.rb +3 -0
  312. data/lib/chef/node.rb +682 -0
  313. data/lib/chef/node/attribute.rb +504 -0
  314. data/lib/chef/openid_registration.rb +187 -0
  315. data/lib/chef/platform.rb +520 -0
  316. data/lib/chef/provider.rb +223 -0
  317. data/lib/chef/provider/breakpoint.rb +36 -0
  318. data/lib/chef/provider/cookbook_file.rb +105 -0
  319. data/lib/chef/provider/cron.rb +214 -0
  320. data/lib/chef/provider/cron/solaris.rb +56 -0
  321. data/lib/chef/provider/deploy.rb +474 -0
  322. data/lib/chef/provider/deploy/revision.rb +80 -0
  323. data/lib/chef/provider/deploy/timestamped.rb +32 -0
  324. data/lib/chef/provider/directory.rb +128 -0
  325. data/lib/chef/provider/env.rb +152 -0
  326. data/lib/chef/provider/env/windows.rb +75 -0
  327. data/lib/chef/provider/erl_call.rb +106 -0
  328. data/lib/chef/provider/execute.rb +68 -0
  329. data/lib/chef/provider/file.rb +355 -0
  330. data/lib/chef/provider/git.rb +260 -0
  331. data/lib/chef/provider/group.rb +159 -0
  332. data/lib/chef/provider/group/aix.rb +70 -0
  333. data/lib/chef/provider/group/dscl.rb +129 -0
  334. data/lib/chef/provider/group/gpasswd.rb +65 -0
  335. data/lib/chef/provider/group/groupadd.rb +96 -0
  336. data/lib/chef/provider/group/groupmod.rb +120 -0
  337. data/lib/chef/provider/group/pw.rb +93 -0
  338. data/lib/chef/provider/group/suse.rb +60 -0
  339. data/lib/chef/provider/group/usermod.rb +68 -0
  340. data/lib/chef/provider/group/windows.rb +79 -0
  341. data/lib/chef/provider/http_request.rb +136 -0
  342. data/lib/chef/provider/ifconfig.rb +214 -0
  343. data/lib/chef/provider/link.rb +130 -0
  344. data/lib/chef/provider/log.rb +54 -0
  345. data/lib/chef/provider/mdadm.rb +92 -0
  346. data/lib/chef/provider/mount.rb +128 -0
  347. data/lib/chef/provider/mount/mount.rb +252 -0
  348. data/lib/chef/provider/mount/windows.rb +81 -0
  349. data/lib/chef/provider/ohai.rb +47 -0
  350. data/lib/chef/provider/package.rb +229 -0
  351. data/lib/chef/provider/package/apt.rb +147 -0
  352. data/lib/chef/provider/package/dpkg.rb +128 -0
  353. data/lib/chef/provider/package/easy_install.rb +136 -0
  354. data/lib/chef/provider/package/freebsd.rb +149 -0
  355. data/lib/chef/provider/package/ips.rb +101 -0
  356. data/lib/chef/provider/package/macports.rb +105 -0
  357. data/lib/chef/provider/package/pacman.rb +111 -0
  358. data/lib/chef/provider/package/portage.rb +143 -0
  359. data/lib/chef/provider/package/rpm.rb +121 -0
  360. data/lib/chef/provider/package/rubygems.rb +580 -0
  361. data/lib/chef/provider/package/smartos.rb +84 -0
  362. data/lib/chef/provider/package/solaris.rb +139 -0
  363. data/lib/chef/provider/package/yum-dump.py +307 -0
  364. data/lib/chef/provider/package/yum.rb +1261 -0
  365. data/lib/chef/provider/package/zypper.rb +144 -0
  366. data/lib/chef/provider/remote_directory.rb +178 -0
  367. data/lib/chef/provider/remote_file.rb +126 -0
  368. data/lib/chef/provider/resource_update.rb +55 -0
  369. data/lib/chef/provider/route.rb +223 -0
  370. data/lib/chef/provider/ruby_block.rb +39 -0
  371. data/lib/chef/provider/script.rb +57 -0
  372. data/lib/chef/provider/service.rb +158 -0
  373. data/lib/chef/provider/service/arch.rb +113 -0
  374. data/lib/chef/provider/service/debian.rb +152 -0
  375. data/lib/chef/provider/service/freebsd.rb +175 -0
  376. data/lib/chef/provider/service/gentoo.rb +67 -0
  377. data/lib/chef/provider/service/init.rb +87 -0
  378. data/lib/chef/provider/service/insserv.rb +52 -0
  379. data/lib/chef/provider/service/invokercd.rb +35 -0
  380. data/lib/chef/provider/service/macosx.rb +144 -0
  381. data/lib/chef/provider/service/redhat.rb +77 -0
  382. data/lib/chef/provider/service/simple.rb +172 -0
  383. data/lib/chef/provider/service/solaris.rb +86 -0
  384. data/lib/chef/provider/service/systemd.rb +115 -0
  385. data/lib/chef/provider/service/upstart.rb +232 -0
  386. data/lib/chef/provider/service/windows.rb +163 -0
  387. data/lib/chef/provider/subversion.rb +214 -0
  388. data/lib/chef/provider/template.rb +117 -0
  389. data/lib/chef/provider/user.rb +207 -0
  390. data/lib/chef/provider/user/dscl.rb +280 -0
  391. data/lib/chef/provider/user/pw.rb +113 -0
  392. data/lib/chef/provider/user/solaris.rb +90 -0
  393. data/lib/chef/provider/user/useradd.rb +153 -0
  394. data/lib/chef/provider/user/windows.rb +124 -0
  395. data/lib/chef/providers.rb +101 -0
  396. data/lib/chef/recipe.rb +129 -0
  397. data/lib/chef/reserved_names.rb +9 -0
  398. data/lib/chef/resource.rb +912 -0
  399. data/lib/chef/resource/apt_package.rb +43 -0
  400. data/lib/chef/resource/bash.rb +33 -0
  401. data/lib/chef/resource/breakpoint.rb +35 -0
  402. data/lib/chef/resource/chef_gem.rb +53 -0
  403. data/lib/chef/resource/conditional.rb +101 -0
  404. data/lib/chef/resource/cookbook_file.rb +52 -0
  405. data/lib/chef/resource/cron.rb +202 -0
  406. data/lib/chef/resource/csh.rb +33 -0
  407. data/lib/chef/resource/deploy.rb +403 -0
  408. data/lib/chef/resource/deploy_revision.rb +40 -0
  409. data/lib/chef/resource/directory.rb +65 -0
  410. data/lib/chef/resource/dpkg_package.rb +34 -0
  411. data/lib/chef/resource/easy_install_package.rb +57 -0
  412. data/lib/chef/resource/env.rb +63 -0
  413. data/lib/chef/resource/erl_call.rb +86 -0
  414. data/lib/chef/resource/execute.rb +132 -0
  415. data/lib/chef/resource/file.rb +96 -0
  416. data/lib/chef/resource/freebsd_package.rb +35 -0
  417. data/lib/chef/resource/gem_package.rb +53 -0
  418. data/lib/chef/resource/git.rb +46 -0
  419. data/lib/chef/resource/group.rb +83 -0
  420. data/lib/chef/resource/http_request.rb +64 -0
  421. data/lib/chef/resource/ifconfig.rb +149 -0
  422. data/lib/chef/resource/ips_package.rb +42 -0
  423. data/lib/chef/resource/link.rb +92 -0
  424. data/lib/chef/resource/log.rb +74 -0
  425. data/lib/chef/resource/macports_package.rb +29 -0
  426. data/lib/chef/resource/mdadm.rb +105 -0
  427. data/lib/chef/resource/mount.rb +139 -0
  428. data/lib/chef/resource/ohai.rb +54 -0
  429. data/lib/chef/resource/package.rb +84 -0
  430. data/lib/chef/resource/pacman_package.rb +33 -0
  431. data/lib/chef/resource/perl.rb +33 -0
  432. data/lib/chef/resource/portage_package.rb +33 -0
  433. data/lib/chef/resource/python.rb +33 -0
  434. data/lib/chef/resource/remote_directory.rb +125 -0
  435. data/lib/chef/resource/remote_file.rb +90 -0
  436. data/lib/chef/resource/route.rb +140 -0
  437. data/lib/chef/resource/rpm_package.rb +34 -0
  438. data/lib/chef/resource/ruby.rb +33 -0
  439. data/lib/chef/resource/ruby_block.rb +51 -0
  440. data/lib/chef/resource/scm.rb +151 -0
  441. data/lib/chef/resource/script.rb +63 -0
  442. data/lib/chef/resource/service.rb +164 -0
  443. data/lib/chef/resource/smartos_package.rb +36 -0
  444. data/lib/chef/resource/solaris_package.rb +36 -0
  445. data/lib/chef/resource/subversion.rb +37 -0
  446. data/lib/chef/resource/template.rb +76 -0
  447. data/lib/chef/resource/timestamped_deploy.rb +31 -0
  448. data/lib/chef/resource/user.rb +134 -0
  449. data/lib/chef/resource/yum_package.rb +63 -0
  450. data/lib/chef/resource_collection.rb +217 -0
  451. data/lib/chef/resource_collection/stepable_iterator.rb +124 -0
  452. data/lib/chef/resource_definition.rb +67 -0
  453. data/lib/chef/resource_definition_list.rb +38 -0
  454. data/lib/chef/resource_platform_map.rb +151 -0
  455. data/lib/chef/resource_reporter.rb +281 -0
  456. data/lib/chef/resources.rb +67 -0
  457. data/lib/chef/rest.rb +510 -0
  458. data/lib/chef/rest/auth_credentials.rb +73 -0
  459. data/lib/chef/rest/cookie_jar.rb +31 -0
  460. data/lib/chef/rest/rest_request.rb +229 -0
  461. data/lib/chef/role.rb +349 -0
  462. data/lib/chef/run_context.rb +236 -0
  463. data/lib/chef/run_list.rb +165 -0
  464. data/lib/chef/run_list/run_list_expansion.rb +206 -0
  465. data/lib/chef/run_list/run_list_item.rb +99 -0
  466. data/lib/chef/run_list/versioned_recipe_list.rb +68 -0
  467. data/lib/chef/run_status.rb +124 -0
  468. data/lib/chef/runner.rb +95 -0
  469. data/lib/chef/sandbox.rb +153 -0
  470. data/lib/chef/scan_access_control.rb +135 -0
  471. data/lib/chef/search/query.rb +65 -0
  472. data/lib/chef/shef.rb +327 -0
  473. data/lib/chef/shef/ext.rb +591 -0
  474. data/lib/chef/shef/model_wrapper.rb +120 -0
  475. data/lib/chef/shef/shef_rest.rb +28 -0
  476. data/lib/chef/shef/shef_session.rb +296 -0
  477. data/lib/chef/shell_out.rb +6 -0
  478. data/lib/chef/solr_query.rb +187 -0
  479. data/lib/chef/solr_query/lucene.treetop +150 -0
  480. data/lib/chef/solr_query/lucene_nodes.rb +285 -0
  481. data/lib/chef/solr_query/query_transform.rb +65 -0
  482. data/lib/chef/solr_query/solr_http_request.rb +132 -0
  483. data/lib/chef/streaming_cookbook_uploader.rb +201 -0
  484. data/lib/chef/tasks/chef_repo.rake +334 -0
  485. data/lib/chef/util/file_edit.rb +132 -0
  486. data/lib/chef/util/windows.rb +56 -0
  487. data/lib/chef/util/windows/net_group.rb +101 -0
  488. data/lib/chef/util/windows/net_use.rb +121 -0
  489. data/lib/chef/util/windows/net_user.rb +198 -0
  490. data/lib/chef/util/windows/volume.rb +59 -0
  491. data/lib/chef/version.rb +23 -0
  492. data/lib/chef/version_class.rb +70 -0
  493. data/lib/chef/version_constraint.rb +116 -0
  494. data/lib/chef/webui_user.rb +231 -0
  495. data/lib/chef/win32/api.rb +364 -0
  496. data/lib/chef/win32/api/error.rb +921 -0
  497. data/lib/chef/win32/api/file.rb +535 -0
  498. data/lib/chef/win32/api/memory.rb +105 -0
  499. data/lib/chef/win32/api/process.rb +41 -0
  500. data/lib/chef/win32/api/psapi.rb +51 -0
  501. data/lib/chef/win32/api/security.rb +341 -0
  502. data/lib/chef/win32/api/system.rb +192 -0
  503. data/lib/chef/win32/api/unicode.rb +178 -0
  504. data/lib/chef/win32/error.rb +73 -0
  505. data/lib/chef/win32/file.rb +167 -0
  506. data/lib/chef/win32/file/info.rb +100 -0
  507. data/lib/chef/win32/handle.rb +55 -0
  508. data/lib/chef/win32/memory.rb +101 -0
  509. data/lib/chef/win32/process.rb +84 -0
  510. data/lib/chef/win32/security.rb +489 -0
  511. data/lib/chef/win32/security/ace.rb +125 -0
  512. data/lib/chef/win32/security/acl.rb +101 -0
  513. data/lib/chef/win32/security/securable_object.rb +109 -0
  514. data/lib/chef/win32/security/security_descriptor.rb +93 -0
  515. data/lib/chef/win32/security/sid.rb +199 -0
  516. data/lib/chef/win32/security/token.rb +64 -0
  517. data/lib/chef/win32/unicode.rb +43 -0
  518. data/lib/chef/win32/version.rb +119 -0
  519. data/spec/data/bad-config.rb +1 -0
  520. data/spec/data/big_json.json +2 -0
  521. data/spec/data/big_json_plus_one.json +2 -0
  522. data/spec/data/bootstrap/test-hints.erb +12 -0
  523. data/spec/data/bootstrap/test.erb +1 -0
  524. data/spec/data/cb_version_cookbooks/tatft/README.rdoc +3 -0
  525. data/spec/data/cb_version_cookbooks/tatft/attributes/default.rb +1 -0
  526. data/spec/data/cb_version_cookbooks/tatft/definitions/runit_service.rb +1 -0
  527. data/spec/data/cb_version_cookbooks/tatft/files/default/giant_blob.tgz +1 -0
  528. data/spec/data/cb_version_cookbooks/tatft/libraries/ownage.rb +1 -0
  529. data/spec/data/cb_version_cookbooks/tatft/providers/lwp.rb +1 -0
  530. data/spec/data/cb_version_cookbooks/tatft/recipes/default.rb +1 -0
  531. data/spec/data/cb_version_cookbooks/tatft/resources/lwr.rb +1 -0
  532. data/spec/data/cb_version_cookbooks/tatft/templates/default/configuration.erb +0 -0
  533. data/spec/data/checksum/random.txt +1 -0
  534. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-600hhz-0 +1 -0
  535. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-6m8zdk-0 +0 -0
  536. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ahd2gq-0 +1 -0
  537. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-api8ux-0 +1 -0
  538. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-b0r1m1-0 +1 -0
  539. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-bfygsi-0 +1 -0
  540. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-el14l6-0 +1 -0
  541. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ivrl3y-0 +1 -0
  542. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-kkbs85-0 +1 -0
  543. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ory1ux-0 +1 -0
  544. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-pgsq76-0 +1 -0
  545. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ra8uim-0 +1 -0
  546. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t7k1g-0 +1 -0
  547. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t8g0sv-0 +1 -0
  548. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ufy6g3-0 +1 -0
  549. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-x2d6j9-0 +1 -0
  550. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0 +1 -0
  551. data/spec/data/config.rb +6 -0
  552. data/spec/data/cookbooks/angrybash/recipes/default.rb +8 -0
  553. data/spec/data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +2 -0
  554. data/spec/data/cookbooks/apache2/recipes/default.rb +3 -0
  555. data/spec/data/cookbooks/borken/recipes/default.rb +2 -0
  556. data/spec/data/cookbooks/borken/templates/default/borken.erb +2 -0
  557. data/spec/data/cookbooks/chefignore +8 -0
  558. data/spec/data/cookbooks/java/files/default/java.response +2 -0
  559. data/spec/data/cookbooks/openldap/attributes/default.rb +15 -0
  560. data/spec/data/cookbooks/openldap/attributes/smokey.rb +1 -0
  561. data/spec/data/cookbooks/openldap/definitions/client.rb +5 -0
  562. data/spec/data/cookbooks/openldap/definitions/server.rb +5 -0
  563. data/spec/data/cookbooks/openldap/files/default/.dotfile +1 -0
  564. data/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa +1 -0
  565. data/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir +1 -0
  566. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt +3 -0
  567. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt +3 -0
  568. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile +1 -0
  569. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt +3 -0
  570. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt +3 -0
  571. data/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt +3 -0
  572. data/spec/data/cookbooks/openldap/recipes/default.rb +3 -0
  573. data/spec/data/cookbooks/openldap/recipes/gigantor.rb +3 -0
  574. data/spec/data/cookbooks/openldap/recipes/one.rb +15 -0
  575. data/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb +1 -0
  576. data/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb +1 -0
  577. data/spec/data/cookbooks/openldap/templates/default/test.erb +1 -0
  578. data/spec/data/definitions/test.rb +5 -0
  579. data/spec/data/environment-config.rb +5 -0
  580. data/spec/data/fileedit/blank +0 -0
  581. data/spec/data/fileedit/hosts +4 -0
  582. data/spec/data/gems/chef-integration-test-0.1.0.gem +0 -0
  583. data/spec/data/git_bundles/sinatra-test-app-with-callback-files.gitbundle +0 -0
  584. data/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle +0 -0
  585. data/spec/data/git_bundles/sinatra-test-app.gitbundle +0 -0
  586. data/spec/data/kitchen/chefignore +6 -0
  587. data/spec/data/kitchen/openldap/attributes/default.rb +3 -0
  588. data/spec/data/kitchen/openldap/attributes/robinson.rb +3 -0
  589. data/spec/data/kitchen/openldap/definitions/client.rb +3 -0
  590. data/spec/data/kitchen/openldap/definitions/drewbarrymore.rb +3 -0
  591. data/spec/data/kitchen/openldap/recipes/gigantor.rb +3 -0
  592. data/spec/data/kitchen/openldap/recipes/ignoreme.rb +3 -0
  593. data/spec/data/kitchen/openldap/recipes/woot.rb +3 -0
  594. data/spec/data/knife-home/.chef/plugins/knife/example_home_subcommand.rb +0 -0
  595. data/spec/data/knife-site-subcommands/plugins/knife/example_subcommand.rb +0 -0
  596. data/spec/data/knife_subcommand/test_explicit_category.rb +7 -0
  597. data/spec/data/knife_subcommand/test_name_mapping.rb +4 -0
  598. data/spec/data/knife_subcommand/test_yourself.rb +13 -0
  599. data/spec/data/lwrp/providers/buck_passer.rb +3 -0
  600. data/spec/data/lwrp/providers/buck_passer_2.rb +10 -0
  601. data/spec/data/lwrp/providers/embedded_resource_accesses_providers_scope.rb +16 -0
  602. data/spec/data/lwrp/providers/monkey_name_printer.rb +5 -0
  603. data/spec/data/lwrp/providers/paint_drying_watcher.rb +7 -0
  604. data/spec/data/lwrp/providers/thumb_twiddler.rb +7 -0
  605. data/spec/data/lwrp/resources/bar.rb +1 -0
  606. data/spec/data/lwrp/resources/foo.rb +3 -0
  607. data/spec/data/lwrp/resources_with_default_attributes/nodeattr.rb +1 -0
  608. data/spec/data/lwrp_const_scoping/resources/conflict.rb +0 -0
  609. data/spec/data/lwrp_override/providers/buck_passer.rb +10 -0
  610. data/spec/data/lwrp_override/resources/foo.rb +4 -0
  611. data/spec/data/metadata/quick_start/metadata.rb +19 -0
  612. data/spec/data/nodes/default.rb +15 -0
  613. data/spec/data/nodes/test.example.com.rb +17 -0
  614. data/spec/data/nodes/test.rb +15 -0
  615. data/spec/data/object_loader/environments/test.json +5 -0
  616. data/spec/data/object_loader/environments/test.rb +2 -0
  617. data/spec/data/object_loader/environments/test_json_class.json +6 -0
  618. data/spec/data/object_loader/nodes/test.json +5 -0
  619. data/spec/data/object_loader/nodes/test.rb +2 -0
  620. data/spec/data/object_loader/nodes/test_json_class.json +6 -0
  621. data/spec/data/object_loader/roles/test.json +5 -0
  622. data/spec/data/object_loader/roles/test.rb +2 -0
  623. data/spec/data/object_loader/roles/test_json_class.json +6 -0
  624. data/spec/data/old_home_dir/my-dot-emacs +0 -0
  625. data/spec/data/old_home_dir/my-dot-vim +0 -0
  626. data/spec/data/recipes/test.rb +7 -0
  627. data/spec/data/remote_directory_data/remote_dir_file.txt +1 -0
  628. data/spec/data/remote_directory_data/remote_subdirectory/remote_subdir_file.txt +1 -0
  629. data/spec/data/remote_file/nyan_cat.png +0 -0
  630. data/spec/data/run_context/cookbooks/test/attributes/george.rb +1 -0
  631. data/spec/data/run_context/cookbooks/test/definitions/new_animals.rb +9 -0
  632. data/spec/data/run_context/cookbooks/test/definitions/new_cat.rb +5 -0
  633. data/spec/data/run_context/cookbooks/test/recipes/default.rb +5 -0
  634. data/spec/data/run_context/cookbooks/test/recipes/one.rb +7 -0
  635. data/spec/data/run_context/cookbooks/test/recipes/two.rb +7 -0
  636. data/spec/data/run_context/nodes/run_context.rb +5 -0
  637. data/spec/data/search_queries_to_transform.txt +98 -0
  638. data/spec/data/ssl/5e707473.0 +18 -0
  639. data/spec/data/ssl/chef-rspec.cert +27 -0
  640. data/spec/data/ssl/chef-rspec.key +27 -0
  641. data/spec/data/ssl/key.pem +15 -0
  642. data/spec/data/ssl/private_key.pem +27 -0
  643. data/spec/data/ssl/private_key_with_whitespace.pem +32 -0
  644. data/spec/data/templates/seattle.txt +1 -0
  645. data/spec/functional/knife/cookbook_delete_spec.rb +160 -0
  646. data/spec/functional/knife/exec_spec.rb +60 -0
  647. data/spec/functional/knife/ssh_spec.rb +268 -0
  648. data/spec/functional/resource/cookbook_file_spec.rb +75 -0
  649. data/spec/functional/resource/deploy_revision_spec.rb +515 -0
  650. data/spec/functional/resource/directory_spec.rb +39 -0
  651. data/spec/functional/resource/file_spec.rb +69 -0
  652. data/spec/functional/resource/link_spec.rb +572 -0
  653. data/spec/functional/resource/remote_directory_spec.rb +114 -0
  654. data/spec/functional/resource/remote_file_spec.rb +65 -0
  655. data/spec/functional/resource/template_spec.rb +68 -0
  656. data/spec/functional/tiny_server_spec.rb +78 -0
  657. data/spec/rcov.opts +2 -0
  658. data/spec/spec_helper.rb +82 -0
  659. data/spec/stress/win32/file_spec.rb +37 -0
  660. data/spec/stress/win32/memory_spec.rb +22 -0
  661. data/spec/stress/win32/security_spec.rb +69 -0
  662. data/spec/support/chef_helpers.rb +65 -0
  663. data/spec/support/lib/chef/provider/easy.rb +35 -0
  664. data/spec/support/lib/chef/provider/snakeoil.rb +40 -0
  665. data/spec/support/lib/chef/resource/cat.rb +41 -0
  666. data/spec/support/lib/chef/resource/one_two_three_four.rb +43 -0
  667. data/spec/support/lib/chef/resource/zen_master.rb +46 -0
  668. data/spec/support/matchers/leak.rb +96 -0
  669. data/spec/support/mock/constant.rb +52 -0
  670. data/spec/support/mock/platform.rb +18 -0
  671. data/spec/support/platform_helpers.rb +39 -0
  672. data/spec/support/platforms/prof/gc.rb +54 -0
  673. data/spec/support/platforms/prof/win32.rb +46 -0
  674. data/spec/support/shared/functional/directory_resource.rb +85 -0
  675. data/spec/support/shared/functional/file_resource.rb +202 -0
  676. data/spec/support/shared/functional/knife.rb +37 -0
  677. data/spec/support/shared/functional/securable_resource.rb +402 -0
  678. data/spec/support/shared/unit/api_error_inspector.rb +192 -0
  679. data/spec/tiny_server.rb +202 -0
  680. data/spec/unit/api_client_spec.rb +257 -0
  681. data/spec/unit/application/agent_spec.rb +0 -0
  682. data/spec/unit/application/client_spec.rb +171 -0
  683. data/spec/unit/application/knife_spec.rb +152 -0
  684. data/spec/unit/application/server_spec.rb +0 -0
  685. data/spec/unit/application/solo_spec.rb +167 -0
  686. data/spec/unit/application_spec.rb +239 -0
  687. data/spec/unit/certificate_spec.rb +76 -0
  688. data/spec/unit/checksum/storage/filesystem_spec.rb +69 -0
  689. data/spec/unit/checksum_cache_spec.rb +209 -0
  690. data/spec/unit/checksum_spec.rb +94 -0
  691. data/spec/unit/chef_spec.rb +25 -0
  692. data/spec/unit/client_spec.rb +290 -0
  693. data/spec/unit/config_spec.rb +223 -0
  694. data/spec/unit/cookbook/chefignore_spec.rb +39 -0
  695. data/spec/unit/cookbook/metadata_spec.rb +627 -0
  696. data/spec/unit/cookbook/synchronizer_spec.rb +306 -0
  697. data/spec/unit/cookbook/syntax_check_spec.rb +211 -0
  698. data/spec/unit/cookbook_loader_spec.rb +145 -0
  699. data/spec/unit/cookbook_manifest_spec.rb +554 -0
  700. data/spec/unit/cookbook_spec.rb +101 -0
  701. data/spec/unit/cookbook_version_spec.rb +406 -0
  702. data/spec/unit/couchdb_spec.rb +274 -0
  703. data/spec/unit/daemon_spec.rb +302 -0
  704. data/spec/unit/data_bag_item_spec.rb +280 -0
  705. data/spec/unit/data_bag_spec.rb +169 -0
  706. data/spec/unit/encrypted_data_bag_item_spec.rb +293 -0
  707. data/spec/unit/environment_spec.rb +492 -0
  708. data/spec/unit/exceptions_spec.rb +74 -0
  709. data/spec/unit/file_access_control_spec.rb +282 -0
  710. data/spec/unit/file_cache_spec.rb +114 -0
  711. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +202 -0
  712. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +93 -0
  713. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +43 -0
  714. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +27 -0
  715. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +27 -0
  716. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +182 -0
  717. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +93 -0
  718. data/spec/unit/handler/json_file_spec.rb +64 -0
  719. data/spec/unit/handler_spec.rb +216 -0
  720. data/spec/unit/index_queue_spec.rb +391 -0
  721. data/spec/unit/json_compat_spec.rb +61 -0
  722. data/spec/unit/knife/bootstrap_spec.rb +265 -0
  723. data/spec/unit/knife/client_bulk_delete_spec.rb +78 -0
  724. data/spec/unit/knife/client_create_spec.rb +74 -0
  725. data/spec/unit/knife/client_delete_spec.rb +40 -0
  726. data/spec/unit/knife/client_edit_spec.rb +40 -0
  727. data/spec/unit/knife/client_list_spec.rb +34 -0
  728. data/spec/unit/knife/client_reregister_spec.rb +62 -0
  729. data/spec/unit/knife/client_show_spec.rb +42 -0
  730. data/spec/unit/knife/config_file_selection_spec.rb +118 -0
  731. data/spec/unit/knife/configure_client_spec.rb +83 -0
  732. data/spec/unit/knife/configure_spec.rb +229 -0
  733. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +87 -0
  734. data/spec/unit/knife/cookbook_create_spec.rb +271 -0
  735. data/spec/unit/knife/cookbook_delete_spec.rb +239 -0
  736. data/spec/unit/knife/cookbook_download_spec.rb +217 -0
  737. data/spec/unit/knife/cookbook_list_spec.rb +88 -0
  738. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +65 -0
  739. data/spec/unit/knife/cookbook_metadata_spec.rb +172 -0
  740. data/spec/unit/knife/cookbook_show_spec.rb +223 -0
  741. data/spec/unit/knife/cookbook_site_download_spec.rb +151 -0
  742. data/spec/unit/knife/cookbook_site_install_spec.rb +148 -0
  743. data/spec/unit/knife/cookbook_site_share_spec.rb +146 -0
  744. data/spec/unit/knife/cookbook_site_unshare_spec.rb +77 -0
  745. data/spec/unit/knife/cookbook_test_spec.rb +83 -0
  746. data/spec/unit/knife/cookbook_upload_spec.rb +148 -0
  747. data/spec/unit/knife/core/bootstrap_context_spec.rb +135 -0
  748. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +187 -0
  749. data/spec/unit/knife/core/object_loader_spec.rb +81 -0
  750. data/spec/unit/knife/core/subcommand_loader_spec.rb +54 -0
  751. data/spec/unit/knife/core/ui_spec.rb +160 -0
  752. data/spec/unit/knife/data_bag_create_spec.rb +101 -0
  753. data/spec/unit/knife/data_bag_edit_spec.rb +96 -0
  754. data/spec/unit/knife/data_bag_from_file_spec.rb +198 -0
  755. data/spec/unit/knife/data_bag_show_spec.rb +105 -0
  756. data/spec/unit/knife/environment_create_spec.rb +91 -0
  757. data/spec/unit/knife/environment_delete_spec.rb +71 -0
  758. data/spec/unit/knife/environment_edit_spec.rb +79 -0
  759. data/spec/unit/knife/environment_from_file_spec.rb +89 -0
  760. data/spec/unit/knife/environment_list_spec.rb +54 -0
  761. data/spec/unit/knife/environment_show_spec.rb +52 -0
  762. data/spec/unit/knife/index_rebuild_spec.rb +65 -0
  763. data/spec/unit/knife/knife_help.rb +92 -0
  764. data/spec/unit/knife/node_bulk_delete_spec.rb +97 -0
  765. data/spec/unit/knife/node_delete_spec.rb +68 -0
  766. data/spec/unit/knife/node_edit_spec.rb +88 -0
  767. data/spec/unit/knife/node_from_file_spec.rb +59 -0
  768. data/spec/unit/knife/node_list_spec.rb +63 -0
  769. data/spec/unit/knife/node_run_list_add_spec.rb +125 -0
  770. data/spec/unit/knife/node_run_list_remove_spec.rb +73 -0
  771. data/spec/unit/knife/node_show_spec.rb +48 -0
  772. data/spec/unit/knife/role_bulk_delete_spec.rb +80 -0
  773. data/spec/unit/knife/role_create_spec.rb +80 -0
  774. data/spec/unit/knife/role_delete_spec.rb +67 -0
  775. data/spec/unit/knife/role_edit_spec.rb +79 -0
  776. data/spec/unit/knife/role_from_file_spec.rb +69 -0
  777. data/spec/unit/knife/role_list_spec.rb +56 -0
  778. data/spec/unit/knife/ssh_spec.rb +293 -0
  779. data/spec/unit/knife/status_spec.rb +43 -0
  780. data/spec/unit/knife/tag_create_spec.rb +23 -0
  781. data/spec/unit/knife/tag_delete_spec.rb +25 -0
  782. data/spec/unit/knife/tag_list_spec.rb +23 -0
  783. data/spec/unit/knife_spec.rb +295 -0
  784. data/spec/unit/log_spec.rb +24 -0
  785. data/spec/unit/lwrp_spec.rb +256 -0
  786. data/spec/unit/mash_spec.rb +51 -0
  787. data/spec/unit/mixin/checksum_spec.rb +41 -0
  788. data/spec/unit/mixin/command_spec.rb +105 -0
  789. data/spec/unit/mixin/convert_to_class_name_spec.rb +50 -0
  790. data/spec/unit/mixin/deep_merge_spec.rb +786 -0
  791. data/spec/unit/mixin/deprecation_spec.rb +34 -0
  792. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +90 -0
  793. data/spec/unit/mixin/language_spec.rb +305 -0
  794. data/spec/unit/mixin/params_validate_spec.rb +405 -0
  795. data/spec/unit/mixin/path_sanity_spec.rb +80 -0
  796. data/spec/unit/mixin/securable_spec.rb +254 -0
  797. data/spec/unit/mixin/shell_out_spec.rb +109 -0
  798. data/spec/unit/mixin/template_spec.rb +104 -0
  799. data/spec/unit/mixin/xml_escape_spec.rb +54 -0
  800. data/spec/unit/monkey_patches/string_spec.rb +37 -0
  801. data/spec/unit/node/attribute_spec.rb +1033 -0
  802. data/spec/unit/node_spec.rb +744 -0
  803. data/spec/unit/openid_registration_spec.rb +153 -0
  804. data/spec/unit/platform_spec.rb +241 -0
  805. data/spec/unit/provider/breakpoint_spec.rb +54 -0
  806. data/spec/unit/provider/cookbook_file_spec.rb +218 -0
  807. data/spec/unit/provider/cron/solaris_spec.rb +121 -0
  808. data/spec/unit/provider/cron_spec.rb +812 -0
  809. data/spec/unit/provider/deploy/revision_spec.rb +103 -0
  810. data/spec/unit/provider/deploy/timestamped_spec.rb +40 -0
  811. data/spec/unit/provider/deploy_spec.rb +620 -0
  812. data/spec/unit/provider/directory_spec.rb +156 -0
  813. data/spec/unit/provider/env_spec.rb +232 -0
  814. data/spec/unit/provider/erl_call_spec.rb +86 -0
  815. data/spec/unit/provider/execute_spec.rb +63 -0
  816. data/spec/unit/provider/file_spec.rb +505 -0
  817. data/spec/unit/provider/git_spec.rb +342 -0
  818. data/spec/unit/provider/group/dscl_spec.rb +294 -0
  819. data/spec/unit/provider/group/gpasswd_spec.rb +108 -0
  820. data/spec/unit/provider/group/groupadd_spec.rb +161 -0
  821. data/spec/unit/provider/group/groupmod_spec.rb +134 -0
  822. data/spec/unit/provider/group/pw_spec.rb +140 -0
  823. data/spec/unit/provider/group/usermod_spec.rb +95 -0
  824. data/spec/unit/provider/group/windows_spec.rb +94 -0
  825. data/spec/unit/provider/group_spec.rb +259 -0
  826. data/spec/unit/provider/http_request_spec.rb +178 -0
  827. data/spec/unit/provider/ifconfig_spec.rb +213 -0
  828. data/spec/unit/provider/link_spec.rb +252 -0
  829. data/spec/unit/provider/log_spec.rb +81 -0
  830. data/spec/unit/provider/mdadm_spec.rb +128 -0
  831. data/spec/unit/provider/mount/mount_spec.rb +398 -0
  832. data/spec/unit/provider/mount/windows_spec.rb +134 -0
  833. data/spec/unit/provider/mount_spec.rb +160 -0
  834. data/spec/unit/provider/ohai_spec.rb +85 -0
  835. data/spec/unit/provider/package/apt_spec.rb +352 -0
  836. data/spec/unit/provider/package/dpkg_spec.rb +216 -0
  837. data/spec/unit/provider/package/easy_install_spec.rb +112 -0
  838. data/spec/unit/provider/package/freebsd_spec.rb +259 -0
  839. data/spec/unit/provider/package/ips_spec.rb +210 -0
  840. data/spec/unit/provider/package/macports_spec.rb +203 -0
  841. data/spec/unit/provider/package/pacman_spec.rb +206 -0
  842. data/spec/unit/provider/package/portage_spec.rb +320 -0
  843. data/spec/unit/provider/package/rpm_spec.rb +152 -0
  844. data/spec/unit/provider/package/rubygems_spec.rb +639 -0
  845. data/spec/unit/provider/package/smartos_spec.rb +83 -0
  846. data/spec/unit/provider/package/solaris_spec.rb +181 -0
  847. data/spec/unit/provider/package/yum_spec.rb +1856 -0
  848. data/spec/unit/provider/package/zypper_spec.rb +159 -0
  849. data/spec/unit/provider/package_spec.rb +427 -0
  850. data/spec/unit/provider/remote_directory_spec.rb +222 -0
  851. data/spec/unit/provider/remote_file_spec.rb +288 -0
  852. data/spec/unit/provider/route_spec.rb +226 -0
  853. data/spec/unit/provider/ruby_block_spec.rb +38 -0
  854. data/spec/unit/provider/script_spec.rb +96 -0
  855. data/spec/unit/provider/service/arch_service_spec.rb +330 -0
  856. data/spec/unit/provider/service/debian_service_spec.rb +254 -0
  857. data/spec/unit/provider/service/freebsd_service_spec.rb +379 -0
  858. data/spec/unit/provider/service/gentoo_service_spec.rb +144 -0
  859. data/spec/unit/provider/service/init_service_spec.rb +212 -0
  860. data/spec/unit/provider/service/insserv_service_spec.rb +76 -0
  861. data/spec/unit/provider/service/invokercd_service_spec.rb +212 -0
  862. data/spec/unit/provider/service/macosx_spec.rb +229 -0
  863. data/spec/unit/provider/service/redhat_spec.rb +156 -0
  864. data/spec/unit/provider/service/simple_service_spec.rb +171 -0
  865. data/spec/unit/provider/service/solaris_smf_service_spec.rb +140 -0
  866. data/spec/unit/provider/service/systemd_service_spec.rb +239 -0
  867. data/spec/unit/provider/service/upstart_service_spec.rb +314 -0
  868. data/spec/unit/provider/service/windows_spec.rb +235 -0
  869. data/spec/unit/provider/service_spec.rb +169 -0
  870. data/spec/unit/provider/subversion_spec.rb +281 -0
  871. data/spec/unit/provider/template_spec.rb +196 -0
  872. data/spec/unit/provider/user/dscl_spec.rb +454 -0
  873. data/spec/unit/provider/user/pw_spec.rb +235 -0
  874. data/spec/unit/provider/user/solaris_spec.rb +414 -0
  875. data/spec/unit/provider/user/useradd_spec.rb +386 -0
  876. data/spec/unit/provider/user/windows_spec.rb +178 -0
  877. data/spec/unit/provider/user_spec.rb +468 -0
  878. data/spec/unit/provider_spec.rb +169 -0
  879. data/spec/unit/recipe_spec.rb +268 -0
  880. data/spec/unit/resource/apt_package_spec.rb +43 -0
  881. data/spec/unit/resource/bash_spec.rb +40 -0
  882. data/spec/unit/resource/breakpoint_spec.rb +43 -0
  883. data/spec/unit/resource/chef_gem_spec.rb +49 -0
  884. data/spec/unit/resource/conditional_spec.rb +147 -0
  885. data/spec/unit/resource/cookbook_file_spec.rb +89 -0
  886. data/spec/unit/resource/cron_spec.rb +181 -0
  887. data/spec/unit/resource/csh_spec.rb +40 -0
  888. data/spec/unit/resource/deploy_revision_spec.rb +47 -0
  889. data/spec/unit/resource/deploy_spec.rb +259 -0
  890. data/spec/unit/resource/directory_spec.rb +82 -0
  891. data/spec/unit/resource/dpkg_package_spec.rb +38 -0
  892. data/spec/unit/resource/easy_install_package_spec.rb +48 -0
  893. data/spec/unit/resource/env_spec.rb +85 -0
  894. data/spec/unit/resource/erl_call_spec.rb +81 -0
  895. data/spec/unit/resource/execute_spec.rb +124 -0
  896. data/spec/unit/resource/file_spec.rb +121 -0
  897. data/spec/unit/resource/freebsd_package_spec.rb +39 -0
  898. data/spec/unit/resource/gem_package_spec.rb +49 -0
  899. data/spec/unit/resource/git_spec.rb +46 -0
  900. data/spec/unit/resource/group_spec.rb +148 -0
  901. data/spec/unit/resource/http_request_spec.rb +59 -0
  902. data/spec/unit/resource/ifconfig_spec.rb +46 -0
  903. data/spec/unit/resource/ips_package_spec.rb +43 -0
  904. data/spec/unit/resource/link_spec.rb +118 -0
  905. data/spec/unit/resource/log_spec.rb +70 -0
  906. data/spec/unit/resource/macports_package_spec.rb +37 -0
  907. data/spec/unit/resource/mdadm_spec.rb +102 -0
  908. data/spec/unit/resource/mount_spec.rb +158 -0
  909. data/spec/unit/resource/ohai_spec.rb +62 -0
  910. data/spec/unit/resource/package_spec.rb +80 -0
  911. data/spec/unit/resource/pacman_package_spec.rb +38 -0
  912. data/spec/unit/resource/perl_spec.rb +40 -0
  913. data/spec/unit/resource/portage_package_spec.rb +38 -0
  914. data/spec/unit/resource/python_spec.rb +40 -0
  915. data/spec/unit/resource/remote_directory_spec.rb +97 -0
  916. data/spec/unit/resource/remote_file_spec.rb +125 -0
  917. data/spec/unit/resource/route_spec.rb +107 -0
  918. data/spec/unit/resource/rpm_package_spec.rb +38 -0
  919. data/spec/unit/resource/ruby_block_spec.rb +57 -0
  920. data/spec/unit/resource/ruby_spec.rb +40 -0
  921. data/spec/unit/resource/scm_spec.rb +159 -0
  922. data/spec/unit/resource/script_spec.rb +69 -0
  923. data/spec/unit/resource/service_spec.rb +165 -0
  924. data/spec/unit/resource/smartos_package_spec.rb +38 -0
  925. data/spec/unit/resource/subversion_spec.rb +58 -0
  926. data/spec/unit/resource/template_spec.rb +108 -0
  927. data/spec/unit/resource/timestamped_deploy_spec.rb +28 -0
  928. data/spec/unit/resource/user_spec.rb +122 -0
  929. data/spec/unit/resource/yum_package_spec.rb +85 -0
  930. data/spec/unit/resource_collection/stepable_iterator_spec.rb +144 -0
  931. data/spec/unit/resource_collection_spec.rb +257 -0
  932. data/spec/unit/resource_definition_spec.rb +119 -0
  933. data/spec/unit/resource_platform_map_spec.rb +164 -0
  934. data/spec/unit/resource_reporter_spec.rb +591 -0
  935. data/spec/unit/resource_spec.rb +721 -0
  936. data/spec/unit/rest/auth_credentials_spec.rb +431 -0
  937. data/spec/unit/rest_spec.rb +644 -0
  938. data/spec/unit/role_spec.rb +275 -0
  939. data/spec/unit/run_context_spec.rb +64 -0
  940. data/spec/unit/run_list/run_list_expansion_spec.rb +129 -0
  941. data/spec/unit/run_list/run_list_item_spec.rb +117 -0
  942. data/spec/unit/run_list/versioned_recipe_list_spec.rb +123 -0
  943. data/spec/unit/run_list_spec.rb +521 -0
  944. data/spec/unit/run_status_spec.rb +145 -0
  945. data/spec/unit/runner_spec.rb +303 -0
  946. data/spec/unit/scan_access_control_spec.rb +182 -0
  947. data/spec/unit/search/query_spec.rb +99 -0
  948. data/spec/unit/shef/model_wrapper_spec.rb +97 -0
  949. data/spec/unit/shef/shef_ext_spec.rb +153 -0
  950. data/spec/unit/shef/shef_session_spec.rb +154 -0
  951. data/spec/unit/shef_spec.rb +161 -0
  952. data/spec/unit/solr_query/query_transform_spec.rb +454 -0
  953. data/spec/unit/solr_query/solr_http_request_spec.rb +244 -0
  954. data/spec/unit/solr_query_spec.rb +203 -0
  955. data/spec/unit/util/file_edit_spec.rb +135 -0
  956. data/spec/unit/version_class_spec.rb +172 -0
  957. data/spec/unit/version_constraint_spec.rb +134 -0
  958. data/spec/unit/webui_user_spec.rb +238 -0
  959. data/tasks/rspec.rb +75 -0
  960. metadata +1548 -0
@@ -0,0 +1,364 @@
1
+ #
2
+ # Author:: Seth Chisamore (<schisamo@opscode.com>)
3
+ # Author:: John Keiser (<jkeiser@opscode.com>)
4
+ # Copyright:: Copyright 2011 Opscode, Inc.
5
+ # License:: Apache License, Version 2.0
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+
20
+ require 'ffi'
21
+ require 'chef/reserved_names'
22
+ require 'chef/exceptions'
23
+
24
+ class Chef
25
+ module ReservedNames::Win32
26
+ module API
27
+
28
+ # Attempts to use FFI's attach_function method to link a native Win32
29
+ # function into the calling module. If this fails a dummy method is
30
+ # defined which when called, raises a helpful exception to the end-user.
31
+ def safe_attach_function(win32_func, *args)
32
+ begin
33
+ attach_function(win32_func.to_sym, *args)
34
+ rescue FFI::NotFoundError
35
+ define_method(win32_func.to_sym) do |*margs|
36
+ raise Chef::Exceptions::Win32APIFunctionNotImplemented, "This version of Windows does not implement the Win32 function [#{win32_func}]."
37
+ end
38
+ end
39
+ end
40
+
41
+ # put shared stuff (like constants) for all raw Win32 API calls
42
+ def self.extended(host)
43
+ host.extend FFI::Library
44
+ host.extend Macros
45
+
46
+ host.ffi_convention :stdcall
47
+
48
+ # Windows-specific type defs (ms-help://MS.MSDNQTR.v90.en/winprog/winprog/windows_data_types.htm):
49
+ host.typedef :ushort, :ATOM # Atom ~= Symbol: Atom table stores strings and corresponding identifiers. Application
50
+ # places a string in an atom table and receives a 16-bit integer, called an atom, that
51
+ # can be used to access the string. Placed string is called an atom name.
52
+ # See: http://msdn.microsoft.com/en-us/library/ms648708%28VS.85%29.aspx
53
+ host.typedef :bool, :BOOL
54
+ host.typedef :bool, :BOOLEAN
55
+ host.typedef :uchar, :BYTE # Byte (8 bits). Declared as unsigned char
56
+ #CALLBACK: K, # Win32.API gem-specific ?? MSDN: #define CALLBACK __stdcall
57
+ host.typedef :char, :CHAR # 8-bit Windows (ANSI) character. See http://msdn.microsoft.com/en-us/library/dd183415%28VS.85%29.aspx
58
+ host.typedef :uint32, :COLORREF # Red, green, blue (RGB) color value (32 bits). See COLORREF for more info.
59
+ host.typedef :uint32, :DWORD # 32-bit unsigned integer. The range is 0 through 4,294,967,295 decimal.
60
+ host.typedef :uint64, :DWORDLONG # 64-bit unsigned integer. The range is 0 through 18,446,744,073,709,551,615 decimal.
61
+ host.typedef :ulong, :DWORD_PTR # Unsigned long type for pointer precision. Use when casting a pointer to a long type
62
+ # to perform pointer arithmetic. (Also commonly used for general 32-bit parameters that have
63
+ # been extended to 64 bits in 64-bit Windows.) BaseTsd.h: #host.typedef ULONG_PTR DWORD_PTR;
64
+ host.typedef :uint32, :DWORD32
65
+ host.typedef :uint64, :DWORD64
66
+ host.typedef :int, :HALF_PTR # Half the size of a pointer. Use within a structure that contains a pointer and two small fields.
67
+ # BaseTsd.h: #ifdef (_WIN64) host.typedef int HALF_PTR; #else host.typedef short HALF_PTR;
68
+ host.typedef :ulong, :HACCEL # (L) Handle to an accelerator table. WinDef.h: #host.typedef HANDLE HACCEL;
69
+ # See http://msdn.microsoft.com/en-us/library/ms645526%28VS.85%29.aspx
70
+ host.typedef :ulong, :HANDLE # (L) Handle to an object. WinNT.h: #host.typedef PVOID HANDLE;
71
+ # todo: Platform-dependent! Need to change to :uint64 for Win64
72
+ host.typedef :ulong, :HBITMAP # (L) Handle to a bitmap: http://msdn.microsoft.com/en-us/library/dd183377%28VS.85%29.aspx
73
+ host.typedef :ulong, :HBRUSH # (L) Handle to a brush. http://msdn.microsoft.com/en-us/library/dd183394%28VS.85%29.aspx
74
+ host.typedef :ulong, :HCOLORSPACE # (L) Handle to a color space. http://msdn.microsoft.com/en-us/library/ms536546%28VS.85%29.aspx
75
+ host.typedef :ulong, :HCURSOR # (L) Handle to a cursor. http://msdn.microsoft.com/en-us/library/ms646970%28VS.85%29.aspx
76
+ host.typedef :ulong, :HCONV # (L) Handle to a dynamic data exchange (DDE) conversation.
77
+ host.typedef :ulong, :HCONVLIST # (L) Handle to a DDE conversation list. HANDLE - L ?
78
+ host.typedef :ulong, :HDDEDATA # (L) Handle to DDE data (structure?)
79
+ host.typedef :ulong, :HDC # (L) Handle to a device context (DC). http://msdn.microsoft.com/en-us/library/dd183560%28VS.85%29.aspx
80
+ host.typedef :ulong, :HDESK # (L) Handle to a desktop. http://msdn.microsoft.com/en-us/library/ms682573%28VS.85%29.aspx
81
+ host.typedef :ulong, :HDROP # (L) Handle to an internal drop structure.
82
+ host.typedef :ulong, :HDWP # (L) Handle to a deferred window position structure.
83
+ host.typedef :ulong, :HENHMETAFILE #(L) Handle to an enhanced metafile. http://msdn.microsoft.com/en-us/library/dd145051%28VS.85%29.aspx
84
+ host.typedef :uint, :HFILE # (I) Special file handle to a file opened by OpenFile, not CreateFile.
85
+ # WinDef.h: #host.typedef int HFILE;
86
+ host.typedef :ulong, :HFONT # (L) Handle to a font. http://msdn.microsoft.com/en-us/library/dd162470%28VS.85%29.aspx
87
+ host.typedef :ulong, :HGDIOBJ # (L) Handle to a GDI object.
88
+ host.typedef :ulong, :HGLOBAL # (L) Handle to a global memory block.
89
+ host.typedef :ulong, :HHOOK # (L) Handle to a hook. http://msdn.microsoft.com/en-us/library/ms632589%28VS.85%29.aspx
90
+ host.typedef :ulong, :HICON # (L) Handle to an icon. http://msdn.microsoft.com/en-us/library/ms646973%28VS.85%29.aspx
91
+ host.typedef :ulong, :HINSTANCE # (L) Handle to an instance. This is the base address of the module in memory.
92
+ # HMODULE and HINSTANCE are the same today, but were different in 16-bit Windows.
93
+ host.typedef :ulong, :HKEY # (L) Handle to a registry key.
94
+ host.typedef :ulong, :HKL # (L) Input locale identifier.
95
+ host.typedef :ulong, :HLOCAL # (L) Handle to a local memory block.
96
+ host.typedef :ulong, :HMENU # (L) Handle to a menu. http://msdn.microsoft.com/en-us/library/ms646977%28VS.85%29.aspx
97
+ host.typedef :ulong, :HMETAFILE # (L) Handle to a metafile. http://msdn.microsoft.com/en-us/library/dd145051%28VS.85%29.aspx
98
+ host.typedef :ulong, :HMODULE # (L) Handle to an instance. Same as HINSTANCE today, but was different in 16-bit Windows.
99
+ host.typedef :ulong, :HMONITOR # (L) Рandle to a display monitor. WinDef.h: if(WINVER >= 0x0500) host.typedef HANDLE HMONITOR;
100
+ host.typedef :ulong, :HPALETTE # (L) Handle to a palette.
101
+ host.typedef :ulong, :HPEN # (L) Handle to a pen. http://msdn.microsoft.com/en-us/library/dd162786%28VS.85%29.aspx
102
+ host.typedef :long, :HRESULT # Return code used by COM interfaces. For more info, Structure of the COM Error Codes.
103
+ # To test an HRESULT value, use the FAILED and SUCCEEDED macros.
104
+ host.typedef :ulong, :HRGN # (L) Handle to a region. http://msdn.microsoft.com/en-us/library/dd162913%28VS.85%29.aspx
105
+ host.typedef :ulong, :HRSRC # (L) Handle to a resource.
106
+ host.typedef :ulong, :HSZ # (L) Handle to a DDE string.
107
+ host.typedef :ulong, :HWINSTA # (L) Handle to a window station. http://msdn.microsoft.com/en-us/library/ms687096%28VS.85%29.aspx
108
+ host.typedef :ulong, :HWND # (L) Handle to a window. http://msdn.microsoft.com/en-us/library/ms632595%28VS.85%29.aspx
109
+ host.typedef :int, :INT # 32-bit signed integer. The range is -2147483648 through 2147483647 decimal.
110
+ host.typedef :int, :INT_PTR # Signed integer type for pointer precision. Use when casting a pointer to an integer
111
+ # to perform pointer arithmetic. BaseTsd.h:
112
+ #if defined(_WIN64) host.typedef __int64 INT_PTR; #else host.typedef int INT_PTR;
113
+ host.typedef :int32, :INT32 # 32-bit signed integer. The range is -2,147,483,648 through +...647 decimal.
114
+ host.typedef :int64, :INT64 # 64-bit signed integer. The range is –9,223,372,036,854,775,808 through +...807
115
+ host.typedef :ushort, :LANGID # Language identifier. For more information, see Locales. WinNT.h: #host.typedef WORD LANGID;
116
+ # See http://msdn.microsoft.com/en-us/library/dd318716%28VS.85%29.aspx
117
+ host.typedef :uint32, :LCID # Locale identifier. For more information, see Locales.
118
+ host.typedef :uint32, :LCTYPE # Locale information type. For a list, see Locale Information Constants.
119
+ host.typedef :uint32, :LGRPID # Language group identifier. For a list, see EnumLanguageGroupLocales.
120
+ host.typedef :long, :LONG # 32-bit signed integer. The range is -2,147,483,648 through +...647 decimal.
121
+ host.typedef :int32, :LONG32 # 32-bit signed integer. The range is -2,147,483,648 through +...647 decimal.
122
+ host.typedef :int64, :LONG64 # 64-bit signed integer. The range is –9,223,372,036,854,775,808 through +...807
123
+ host.typedef :int64, :LONGLONG # 64-bit signed integer. The range is –9,223,372,036,854,775,808 through +...807
124
+ host.typedef :long, :LONG_PTR # Signed long type for pointer precision. Use when casting a pointer to a long to
125
+ # perform pointer arithmetic. BaseTsd.h:
126
+ #if defined(_WIN64) host.typedef __int64 LONG_PTR; #else host.typedef long LONG_PTR;
127
+ host.typedef :long, :LPARAM # Message parameter. WinDef.h as follows: #host.typedef LONG_PTR LPARAM;
128
+ host.typedef :pointer, :LPBOOL # Pointer to a BOOL. WinDef.h as follows: #host.typedef BOOL far *LPBOOL;
129
+ host.typedef :pointer, :LPBYTE # Pointer to a BYTE. WinDef.h as follows: #host.typedef BYTE far *LPBYTE;
130
+ host.typedef :pointer, :LPCOLORREF # Pointer to a COLORREF value. WinDef.h as follows: #host.typedef DWORD *LPCOLORREF;
131
+ host.typedef :pointer, :LPCSTR # Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters.
132
+ # See Character Sets Used By Fonts. http://msdn.microsoft.com/en-us/library/dd183415%28VS.85%29.aspx
133
+ host.typedef :pointer, :LPCTSTR # An LPCWSTR if UNICODE is defined, an LPCSTR otherwise.
134
+ host.typedef :pointer, :LPCVOID # Pointer to a constant of any type. WinDef.h as follows: host.typedef CONST void *LPCVOID;
135
+ host.typedef :pointer, :LPCWSTR # Pointer to a constant null-terminated string of 16-bit Unicode characters.
136
+ host.typedef :pointer, :LPDWORD # Pointer to a DWORD. WinDef.h as follows: host.typedef DWORD *LPDWORD;
137
+ host.typedef :pointer, :LPHANDLE # Pointer to a HANDLE. WinDef.h as follows: host.typedef HANDLE *LPHANDLE;
138
+ host.typedef :pointer, :LPINT # Pointer to an INT.
139
+ host.typedef :pointer, :LPLONG # Pointer to an LONG.
140
+ host.typedef :pointer, :LPSECURITY_ATTRIBUTES # Pointer to SECURITY_ATTRIBUTES struct
141
+ host.typedef :pointer, :LPSTR # Pointer to a null-terminated string of 8-bit Windows (ANSI) characters.
142
+ host.typedef :pointer, :LPTSTR # An LPWSTR if UNICODE is defined, an LPSTR otherwise.
143
+ host.typedef :pointer, :LPVOID # Pointer to any type.
144
+ host.typedef :pointer, :LPWORD # Pointer to a WORD.
145
+ host.typedef :pointer, :LPWSTR # Pointer to a null-terminated string of 16-bit Unicode characters.
146
+ host.typedef :long, :LRESULT # Signed result of message processing. WinDef.h: host.typedef LONG_PTR LRESULT;
147
+ host.typedef :pointer, :LPWIN32_FIND_DATA # Pointer to WIN32_FIND_DATA struct
148
+ host.typedef :pointer, :LPBY_HANDLE_FILE_INFORMATION # Point to a BY_HANDLE_FILE_INFORMATION struct
149
+ host.typedef :pointer, :PBOOL # Pointer to a BOOL.
150
+ host.typedef :pointer, :PBOOLEAN # Pointer to a BOOL.
151
+ host.typedef :pointer, :PBYTE # Pointer to a BYTE.
152
+ host.typedef :pointer, :PCHAR # Pointer to a CHAR.
153
+ host.typedef :pointer, :PCSTR # Pointer to a constant null-terminated string of 8-bit Windows (ANSI) characters.
154
+ host.typedef :pointer, :PCTSTR # A PCWSTR if UNICODE is defined, a PCSTR otherwise.
155
+ host.typedef :pointer, :PCWSTR # Pointer to a constant null-terminated string of 16-bit Unicode characters.
156
+ host.typedef :pointer, :PDWORD # Pointer to a DWORD.
157
+ host.typedef :pointer, :PDWORDLONG # Pointer to a DWORDLONG.
158
+ host.typedef :pointer, :PDWORD_PTR # Pointer to a DWORD_PTR.
159
+ host.typedef :pointer, :PDWORD32 # Pointer to a DWORD32.
160
+ host.typedef :pointer, :PDWORD64 # Pointer to a DWORD64.
161
+ host.typedef :pointer, :PFLOAT # Pointer to a FLOAT.
162
+ host.typedef :pointer, :PHALF_PTR # Pointer to a HALF_PTR.
163
+ host.typedef :pointer, :PHANDLE # Pointer to a HANDLE.
164
+ host.typedef :pointer, :PHKEY # Pointer to an HKEY.
165
+ host.typedef :pointer, :PINT # Pointer to an INT.
166
+ host.typedef :pointer, :PINT_PTR # Pointer to an INT_PTR.
167
+ host.typedef :pointer, :PINT32 # Pointer to an INT32.
168
+ host.typedef :pointer, :PINT64 # Pointer to an INT64.
169
+ host.typedef :pointer, :PLCID # Pointer to an LCID.
170
+ host.typedef :pointer, :PLONG # Pointer to a LONG.
171
+ host.typedef :pointer, :PLONGLONG # Pointer to a LONGLONG.
172
+ host.typedef :pointer, :PLONG_PTR # Pointer to a LONG_PTR.
173
+ host.typedef :pointer, :PLONG32 # Pointer to a LONG32.
174
+ host.typedef :pointer, :PLONG64 # Pointer to a LONG64.
175
+ host.typedef :pointer, :PLUID # Pointer to a LUID.
176
+ host.typedef :pointer, :POINTER_32 # 32-bit pointer. On a 32-bit system, this is a native pointer. On a 64-bit system, this is a truncated 64-bit pointer.
177
+ host.typedef :pointer, :POINTER_64 # 64-bit pointer. On a 64-bit system, this is a native pointer. On a 32-bit system, this is a sign-extended 32-bit pointer.
178
+ host.typedef :pointer, :POINTER_SIGNED # A signed pointer.
179
+ host.typedef :pointer, :POINTER_UNSIGNED # An unsigned pointer.
180
+ host.typedef :pointer, :PSHORT # Pointer to a SHORT.
181
+ host.typedef :pointer, :PSIZE_T # Pointer to a SIZE_T.
182
+ host.typedef :pointer, :PSSIZE_T # Pointer to a SSIZE_T.
183
+ host.typedef :pointer, :PSTR # Pointer to a null-terminated string of 8-bit Windows (ANSI) characters. For more information, see Character Sets Used By Fonts.
184
+ host.typedef :pointer, :PTBYTE # Pointer to a TBYTE.
185
+ host.typedef :pointer, :PTCHAR # Pointer to a TCHAR.
186
+ host.typedef :pointer, :PTSTR # A PWSTR if UNICODE is defined, a PSTR otherwise.
187
+ host.typedef :pointer, :PUCHAR # Pointer to a UCHAR.
188
+ host.typedef :pointer, :PUHALF_PTR # Pointer to a UHALF_PTR.
189
+ host.typedef :pointer, :PUINT # Pointer to a UINT.
190
+ host.typedef :pointer, :PUINT_PTR # Pointer to a UINT_PTR.
191
+ host.typedef :pointer, :PUINT32 # Pointer to a UINT32.
192
+ host.typedef :pointer, :PUINT64 # Pointer to a UINT64.
193
+ host.typedef :pointer, :PULONG # Pointer to a ULONG.
194
+ host.typedef :pointer, :PULONGLONG # Pointer to a ULONGLONG.
195
+ host.typedef :pointer, :PULONG_PTR # Pointer to a ULONG_PTR.
196
+ host.typedef :pointer, :PULONG32 # Pointer to a ULONG32.
197
+ host.typedef :pointer, :PULONG64 # Pointer to a ULONG64.
198
+ host.typedef :pointer, :PUSHORT # Pointer to a USHORT.
199
+ host.typedef :pointer, :PVOID # Pointer to any type.
200
+ host.typedef :pointer, :PWCHAR # Pointer to a WCHAR.
201
+ host.typedef :pointer, :PWORD # Pointer to a WORD.
202
+ host.typedef :pointer, :PWSTR # Pointer to a null- terminated string of 16-bit Unicode characters.
203
+ # For more information, see Character Sets Used By Fonts.
204
+ host.typedef :ulong, :SC_HANDLE # (L) Handle to a service control manager database.
205
+ # See SCM Handles http://msdn.microsoft.com/en-us/library/ms685104%28VS.85%29.aspx
206
+ host.typedef :pointer, :SC_LOCK # Lock to a service control manager database. For more information, see SCM Handles.
207
+ host.typedef :ulong, :SERVICE_STATUS_HANDLE # (L) Handle to a service status value. See SCM Handles.
208
+ host.typedef :short, :SHORT # A 16-bit integer. The range is –32768 through 32767 decimal.
209
+ host.typedef :ulong, :SIZE_T # The maximum number of bytes to which a pointer can point. Use for a count that must span the full range of a pointer.
210
+ host.typedef :long, :SSIZE_T # Signed SIZE_T.
211
+ host.typedef :char, :TBYTE # A WCHAR if UNICODE is defined, a CHAR otherwise.TCHAR:
212
+ # http://msdn.microsoft.com/en-us/library/c426s321%28VS.80%29.aspx
213
+ host.typedef :char, :TCHAR # A WCHAR if UNICODE is defined, a CHAR otherwise.TCHAR:
214
+ host.typedef :uchar, :UCHAR # Unsigned CHAR (8 bit)
215
+ host.typedef :uint, :UHALF_PTR # Unsigned HALF_PTR. Use within a structure that contains a pointer and two small fields.
216
+ host.typedef :uint, :UINT # Unsigned INT. The range is 0 through 4294967295 decimal.
217
+ host.typedef :uint, :UINT_PTR # Unsigned INT_PTR.
218
+ host.typedef :uint32, :UINT32 # Unsigned INT32. The range is 0 through 4294967295 decimal.
219
+ host.typedef :uint64, :UINT64 # Unsigned INT64. The range is 0 through 18446744073709551615 decimal.
220
+ host.typedef :ulong, :ULONG # Unsigned LONG. The range is 0 through 4294967295 decimal.
221
+ host.typedef :ulong_long, :ULONGLONG # 64-bit unsigned integer. The range is 0 through 18446744073709551615 decimal.
222
+ host.typedef :ulong, :ULONG_PTR # Unsigned LONG_PTR.
223
+ host.typedef :uint32, :ULONG32 # Unsigned INT32. The range is 0 through 4294967295 decimal.
224
+ host.typedef :uint64, :ULONG64 # Unsigned LONG64. The range is 0 through 18446744073709551615 decimal.
225
+ host.typedef :pointer, :UNICODE_STRING # Pointer to some string structure??
226
+ host.typedef :ushort, :USHORT # Unsigned SHORT. The range is 0 through 65535 decimal.
227
+ host.typedef :ulong_long, :USN # Update sequence number (USN).
228
+ host.typedef :ushort, :WCHAR # 16-bit Unicode character. For more information, see Character Sets Used By Fonts.
229
+ # In WinNT.h: host.typedef wchar_t WCHAR;
230
+ #WINAPI: K, # Calling convention for system functions. WinDef.h: define WINAPI __stdcall
231
+ host.typedef :ushort, :WORD # 16-bit unsigned integer. The range is 0 through 65535 decimal.
232
+ host.typedef :uint, :WPARAM # Message parameter. WinDef.h as follows: host.typedef UINT_PTR WPARAM;
233
+ end
234
+
235
+ module Macros
236
+
237
+ ###############################################
238
+ # winbase.h
239
+ ###############################################
240
+
241
+ def LocalDiscard(pointer)
242
+ LocalReAlloc(pointer, 0, LMEM_MOVEABLE)
243
+ end
244
+
245
+ ###############################################
246
+ # windef.h
247
+ ###############################################
248
+
249
+ # Creates a WORD value by concatenating the specified values.
250
+ #
251
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632663(v=VS.85).aspx
252
+ def MAKEWORD(low, high)
253
+ ((low & 0xff) | (high & 0xff)) << 8
254
+ end
255
+
256
+ # Creates a LONG value by concatenating the specified values.
257
+ #
258
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632660(v=vs.85).aspx
259
+ def MAKELONG(low, high)
260
+ ((low & 0xffff) | (high & 0xffff)) << 16
261
+ end
262
+
263
+ # Retrieves the low-order word from the specified value.
264
+ #
265
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632659(v=VS.85).aspx
266
+ def LOWORD(l)
267
+ l & 0xffff
268
+ end
269
+
270
+ # Retrieves the high-order word from the specified 32-bit value.
271
+ #
272
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632657(v=VS.85).aspx
273
+ def HIWORD(l)
274
+ l >> 16
275
+ end
276
+
277
+ # Retrieves the low-order byte from the specified value.
278
+ #
279
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632658(v=VS.85).aspx
280
+ def LOBYTE(w)
281
+ w & 0xff
282
+ end
283
+
284
+ # Retrieves the high-order byte from the given 16-bit value.
285
+ #
286
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms632656(v=VS.85).aspx
287
+ def HIBYTE(w)
288
+ w >> 8
289
+ end
290
+
291
+ ###############################################
292
+ # winerror.h
293
+ ###############################################
294
+
295
+ def IS_ERROR(status)
296
+ status >> 31 == 1
297
+ end
298
+
299
+ def MAKE_HRESULT(sev, fac, code)
300
+ sev << 31 | fac << 16 | code
301
+ end
302
+
303
+ def MAKE_SCODE(sev, fac, code)
304
+ sev << 31 | fac << 16 | code
305
+ end
306
+
307
+ def HRESULT_CODE(hr)
308
+ hr & 0xFFFF
309
+ end
310
+
311
+ def HRESULT_FACILITY(hr)
312
+ (hr >> 16) & 0x1fff
313
+ end
314
+
315
+ def HRESULT_FROM_NT(x)
316
+ x | 0x10000000 # FACILITY_NT_BIT
317
+ end
318
+
319
+ def HRESULT_FROM_WIN32(x)
320
+ if x <= 0
321
+ x
322
+ else
323
+ (x & 0x0000FFFF) | (7 << 16) | 0x80000000
324
+ end
325
+ end
326
+
327
+ def HRESULT_SEVERITY(hr)
328
+ (hr >> 31) & 0x1
329
+ end
330
+
331
+ def FAILED(status)
332
+ status < 0
333
+ end
334
+
335
+ def SUCCEEDED(status)
336
+ status >= 0
337
+ end
338
+ end
339
+
340
+ # Represents a 64-bit unsigned integer value.
341
+ #
342
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/aa383742(v=vs.85).aspx
343
+ def make_uint64(low, high)
344
+ low + (high * (2**32))
345
+ end
346
+
347
+ # http://blogs.msdn.com/b/oldnewthing/archive/2009/03/06/9461176.aspx
348
+ # January 1, 1601
349
+ WIN32_EPOC_MINUS_POSIX_EPOC = 116444736000000000
350
+
351
+ # Convert 64-bit FILETIME integer into Time object.
352
+ #
353
+ # FILETIME structure contains a 64-bit value representing the number
354
+ # of 100-nanosecond intervals since January 1, 1601 (UTC).
355
+ #
356
+ # http://msdn.microsoft.com/en-us/library/ms724284(VS.85).aspx
357
+ #
358
+ def wtime_to_time(wtime)
359
+ Time.at((wtime - WIN32_EPOC_MINUS_POSIX_EPOC) / 10000000)
360
+ end
361
+
362
+ end
363
+ end
364
+ end
@@ -0,0 +1,921 @@
1
+ #
2
+ # Author:: John Keiser (<jkeiser@opscode.com>)
3
+ # Copyright:: Copyright 2011 Opscode, Inc.
4
+ # License:: Apache License, Version 2.0
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ require 'chef/win32/api'
20
+
21
+ class Chef
22
+ module ReservedNames::Win32
23
+ module API
24
+ module Error
25
+ extend Chef::ReservedNames::Win32::API
26
+
27
+ ###############################################
28
+ # Win32 API Constants
29
+ ###############################################
30
+
31
+ S_OK = 0
32
+ NO_ERROR = 0
33
+ ERROR_SUCCESS = 0
34
+ ERROR_INVALID_FUNCTION = 1
35
+ ERROR_FILE_NOT_FOUND = 2
36
+ ERROR_PATH_NOT_FOUND = 3
37
+ ERROR_TOO_MANY_OPEN_FILES = 4
38
+ ERROR_ACCESS_DENIED = 5
39
+ ERROR_INVALID_HANDLE = 6
40
+ ERROR_ARENA_TRASHED = 7
41
+ ERROR_NOT_ENOUGH_MEMORY = 8
42
+ ERROR_INVALID_BLOCK = 9
43
+ ERROR_BAD_ENVIRONMENT = 10
44
+ ERROR_BAD_FORMAT = 11
45
+ ERROR_INVALID_ACCESS = 12
46
+ ERROR_INVALID_DATA = 13
47
+ ERROR_INVALID_DRIVE = 15
48
+ ERROR_CURRENT_DIRECTORY = 16
49
+ ERROR_NOT_SAME_DEVICE = 17
50
+ ERROR_NO_MORE_FILES = 18
51
+ ERROR_WRITE_PROTECT = 19
52
+ ERROR_BAD_UNIT = 20
53
+ ERROR_NOT_READY = 21
54
+ ERROR_BAD_COMMAND = 22
55
+ ERROR_CRC = 23
56
+ ERROR_BAD_LENGTH = 24
57
+ ERROR_SEEK = 25
58
+ ERROR_NOT_DOS_DISK = 26
59
+ ERROR_SECTOR_NOT_FOUND = 27
60
+ ERROR_OUT_OF_PAPER = 28
61
+ ERROR_WRITE_FAULT = 29
62
+ ERROR_READ_FAULT = 30
63
+ ERROR_GEN_FAILURE = 31
64
+ ERROR_SHARING_VIOLATION = 32
65
+ ERROR_LOCK_VIOLATION = 33
66
+ ERROR_WRONG_DISK = 34
67
+ ERROR_FCB_UNAVAILABLE = 35 # gets returned for some unsuccessful DeviceIoControl calls
68
+ ERROR_SHARING_BUFFER_EXCEEDED = 36
69
+ ERROR_HANDLE_EOF = 38
70
+ ERROR_HANDLE_DISK_FULL = 39
71
+
72
+ ERROR_NOT_SUPPORTED = 50
73
+ ERROR_REM_NOT_LIST = 51
74
+ ERROR_DUP_NAME = 52
75
+ ERROR_BAD_NETPATH = 53
76
+ ERROR_NETWORK_BUSY = 54
77
+ ERROR_DEV_NOT_EXIST = 55
78
+ ERROR_TOO_MANY_CMDS = 56
79
+ ERROR_ADAP_HDW_ERR = 57
80
+ ERROR_BAD_NET_RESP = 58
81
+ ERROR_UNEXP_NET_ERR = 59
82
+ ERROR_BAD_REM_ADAP = 60
83
+ ERROR_PRINTQ_FULL = 61
84
+ ERROR_NO_SPOOL_SPACE = 62
85
+ ERROR_PRINT_CANCELLED = 63
86
+ ERROR_NETNAME_DELETED = 64
87
+ ERROR_NETWORK_ACCESS_DENIED = 65
88
+ ERROR_BAD_DEV_TYPE = 66
89
+ ERROR_BAD_NET_NAME = 67
90
+ ERROR_TOO_MANY_NAMES = 68
91
+ ERROR_TOO_MANY_SESS = 69
92
+ ERROR_SHARING_PAUSED = 70
93
+ ERROR_REQ_NOT_ACCEP = 71
94
+ ERROR_REDIR_PAUSED = 72
95
+
96
+ ERROR_FILE_EXISTS = 80
97
+ ERROR_DUP_FCB = 81
98
+ ERROR_CANNOT_MAKE = 82
99
+ ERROR_FAIL_I24 = 83
100
+ ERROR_OUT_OF_STRUCTURES = 84
101
+ ERROR_ALREADY_ASSIGNED = 85
102
+ ERROR_INVALID_PASSWORD = 86
103
+ ERROR_INVALID_PARAMETER = 87
104
+ ERROR_NET_WRITE_FAULT = 88
105
+ ERROR_NO_PROC_SLOTS = 89 # no process slots available
106
+ ERROR_NOT_FROZEN = 90
107
+ ERR_TSTOVFL = 91 # timer service table overflow
108
+ ERR_TSTDUP = 92 # timer service table duplicate
109
+ ERROR_NO_ITEMS = 93 # There were no items to operate upon
110
+ ERROR_INTERRUPT = 95 # interrupted system call
111
+
112
+ ERROR_TOO_MANY_SEMAPHORES = 100
113
+ ERROR_EXCL_SEM_ALREADY_OWNED = 101
114
+ ERROR_SEM_IS_SET = 102
115
+ ERROR_TOO_MANY_SEM_REQUESTS = 103
116
+ ERROR_INVALID_AT_INTERRUPT_TIME = 104
117
+ ERROR_SEM_OWNER_DIED = 105 # waitsem found owner died
118
+ ERROR_SEM_USER_LIMIT = 106 # too many procs have this sem
119
+ ERROR_DISK_CHANGE = 107 # insert disk b into drive a
120
+ ERROR_DRIVE_LOCKED = 108 # drive locked by another process
121
+ ERROR_BROKEN_PIPE = 109 # write on pipe with no reader
122
+ ERROR_OPEN_FAILED = 110 # open/created failed
123
+ ERROR_DISK_FULL = 112 # not enough space
124
+ ERROR_NO_MORE_SEARCH_HANDLES = 113 # can't allocate
125
+ ERROR_INVALID_TARGET_HANDLE = 114 # handle in DOSDUPHANDLE is invalid
126
+ ERROR_PROTECTION_VIOLATION = 115 # bad user virtual address
127
+ ERROR_VIOKBD_REQUEST = 116
128
+ ERROR_INVALID_CATEGORY = 117 # category for DEVIOCTL not defined
129
+ ERROR_INVALID_VERIFY_SWITCH = 118 # invalid value
130
+ ERROR_BAD_DRIVER_LEVEL = 119 # DosDevIOCTL not level four
131
+ ERROR_CALL_NOT_IMPLEMENTED = 120
132
+ ERROR_SEM_TIMEOUT = 121 # timeout from semaphore function
133
+ ERROR_INSUFFICIENT_BUFFER = 122
134
+ ERROR_INVALID_NAME = 123 # illegal char or malformed file system name
135
+ ERROR_INVALID_LEVEL = 124 # unimplemented level for info retrieval
136
+ ERROR_NO_VOLUME_LABEL = 125 # no volume label found
137
+ ERROR_MOD_NOT_FOUND = 126 # w_getprocaddr, w_getmodhandle
138
+ ERROR_PROC_NOT_FOUND = 127 # w_getprocaddr
139
+ ERROR_WAIT_NO_CHILDREN = 128 # CWait finds to children
140
+ ERROR_CHILD_NOT_COMPLETE = 129 # CWait children not dead yet
141
+ ERROR_DIRECT_ACCESS_HANDLE = 130 # invalid for direct disk access
142
+ ERROR_NEGATIVE_SEEK = 131 # tried to seek negative offset
143
+ ERROR_SEEK_ON_DEVICE = 132 # tried to seek on device or pipe
144
+ ERROR_IS_JOIN_TARGET = 133
145
+ ERROR_IS_JOINED = 134
146
+ ERROR_IS_SUBSTED = 135
147
+ ERROR_NOT_JOINED = 136
148
+ ERROR_NOT_SUBSTED = 137
149
+ ERROR_JOIN_TO_JOIN = 138
150
+ ERROR_SUBST_TO_SUBST = 139
151
+ ERROR_JOIN_TO_SUBST = 140
152
+ ERROR_SUBST_TO_JOIN = 141
153
+ ERROR_BUSY_DRIVE = 142
154
+ ERROR_SAME_DRIVE = 143
155
+ ERROR_DIR_NOT_ROOT = 144
156
+ ERROR_DIR_NOT_EMPTY = 145
157
+ ERROR_IS_SUBST_PATH = 146
158
+ ERROR_IS_JOIN_PATH = 147
159
+ ERROR_PATH_BUSY = 148
160
+ ERROR_IS_SUBST_TARGET = 149
161
+ ERROR_SYSTEM_TRACE = 150 # system trace error
162
+ ERROR_INVALID_EVENT_COUNT = 151 # DosMuxSemWait errors
163
+ ERROR_TOO_MANY_MUXWAITERS = 152
164
+ ERROR_INVALID_LIST_FORMAT = 153
165
+ ERROR_LABEL_TOO_LONG = 154
166
+ ERROR_TOO_MANY_TCBS = 155
167
+ ERROR_SIGNAL_REFUSED = 156
168
+ ERROR_DISCARDED = 157
169
+ ERROR_NOT_LOCKED = 158
170
+ ERROR_BAD_THREADID_ADDR = 159
171
+ ERROR_BAD_ARGUMENTS = 160
172
+ ERROR_BAD_PATHNAME = 161
173
+ ERROR_SIGNAL_PENDING = 162
174
+ ERROR_UNCERTAIN_MEDIA = 163
175
+ ERROR_MAX_THRDS_REACHED = 164
176
+ ERROR_MONITORS_NOT_SUPPORTED = 165
177
+
178
+ ERROR_LOCK_FAILED = 167
179
+ ERROR_BUSY = 170
180
+ ERROR_CANCEL_VIOLATION = 173
181
+ ERROR_ATOMIC_LOCKS_NOT_SUPPORTED= 174
182
+
183
+ ERROR_INVALID_SEGMENT_NUMBER = 180
184
+ ERROR_INVALID_CALLGATE = 181
185
+ ERROR_INVALID_ORDINAL = 182
186
+ ERROR_ALREADY_EXISTS = 183
187
+ ERROR_NO_CHILD_PROCESS = 184
188
+ ERROR_CHILD_ALIVE_NOWAIT = 185
189
+ ERROR_INVALID_FLAG_NUMBER = 186
190
+ ERROR_SEM_NOT_FOUND = 187
191
+ ERROR_INVALID_STARTING_CODESEG = 188
192
+ ERROR_INVALID_STACKSEG = 189
193
+ ERROR_INVALID_MODULETYPE = 190
194
+ ERROR_INVALID_EXE_SIGNATURE = 191
195
+ ERROR_EXE_MARKED_INVALID = 192
196
+ ERROR_BAD_EXE_FORMAT = 193
197
+ ERROR_ITERATED_DATA_EXCEEDS_64k = 194
198
+ ERROR_INVALID_MINALLOCSIZE = 195
199
+ ERROR_DYNLINK_FROM_INVALID_RING = 196
200
+ ERROR_IOPL_NOT_ENABLED = 197
201
+ ERROR_INVALID_SEGDPL = 198
202
+ ERROR_AUTODATASEG_EXCEEDS_64k = 199
203
+ ERROR_RING2SEG_MUST_BE_MOVABLE = 200
204
+ ERROR_RELOC_CHAIN_XEEDS_SEGLIM = 201
205
+ ERROR_INFLOOP_IN_RELOC_CHAIN = 202
206
+ ERROR_ENVVAR_NOT_FOUND = 203
207
+ ERROR_NOT_CURRENT_CTRY = 204
208
+ ERROR_NO_SIGNAL_SENT = 205
209
+ ERROR_FILENAME_EXCED_RANGE = 206 # if filename > 8.3
210
+ ERROR_RING2_STACK_IN_USE = 207 # for FAPI
211
+ ERROR_META_EXPANSION_TOO_LONG = 208 # if "*a" > 8.3
212
+ ERROR_INVALID_SIGNAL_NUMBER = 209
213
+ ERROR_THREAD_1_INACTIVE = 210
214
+ ERROR_INFO_NOT_AVAIL = 211 #@@ PTM 5550
215
+ ERROR_LOCKED = 212
216
+ ERROR_BAD_DYNALINK = 213 #@@ PTM 5760
217
+ ERROR_TOO_MANY_MODULES = 214
218
+ ERROR_NESTING_NOT_ALLOWED = 215
219
+ ERROR_EXE_MACHINE_TYPE_MISMATCH = 216
220
+
221
+ ERROR_BAD_PIPE = 230
222
+ ERROR_PIPE_BUSY = 231
223
+ ERROR_NO_DATA = 232
224
+ ERROR_PIPE_NOT_CONNECTED = 233
225
+ ERROR_MORE_DATA = 234
226
+
227
+ ERROR_VC_DISCONNECTED = 240
228
+ ERROR_INVALID_EA_NAME = 254
229
+ ERROR_EA_LIST_INCONSISTENT = 255
230
+ ERROR_NO_MORE_ITEMS = 259
231
+ ERROR_CANNOT_COPY = 266
232
+ ERROR_DIRECTORY = 267
233
+ ERROR_EAS_DIDNT_FIT = 275
234
+ ERROR_EA_FILE_CORRUPT = 276
235
+ ERROR_EA_TABLE_FULL = 277
236
+ ERROR_INVALID_EA_HANDLE = 278
237
+ ERROR_EAS_NOT_SUPPORTED = 282
238
+ ERROR_NOT_OWNER = 288
239
+ ERROR_TOO_MANY_POSTS = 298
240
+ ERROR_PARTIAL_COPY = 299
241
+ ERROR_OPLOCK_NOT_GRANTED = 300
242
+ ERROR_INVALID_OPLOCK_PROTOCOL = 301
243
+ ERROR_DISK_TOO_FRAGMENTED = 302
244
+ ERROR_MR_MID_NOT_FOUND = 317
245
+ ERROR_SCOPE_NOT_FOUND = 318
246
+ ERROR_FAIL_NOACTION_REBOOT = 350
247
+ ERROR_FAIL_SHUTDOWN = 351
248
+ ERROR_FAIL_RESTART = 352
249
+ ERROR_MAX_SESSIONS_REACHED = 353
250
+ ERROR_INVALID_ADDRESS = 487
251
+ ERROR_USER_PROFILE_LOAD = 500
252
+ ERROR_ARITHMETIC_OVERFLOW = 534
253
+ ERROR_PIPE_CONNECTED = 535
254
+ ERROR_PIPE_LISTENING = 536
255
+
256
+ ERROR_EA_ACCESS_DENIED = 994
257
+ ERROR_OPERATION_ABORTED = 995
258
+ ERROR_IO_INCOMPLETE = 996
259
+ ERROR_IO_PENDING = 997
260
+ ERROR_NOACCESS = 998
261
+ ERROR_SWAPERROR = 999
262
+
263
+ ERROR_STACK_OVERFLOW = 1001
264
+ ERROR_INVALID_MESSAGE = 1002
265
+ ERROR_CAN_NOT_COMPLETE = 1003
266
+ ERROR_INVALID_FLAGS = 1004
267
+ ERROR_UNRECOGNIZED_VOLUME = 1005
268
+ ERROR_FILE_INVALID = 1006
269
+ ERROR_FULLSCREEN_MODE = 1007
270
+ ERROR_NO_TOKEN = 1008
271
+ ERROR_BADDB = 1009
272
+ ERROR_BADKEY = 1010
273
+ ERROR_CANTOPEN = 1011
274
+ ERROR_CANTREAD = 1012
275
+ ERROR_CANTWRITE = 1013
276
+ ERROR_REGISTRY_RECOVERED = 1014
277
+ ERROR_REGISTRY_CORRUPT = 1015
278
+ ERROR_REGISTRY_IO_FAILED = 1016
279
+ ERROR_NOT_REGISTRY_FILE = 1017
280
+ ERROR_KEY_DELETED = 1018
281
+ ERROR_NO_LOG_SPACE = 1019
282
+ ERROR_KEY_HAS_CHILDREN = 1020
283
+ ERROR_CHILD_MUST_BE_VOLATILE = 1021
284
+ ERROR_NOTIFY_ENUM_DIR = 1022
285
+ ERROR_DEPENDENT_SERVICES_RUNNING = 1051
286
+ ERROR_INVALID_SERVICE_CONTROL = 1052
287
+ ERROR_SERVICE_REQUEST_TIMEOUT = 1053
288
+ ERROR_SERVICE_NO_THREAD = 1054
289
+ ERROR_SERVICE_DATABASE_LOCKED = 1055
290
+ ERROR_SERVICE_ALREADY_RUNNING = 1056
291
+ ERROR_INVALID_SERVICE_ACCOUNT = 1057
292
+ ERROR_SERVICE_DISABLED = 1058
293
+ ERROR_CIRCULAR_DEPENDENCY = 1059
294
+ ERROR_SERVICE_DOES_NOT_EXIST = 1060
295
+ ERROR_SERVICE_CANNOT_ACCEPT_CTRL = 1061
296
+ ERROR_SERVICE_NOT_ACTIVE = 1062
297
+ ERROR_FAILED_SERVICE_CONTROLLER_CONNECT = 1063
298
+ ERROR_EXCEPTION_IN_SERVICE = 1064
299
+ ERROR_DATABASE_DOES_NOT_EXIST = 1065
300
+ ERROR_SERVICE_SPECIFIC_ERROR = 1066
301
+ ERROR_PROCESS_ABORTED = 1067
302
+ ERROR_SERVICE_DEPENDENCY_FAIL = 1068
303
+ ERROR_SERVICE_LOGON_FAILED = 1069
304
+ ERROR_SERVICE_START_HANG = 1070
305
+ ERROR_INVALID_SERVICE_LOCK = 1071
306
+ ERROR_SERVICE_MARKED_FOR_DELETE = 1072
307
+ ERROR_SERVICE_EXISTS = 1073
308
+ ERROR_ALREADY_RUNNING_LKG = 1074
309
+ ERROR_SERVICE_DEPENDENCY_DELETED = 1075
310
+ ERROR_BOOT_ALREADY_ACCEPTED = 1076
311
+ ERROR_SERVICE_NEVER_STARTED = 1077
312
+ ERROR_DUPLICATE_SERVICE_NAME = 1078
313
+ ERROR_DIFFERENT_SERVICE_ACCOUNT = 1079
314
+ ERROR_CANNOT_DETECT_DRIVER_FAILURE = 1080
315
+ ERROR_CANNOT_DETECT_PROCESS_ABORT = 1081
316
+ ERROR_NO_RECOVERY_PROGRAM = 1082
317
+ ERROR_SERVICE_NOT_IN_EXE = 1083
318
+ ERROR_END_OF_MEDIA = 1100
319
+ ERROR_FILEMARK_DETECTED = 1101
320
+ ERROR_BEGINNING_OF_MEDIA = 1102
321
+ ERROR_SETMARK_DETECTED = 1103
322
+ ERROR_NO_DATA_DETECTED = 1104
323
+ ERROR_PARTITION_FAILURE = 1105
324
+ ERROR_INVALID_BLOCK_LENGTH = 1106
325
+ ERROR_DEVICE_NOT_PARTITIONED = 1107
326
+ ERROR_UNABLE_TO_LOCK_MEDIA = 1108
327
+ ERROR_UNABLE_TO_UNLOAD_MEDIA = 1109
328
+ ERROR_MEDIA_CHANGED = 1110
329
+ ERROR_BUS_RESET = 1111
330
+ ERROR_NO_MEDIA_IN_DRIVE = 1112
331
+ ERROR_NO_UNICODE_TRANSLATION = 1113
332
+ ERROR_DLL_INIT_FAILED = 1114
333
+ ERROR_SHUTDOWN_IN_PROGRESS = 1115
334
+ ERROR_NO_SHUTDOWN_IN_PROGRESS = 1116
335
+ ERROR_IO_DEVICE = 1117
336
+ ERROR_SERIAL_NO_DEVICE = 1118
337
+ ERROR_IRQ_BUSY = 1119
338
+ ERROR_MORE_WRITES = 1120
339
+ ERROR_COUNTER_TIMEOUT = 1121
340
+ ERROR_FLOPPY_ID_MARK_NOT_FOUND = 1122
341
+ ERROR_FLOPPY_WRONG_CYLINDER = 1123
342
+ ERROR_FLOPPY_UNKNOWN_ERROR = 1124
343
+ ERROR_FLOPPY_BAD_REGISTERS = 1125
344
+ ERROR_DISK_RECALIBRATE_FAILED = 1126
345
+ ERROR_DISK_OPERATION_FAILED = 1127
346
+ ERROR_DISK_RESET_FAILED = 1128
347
+ ERROR_EOM_OVERFLOW = 1129
348
+ ERROR_NOT_ENOUGH_SERVER_MEMORY = 1130
349
+ ERROR_POSSIBLE_DEADLOCK = 1131
350
+ ERROR_MAPPED_ALIGNMENT = 1132
351
+ ERROR_SET_POWER_STATE_VETOED = 1140
352
+ ERROR_SET_POWER_STATE_FAILED = 1141
353
+ ERROR_TOO_MANY_LINKS = 1142
354
+ ERROR_OLD_WIN_VERSION = 1150
355
+ ERROR_APP_WRONG_OS = 1151
356
+ ERROR_SINGLE_INSTANCE_APP = 1152
357
+ ERROR_RMODE_APP = 1153
358
+ ERROR_INVALID_DLL = 1154
359
+ ERROR_NO_ASSOCIATION = 1155
360
+ ERROR_DDE_FAIL = 1156
361
+ ERROR_DLL_NOT_FOUND = 1157
362
+ ERROR_NO_MORE_USER_HANDLES = 1158
363
+ ERROR_MESSAGE_SYNC_ONLY = 1159
364
+ ERROR_SOURCE_ELEMENT_EMPTY = 1160
365
+ ERROR_DESTINATION_ELEMENT_FULL = 1161
366
+ ERROR_ILLEGAL_ELEMENT_ADDRESS = 1162
367
+ ERROR_MAGAZINE_NOT_PRESENT = 1163
368
+ ERROR_DEVICE_REINITIALIZATION_NEEDED = 1164
369
+ ERROR_DEVICE_REQUIRES_CLEANING = 1165
370
+ ERROR_DEVICE_DOOR_OPEN = 1166
371
+ ERROR_DEVICE_NOT_CONNECTED = 1167
372
+ ERROR_NOT_FOUND = 1168
373
+ ERROR_NO_MATCH = 1169
374
+ ERROR_SET_NOT_FOUND = 1170
375
+ ERROR_POINT_NOT_FOUND = 1171
376
+ ERROR_NO_TRACKING_SERVICE = 1172
377
+ ERROR_NO_VOLUME_ID = 1173
378
+ ERROR_UNABLE_TO_REMOVE_REPLACED = 1175
379
+ ERROR_UNABLE_TO_MOVE_REPLACEMENT = 1176
380
+ ERROR_UNABLE_TO_MOVE_REPLACEMENT_2 = 1177
381
+ ERROR_JOURNAL_DELETE_IN_PROGRESS = 1178
382
+ ERROR_JOURNAL_NOT_ACTIVE = 1179
383
+ ERROR_POTENTIAL_FILE_FOUND = 1180
384
+ ERROR_JOURNAL_ENTRY_DELETED = 1181
385
+ ERROR_BAD_DEVICE = 1200
386
+ ERROR_CONNECTION_UNAVAIL = 1201
387
+ ERROR_DEVICE_ALREADY_REMEMBERED = 1202
388
+ ERROR_NO_NET_OR_BAD_PATH = 1203
389
+ ERROR_BAD_PROVIDER = 1204
390
+ ERROR_CANNOT_OPEN_PROFILE = 1205
391
+ ERROR_BAD_PROFILE = 1206
392
+ ERROR_NOT_CONTAINER = 1207
393
+ ERROR_EXTENDED_ERROR = 1208
394
+ ERROR_INVALID_GROUPNAME = 1209
395
+ ERROR_INVALID_COMPUTERNAME = 1210
396
+ ERROR_INVALID_EVENTNAME = 1211
397
+ ERROR_INVALID_DOMAINNAME = 1212
398
+ ERROR_INVALID_SERVICENAME = 1213
399
+ ERROR_INVALID_NETNAME = 1214
400
+ ERROR_INVALID_SHARENAME = 1215
401
+ ERROR_INVALID_PASSWORDNAME = 1216
402
+ ERROR_INVALID_MESSAGENAME = 1217
403
+ ERROR_INVALID_MESSAGEDEST = 1218
404
+ ERROR_SESSION_CREDENTIAL_CONFLICT = 1219
405
+ ERROR_REMOTE_SESSION_LIMIT_EXCEEDED = 1220
406
+ ERROR_DUP_DOMAINNAME = 1221
407
+ ERROR_NO_NETWORK = 1222
408
+ ERROR_CANCELLED = 1223
409
+ ERROR_USER_MAPPED_FILE = 1224
410
+ ERROR_CONNECTION_REFUSED = 1225
411
+ ERROR_GRACEFUL_DISCONNECT = 1226
412
+ ERROR_ADDRESS_ALREADY_ASSOCIATED = 1227
413
+ ERROR_ADDRESS_NOT_ASSOCIATED = 1228
414
+ ERROR_CONNECTION_INVALID = 1229
415
+ ERROR_CONNECTION_ACTIVE = 1230
416
+ ERROR_NETWORK_UNREACHABLE = 1231
417
+ ERROR_HOST_UNREACHABLE = 1232
418
+ ERROR_PROTOCOL_UNREACHABLE = 1233
419
+ ERROR_PORT_UNREACHABLE = 1234
420
+ ERROR_REQUEST_ABORTED = 1235
421
+ ERROR_CONNECTION_ABORTED = 1236
422
+ ERROR_RETRY = 1237
423
+ ERROR_CONNECTION_COUNT_LIMIT = 1238
424
+ ERROR_LOGIN_TIME_RESTRICTION = 1239
425
+ ERROR_LOGIN_WKSTA_RESTRICTION = 1240
426
+ ERROR_INCORRECT_ADDRESS = 1241
427
+ ERROR_ALREADY_REGISTERED = 1242
428
+ ERROR_SERVICE_NOT_FOUND = 1243
429
+ ERROR_NOT_AUTHENTICATED = 1244
430
+ ERROR_NOT_LOGGED_ON = 1245
431
+ ERROR_CONTINUE = 1246
432
+ ERROR_ALREADY_INITIALIZED = 1247
433
+ ERROR_NO_MORE_DEVICES = 1248
434
+ ERROR_NO_SUCH_SITE = 1249
435
+ ERROR_DOMAIN_CONTROLLER_EXISTS = 1250
436
+ ERROR_ONLY_IF_CONNECTED = 1251
437
+ ERROR_OVERRIDE_NOCHANGES = 1252
438
+ ERROR_BAD_USER_PROFILE = 1253
439
+ ERROR_NOT_SUPPORTED_ON_SBS = 1254
440
+ ERROR_SERVER_SHUTDOWN_IN_PROGRESS = 1255
441
+ ERROR_HOST_DOWN = 1256
442
+ ERROR_ACCESS_DISABLED_BY_POLICY = 1260
443
+ ERROR_REG_NAT_CONSUMPTION = 1261
444
+ ERROR_PKINIT_FAILURE = 1263
445
+ ERROR_SMARTCARD_SUBSYSTEM_FAILURE = 1264
446
+ ERROR_DOWNGRADE_DETECTED = 1265
447
+ ERROR_MACHINE_LOCKED = 1271
448
+ ERROR_CALLBACK_SUPPLIED_INVALID_DATA = 1273
449
+ ERROR_SYNC_FOREGROUND_REFRESH_REQUIRED= 1274
450
+ ERROR_DRIVER_BLOCKED = 1275
451
+ ERROR_INVALID_IMPORT_OF_NON_DLL = 1276
452
+ ERROR_NOT_ALL_ASSIGNED = 1300
453
+ ERROR_SOME_NOT_MAPPED = 1301
454
+ ERROR_NO_QUOTAS_FOR_ACCOUNT = 1302
455
+ ERROR_LOCAL_USER_SESSION_KEY = 1303
456
+ ERROR_NULL_LM_PASSWORD = 1304
457
+ ERROR_UNKNOWN_REVISION = 1305
458
+ ERROR_REVISION_MISMATCH = 1306
459
+ ERROR_INVALID_OWNER = 1307
460
+ ERROR_INVALID_PRIMARY_GROUP = 1308
461
+ ERROR_NO_IMPERSONATION_TOKEN = 1309
462
+ ERROR_CANT_DISABLE_MANDATORY = 1310
463
+ ERROR_NO_LOGON_SERVERS = 1311
464
+ ERROR_NO_SUCH_LOGON_SESSION = 1312
465
+ ERROR_NO_SUCH_PRIVILEGE = 1313
466
+ ERROR_PRIVILEGE_NOT_HELD = 1314
467
+ ERROR_INVALID_ACCOUNT_NAME = 1315
468
+ ERROR_USER_EXISTS = 1316
469
+ ERROR_NO_SUCH_USER = 1317
470
+ ERROR_GROUP_EXISTS = 1318
471
+ ERROR_NO_SUCH_GROUP = 1319
472
+ ERROR_MEMBER_IN_GROUP = 1320
473
+ ERROR_MEMBER_NOT_IN_GROUP = 1321
474
+ ERROR_LAST_ADMIN = 1322
475
+ ERROR_WRONG_PASSWORD = 1323
476
+ ERROR_ILL_FORMED_PASSWORD = 1324
477
+ ERROR_PASSWORD_RESTRICTION = 1325
478
+ ERROR_LOGON_FAILURE = 1326
479
+ ERROR_ACCOUNT_RESTRICTION = 1327
480
+ ERROR_INVALID_LOGON_HOURS = 1328
481
+ ERROR_INVALID_WORKSTATION = 1329
482
+ ERROR_PASSWORD_EXPIRED = 1330
483
+ ERROR_ACCOUNT_DISABLED = 1331
484
+ ERROR_NONE_MAPPED = 1332
485
+ ERROR_TOO_MANY_LUIDS_REQUESTED = 1333
486
+ ERROR_LUIDS_EXHAUSTED = 1334
487
+ ERROR_INVALID_SUB_AUTHORITY = 1335
488
+ ERROR_INVALID_ACL = 1336
489
+ ERROR_INVALID_SID = 1337
490
+ ERROR_INVALID_SECURITY_DESCR = 1338
491
+ ERROR_BAD_INHERITANCE_ACL = 1340
492
+ ERROR_SERVER_DISABLED = 1341
493
+ ERROR_SERVER_NOT_DISABLED = 1342
494
+ ERROR_INVALID_ID_AUTHORITY = 1343
495
+ ERROR_ALLOTTED_SPACE_EXCEEDED = 1344
496
+ ERROR_INVALID_GROUP_ATTRIBUTES = 1345
497
+ ERROR_BAD_IMPERSONATION_LEVEL = 1346
498
+ ERROR_CANT_OPEN_ANONYMOUS = 1347
499
+ ERROR_BAD_VALIDATION_CLASS = 1348
500
+ ERROR_BAD_TOKEN_TYPE = 1349
501
+ ERROR_NO_SECURITY_ON_OBJECT = 1350
502
+ ERROR_CANT_ACCESS_DOMAIN_INFO = 1351
503
+ ERROR_INVALID_SERVER_STATE = 1352
504
+ ERROR_INVALID_DOMAIN_STATE = 1353
505
+ ERROR_INVALID_DOMAIN_ROLE = 1354
506
+ ERROR_NO_SUCH_DOMAIN = 1355
507
+ ERROR_DOMAIN_EXISTS = 1356
508
+ ERROR_DOMAIN_LIMIT_EXCEEDED = 1357
509
+ ERROR_INTERNAL_DB_CORRUPTION = 1358
510
+ ERROR_INTERNAL_ERROR = 1359
511
+ ERROR_GENERIC_NOT_MAPPED = 1360
512
+ ERROR_BAD_DESCRIPTOR_FORMAT = 1361
513
+ ERROR_NOT_LOGON_PROCESS = 1362
514
+ ERROR_LOGON_SESSION_EXISTS = 1363
515
+ ERROR_NO_SUCH_PACKAGE = 1364
516
+ ERROR_BAD_LOGON_SESSION_STATE = 1365
517
+ ERROR_LOGON_SESSION_COLLISION = 1366
518
+ ERROR_INVALID_LOGON_TYPE = 1367
519
+ ERROR_CANNOT_IMPERSONATE = 1368
520
+ ERROR_RXACT_INVALID_STATE = 1369
521
+ ERROR_RXACT_COMMIT_FAILURE = 1370
522
+ ERROR_SPECIAL_ACCOUNT = 1371
523
+ ERROR_SPECIAL_GROUP = 1372
524
+ ERROR_SPECIAL_USER = 1373
525
+ ERROR_MEMBERS_PRIMARY_GROUP = 1374
526
+ ERROR_TOKEN_ALREADY_IN_USE = 1375
527
+ ERROR_NO_SUCH_ALIAS = 1376
528
+ ERROR_MEMBER_NOT_IN_ALIAS = 1377
529
+ ERROR_MEMBER_IN_ALIAS = 1378
530
+ ERROR_ALIAS_EXISTS = 1379
531
+ ERROR_LOGON_NOT_GRANTED = 1380
532
+ ERROR_TOO_MANY_SECRETS = 1381
533
+ ERROR_SECRET_TOO_LONG = 1382
534
+ ERROR_INTERNAL_DB_ERROR = 1383
535
+ ERROR_TOO_MANY_CONTEXT_IDS = 1384
536
+ ERROR_LOGON_TYPE_NOT_GRANTED = 1385
537
+ ERROR_NT_CROSS_ENCRYPTION_REQUIRED = 1386
538
+ ERROR_NO_SUCH_MEMBER = 1387
539
+ ERROR_INVALID_MEMBER = 1388
540
+ ERROR_TOO_MANY_SIDS = 1389
541
+ ERROR_LM_CROSS_ENCRYPTION_REQUIRED = 1390
542
+ ERROR_NO_INHERITANCE = 1391
543
+ ERROR_FILE_CORRUPT = 1392
544
+ ERROR_DISK_CORRUPT = 1393
545
+ ERROR_NO_USER_SESSION_KEY = 1394
546
+ ERROR_LICENSE_QUOTA_EXCEEDED = 1395
547
+ ERROR_WRONG_TARGET_NAME = 1396
548
+ ERROR_MUTUAL_AUTH_FAILED = 1397
549
+ ERROR_TIME_SKEW = 1398
550
+ ERROR_CURRENT_DOMAIN_NOT_ALLOWED = 1399
551
+ ERROR_INVALID_WINDOW_HANDLE = 1400
552
+ ERROR_INVALID_MENU_HANDLE = 1401
553
+ ERROR_INVALID_CURSOR_HANDLE = 1402
554
+ ERROR_INVALID_ACCEL_HANDLE = 1403
555
+ ERROR_INVALID_HOOK_HANDLE = 1404
556
+ ERROR_INVALID_DWP_HANDLE = 1405
557
+ ERROR_TLW_WITH_WSCHILD = 1406
558
+ ERROR_CANNOT_FIND_WND_CLASS = 1407
559
+ ERROR_WINDOW_OF_OTHER_THREAD = 1408
560
+ ERROR_HOTKEY_ALREADY_REGISTERED = 1409
561
+ ERROR_CLASS_ALREADY_EXISTS = 1410
562
+ ERROR_CLASS_DOES_NOT_EXIST = 1411
563
+ ERROR_CLASS_HAS_WINDOWS = 1412
564
+ ERROR_INVALID_INDEX = 1413
565
+ ERROR_INVALID_ICON_HANDLE = 1414
566
+ ERROR_PRIVATE_DIALOG_INDEX = 1415
567
+ ERROR_LISTBOX_ID_NOT_FOUND = 1416
568
+ ERROR_NO_WILDCARD_CHARACTERS = 1417
569
+ ERROR_CLIPBOARD_NOT_OPEN = 1418
570
+ ERROR_HOTKEY_NOT_REGISTERED = 1419
571
+ ERROR_WINDOW_NOT_DIALOG = 1420
572
+ ERROR_CONTROL_ID_NOT_FOUND = 1421
573
+ ERROR_INVALID_COMBOBOX_MESSAGE = 1422
574
+ ERROR_WINDOW_NOT_COMBOBOX = 1423
575
+ ERROR_INVALID_EDIT_HEIGHT = 1424
576
+ ERROR_DC_NOT_FOUND = 1425
577
+ ERROR_INVALID_HOOK_FILTER = 1426
578
+ ERROR_INVALID_FILTER_PROC = 1427
579
+ ERROR_HOOK_NEEDS_HMOD = 1428
580
+ ERROR_GLOBAL_ONLY_HOOK = 1429
581
+ ERROR_JOURNAL_HOOK_SET = 1430
582
+ ERROR_HOOK_NOT_INSTALLED = 1431
583
+ ERROR_INVALID_LB_MESSAGE = 1432
584
+ ERROR_SETCOUNT_ON_BAD_LB = 1433
585
+ ERROR_LB_WITHOUT_TABSTOPS = 1434
586
+ ERROR_DESTROY_OBJECT_OF_OTHER_THREAD = 1435
587
+ ERROR_CHILD_WINDOW_MENU = 1436
588
+ ERROR_NO_SYSTEM_MENU = 1437
589
+ ERROR_INVALID_MSGBOX_STYLE = 1438
590
+ ERROR_INVALID_SPI_VALUE = 1439
591
+ ERROR_SCREEN_ALREADY_LOCKED = 1440
592
+ ERROR_HWNDS_HAVE_DIFF_PARENT = 1441
593
+ ERROR_NOT_CHILD_WINDOW = 1442
594
+ ERROR_INVALID_GW_COMMAND = 1443
595
+ ERROR_INVALID_THREAD_ID = 1444
596
+ ERROR_NON_MDICHILD_WINDOW = 1445
597
+ ERROR_POPUP_ALREADY_ACTIVE = 1446
598
+ ERROR_NO_SCROLLBARS = 1447
599
+ ERROR_INVALID_SCROLLBAR_RANGE = 1448
600
+ ERROR_INVALID_SHOWWIN_COMMAND = 1449
601
+ ERROR_NO_SYSTEM_RESOURCES = 1450
602
+ ERROR_NONPAGED_SYSTEM_RESOURCES = 1451
603
+ ERROR_PAGED_SYSTEM_RESOURCES = 1452
604
+ ERROR_WORKING_SET_QUOTA = 1453
605
+ ERROR_PAGEFILE_QUOTA = 1454
606
+ ERROR_COMMITMENT_LIMIT = 1455
607
+ ERROR_MENU_ITEM_NOT_FOUND = 1456
608
+ ERROR_INVALID_KEYBOARD_HANDLE = 1457
609
+ ERROR_HOOK_TYPE_NOT_ALLOWED = 1458
610
+ ERROR_REQUIRES_INTERACTIVE_WINDOWSTATION = 1459
611
+ ERROR_TIMEOUT = 1460
612
+ ERROR_INVALID_MONITOR_HANDLE = 1461
613
+ ERROR_EVENTLOG_FILE_CORRUPT = 1500
614
+ ERROR_EVENTLOG_CANT_START = 1501
615
+ ERROR_LOG_FILE_FULL = 1502
616
+ ERROR_EVENTLOG_FILE_CHANGED = 1503
617
+ ERROR_INVALID_TASK_NAME = 1550
618
+ ERROR_INVALID_TASK_INDEX = 1551
619
+ ERROR_THREAD_ALREADY_IN_TASK = 1552
620
+ ERROR_INSTALL_SERVICE_FAILURE = 1601
621
+ ERROR_INSTALL_USEREXIT = 1602
622
+ ERROR_INSTALL_FAILURE = 1603
623
+ ERROR_INSTALL_SUSPEND = 1604
624
+ ERROR_UNKNOWN_PRODUCT = 1605
625
+ ERROR_UNKNOWN_FEATURE = 1606
626
+ ERROR_UNKNOWN_COMPONENT = 1607
627
+ ERROR_UNKNOWN_PROPERTY = 1608
628
+ ERROR_INVALID_HANDLE_STATE = 1609
629
+ ERROR_BAD_CONFIGURATION = 1610
630
+ ERROR_INDEX_ABSENT = 1611
631
+ ERROR_INSTALL_SOURCE_ABSENT = 1612
632
+ ERROR_INSTALL_PACKAGE_VERSION = 1613
633
+ ERROR_PRODUCT_UNINSTALLED = 1614
634
+ ERROR_BAD_QUERY_SYNTAX = 1615
635
+ ERROR_INVALID_FIELD = 1616
636
+ ERROR_DEVICE_REMOVED = 1617
637
+ ERROR_INSTALL_ALREADY_RUNNING = 1618
638
+ ERROR_INSTALL_PACKAGE_OPEN_FAILED = 1619
639
+ ERROR_INSTALL_PACKAGE_INVALID = 1620
640
+ ERROR_INSTALL_UI_FAILURE = 1621
641
+ ERROR_INSTALL_LOG_FAILURE = 1622
642
+ ERROR_INSTALL_LANGUAGE_UNSUPPORTED = 1623
643
+ ERROR_INSTALL_TRANSFORM_FAILURE = 1624
644
+ ERROR_INSTALL_PACKAGE_REJECTED = 1625
645
+ ERROR_FUNCTION_NOT_CALLED = 1626
646
+ ERROR_FUNCTION_FAILED = 1627
647
+ ERROR_INVALID_TABLE = 1628
648
+ ERROR_DATATYPE_MISMATCH = 1629
649
+ ERROR_UNSUPPORTED_TYPE = 1630
650
+ ERROR_CREATE_FAILED = 1631
651
+ ERROR_INSTALL_TEMP_UNWRITABLE = 1632
652
+ ERROR_INSTALL_PLATFORM_UNSUPPORTED = 1633
653
+ ERROR_INSTALL_NOTUSED = 1634
654
+ ERROR_PATCH_PACKAGE_OPEN_FAILED = 1635
655
+ ERROR_PATCH_PACKAGE_INVALID = 1636
656
+ ERROR_PATCH_PACKAGE_UNSUPPORTED = 1637
657
+ ERROR_PRODUCT_VERSION = 1638
658
+ ERROR_INVALID_COMMAND_LINE = 1639
659
+ ERROR_INSTALL_REMOTE_DISALLOWED = 1640
660
+ ERROR_SUCCESS_REBOOT_INITIATED = 1641
661
+ ERROR_UNKNOWN_PATCH = 1647
662
+ RPC_S_INVALID_STRING_BINDING = 1700
663
+ RPC_S_WRONG_KIND_OF_BINDING = 1701
664
+ RPC_S_INVALID_BINDING = 1702
665
+ RPC_S_PROTSEQ_NOT_SUPPORTED = 1703
666
+ RPC_S_INVALID_RPC_PROTSEQ = 1704
667
+ RPC_S_INVALID_STRING_UUID = 1705
668
+ RPC_S_INVALID_ENDPOINT_FORMAT = 1706
669
+ RPC_S_INVALID_NET_ADDR = 1707
670
+ RPC_S_NO_ENDPOINT_FOUND = 1708
671
+ RPC_S_INVALID_TIMEOUT = 1709
672
+ RPC_S_OBJECT_NOT_FOUND = 1710
673
+ RPC_S_ALREADY_REGISTERED = 1711
674
+ RPC_S_TYPE_ALREADY_REGISTERED = 1712
675
+ RPC_S_ALREADY_LISTENING = 1713
676
+ RPC_S_NO_PROTSEQS_REGISTERED = 1714
677
+ RPC_S_NOT_LISTENING = 1715
678
+ RPC_S_UNKNOWN_MGR_TYPE = 1716
679
+ RPC_S_UNKNOWN_IF = 1717
680
+ RPC_S_NO_BINDINGS = 1718
681
+ RPC_S_NO_PROTSEQS = 1719
682
+ RPC_S_CANT_CREATE_ENDPOINT = 1720
683
+ RPC_S_OUT_OF_RESOURCES = 1721
684
+ RPC_S_SERVER_UNAVAILABLE = 1722
685
+ RPC_S_SERVER_TOO_BUSY = 1723
686
+ RPC_S_INVALID_NETWORK_OPTIONS = 1724
687
+ RPC_S_NO_CALL_ACTIVE = 1725
688
+ RPC_S_CALL_FAILED = 1726
689
+ RPC_S_CALL_FAILED_DNE = 1727
690
+ RPC_S_PROTOCOL_ERROR = 1728
691
+ RPC_S_UNSUPPORTED_TRANS_SYN = 1730
692
+ RPC_S_UNSUPPORTED_TYPE = 1732
693
+ RPC_S_INVALID_TAG = 1733
694
+ RPC_S_INVALID_BOUND = 1734
695
+ RPC_S_NO_ENTRY_NAME = 1735
696
+ RPC_S_INVALID_NAME_SYNTAX = 1736
697
+ RPC_S_UNSUPPORTED_NAME_SYNTAX = 1737
698
+ RPC_S_UUID_NO_ADDRESS = 1739
699
+ RPC_S_DUPLICATE_ENDPOINT = 1740
700
+ RPC_S_UNKNOWN_AUTHN_TYPE = 1741
701
+ RPC_S_MAX_CALLS_TOO_SMALL = 1742
702
+ RPC_S_STRING_TOO_LONG = 1743
703
+ RPC_S_PROTSEQ_NOT_FOUND = 1744
704
+ RPC_S_PROCNUM_OUT_OF_RANGE = 1745
705
+ RPC_S_BINDING_HAS_NO_AUTH = 1746
706
+ RPC_S_UNKNOWN_AUTHN_SERVICE = 1747
707
+ RPC_S_UNKNOWN_AUTHN_LEVEL = 1748
708
+ RPC_S_INVALID_AUTH_IDENTITY = 1749
709
+ RPC_S_UNKNOWN_AUTHZ_SERVICE = 1750
710
+ EPT_S_INVALID_ENTRY = 1751
711
+ EPT_S_CANT_PERFORM_OP = 1752
712
+ EPT_S_NOT_REGISTERED = 1753
713
+ RPC_S_NOTHING_TO_EXPORT = 1754
714
+ RPC_S_INCOMPLETE_NAME = 1755
715
+ RPC_S_INVALID_VERS_OPTION = 1756
716
+ RPC_S_NO_MORE_MEMBERS = 1757
717
+ RPC_S_NOT_ALL_OBJS_UNEXPORTED = 1758
718
+ RPC_S_INTERFACE_NOT_FOUND = 1759
719
+ RPC_S_ENTRY_ALREADY_EXISTS = 1760
720
+ RPC_S_ENTRY_NOT_FOUND = 1761
721
+ RPC_S_NAME_SERVICE_UNAVAILABLE = 1762
722
+ RPC_S_INVALID_NAF_ID = 1763
723
+ RPC_S_CANNOT_SUPPORT = 1764
724
+ RPC_S_NO_CONTEXT_AVAILABLE = 1765
725
+ RPC_S_INTERNAL_ERROR = 1766
726
+ RPC_S_ZERO_DIVIDE = 1767
727
+ RPC_S_ADDRESS_ERROR = 1768
728
+ RPC_S_FP_DIV_ZERO = 1769
729
+ RPC_S_FP_UNDERFLOW = 1770
730
+ RPC_S_FP_OVERFLOW = 1771
731
+ RPC_X_NO_MORE_ENTRIES = 1772
732
+ RPC_X_SS_CHAR_TRANS_OPEN_FAIL = 1773
733
+ RPC_X_SS_CHAR_TRANS_SHORT_FILE = 1774
734
+ RPC_X_SS_IN_NULL_CONTEXT = 1775
735
+ RPC_X_SS_CONTEXT_DAMAGED = 1777
736
+ RPC_X_SS_HANDLES_MISMATCH = 1778
737
+ RPC_X_SS_CANNOT_GET_CALL_HANDLE = 1779
738
+ RPC_X_NULL_REF_POINTER = 1780
739
+ RPC_X_ENUM_VALUE_OUT_OF_RANGE = 1781
740
+ RPC_X_BYTE_COUNT_TOO_SMALL = 1782
741
+ RPC_X_BAD_STUB_DATA = 1783
742
+ ERROR_INVALID_USER_BUFFER = 1784
743
+ ERROR_UNRECOGNIZED_MEDIA = 1785
744
+ ERROR_NO_TRUST_LSA_SECRET = 1786
745
+ ERROR_NO_TRUST_SAM_ACCOUNT = 1787
746
+ ERROR_TRUSTED_DOMAIN_FAILURE = 1788
747
+ ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789
748
+ ERROR_TRUST_FAILURE = 1790
749
+ RPC_S_CALL_IN_PROGRESS = 1791
750
+ ERROR_NETLOGON_NOT_STARTED = 1792
751
+ ERROR_ACCOUNT_EXPIRED = 1793
752
+ ERROR_REDIRECTOR_HAS_OPEN_HANDLES = 1794
753
+ ERROR_PRINTER_DRIVER_ALREADY_INSTALLED= 1795
754
+ ERROR_UNKNOWN_PORT = 1796
755
+ ERROR_UNKNOWN_PRINTER_DRIVER = 1797
756
+ ERROR_UNKNOWN_PRINTPROCESSOR = 1798
757
+ ERROR_INVALID_SEPARATOR_FILE = 1799
758
+ ERROR_INVALID_PRIORITY = 1800
759
+ ERROR_INVALID_PRINTER_NAME = 1801
760
+ ERROR_PRINTER_ALREADY_EXISTS = 1802
761
+ ERROR_INVALID_PRINTER_COMMAND = 1803
762
+ ERROR_INVALID_DATATYPE = 1804
763
+ ERROR_INVALID_ENVIRONMENT = 1805
764
+ RPC_S_NO_MORE_BINDINGS = 1806
765
+ ERROR_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 1807
766
+ ERROR_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 1808
767
+ ERROR_NOLOGON_SERVER_TRUST_ACCOUNT = 1809
768
+ ERROR_DOMAIN_TRUST_INCONSISTENT = 1810
769
+ ERROR_SERVER_HAS_OPEN_HANDLES = 1811
770
+ ERROR_RESOURCE_DATA_NOT_FOUND = 1812
771
+ ERROR_RESOURCE_TYPE_NOT_FOUND = 1813
772
+ ERROR_RESOURCE_NAME_NOT_FOUND = 1814
773
+ ERROR_RESOURCE_LANG_NOT_FOUND = 1815
774
+ ERROR_NOT_ENOUGH_QUOTA = 1816
775
+ RPC_S_NO_INTERFACES = 1817
776
+ RPC_S_CALL_CANCELLED = 1818
777
+ RPC_S_BINDING_INCOMPLETE = 1819
778
+ RPC_S_COMM_FAILURE = 1820
779
+ RPC_S_UNSUPPORTED_AUTHN_LEVEL = 1821
780
+ RPC_S_NO_PRINC_NAME = 1822
781
+ RPC_S_NOT_RPC_ERROR = 1823
782
+ RPC_S_UUID_LOCAL_ONLY = 1824
783
+ RPC_S_SEC_PKG_ERROR = 1825
784
+ RPC_S_NOT_CANCELLED = 1826
785
+ RPC_X_INVALID_ES_ACTION = 1827
786
+ RPC_X_WRONG_ES_VERSION = 1828
787
+ RPC_X_WRONG_STUB_VERSION = 1829
788
+ RPC_X_INVALID_PIPE_OBJECT = 1830
789
+ RPC_X_WRONG_PIPE_ORDER = 1831
790
+ RPC_X_WRONG_PIPE_VERSION = 1832
791
+ RPC_S_GROUP_MEMBER_NOT_FOUND = 1898
792
+ EPT_S_CANT_CREATE = 1899
793
+ RPC_S_INVALID_OBJECT = 1900
794
+ ERROR_INVALID_TIME = 1901
795
+ ERROR_INVALID_FORM_NAME = 1902
796
+ ERROR_INVALID_FORM_SIZE = 1903
797
+ ERROR_ALREADY_WAITING = 1904
798
+ ERROR_PRINTER_DELETED = 1905
799
+ ERROR_INVALID_PRINTER_STATE = 1906
800
+ ERROR_PASSWORD_MUST_CHANGE = 1907
801
+ ERROR_DOMAIN_CONTROLLER_NOT_FOUND = 1908
802
+ ERROR_ACCOUNT_LOCKED_OUT = 1909
803
+ OR_INVALID_OXID = 1910
804
+ OR_INVALID_OID = 1911
805
+ OR_INVALID_SET = 1912
806
+ RPC_S_SEND_INCOMPLETE = 1913
807
+ RPC_S_INVALID_ASYNC_HANDLE = 1914
808
+ RPC_S_INVALID_ASYNC_CALL = 1915
809
+ RPC_X_PIPE_CLOSED = 1916
810
+ RPC_X_PIPE_DISCIPLINE_ERROR = 1917
811
+ RPC_X_PIPE_EMPTY = 1918
812
+ ERROR_NO_SITENAME = 1919
813
+ ERROR_CANT_ACCESS_FILE = 1920
814
+ ERROR_CANT_RESOLVE_FILENAME = 1921
815
+ RPC_S_ENTRY_TYPE_MISMATCH = 1922
816
+ RPC_S_NOT_ALL_OBJS_EXPORTED = 1923
817
+ RPC_S_INTERFACE_NOT_EXPORTED = 1924
818
+ RPC_S_PROFILE_NOT_ADDED = 1925
819
+ RPC_S_PRF_ELT_NOT_ADDED = 1926
820
+ RPC_S_PRF_ELT_NOT_REMOVED = 1927
821
+ RPC_S_GRP_ELT_NOT_ADDED = 1928
822
+ RPC_S_GRP_ELT_NOT_REMOVED = 1929
823
+ ERROR_KM_DRIVER_BLOCKED = 1930
824
+ ERROR_CONTEXT_EXPIRED = 1931
825
+ ERROR_PER_USER_TRUST_QUOTA_EXCEEDED = 1932
826
+ ERROR_ALL_USER_TRUST_QUOTA_EXCEEDED = 1933
827
+ ERROR_USER_DELETE_TRUST_QUOTA_EXCEEDED= 1934
828
+ ERROR_AUTHENTICATION_FIREWALL_FAILED = 1935
829
+ ERROR_REMOTE_PRINT_CONNECTIONS_BLOCKED= 1936
830
+ ERROR_INVALID_PIXEL_FORMAT = 2000
831
+ ERROR_BAD_DRIVER = 2001
832
+ ERROR_INVALID_WINDOW_STYLE = 2002
833
+ ERROR_METAFILE_NOT_SUPPORTED = 2003
834
+ ERROR_TRANSFORM_NOT_SUPPORTED = 2004
835
+ ERROR_CLIPPING_NOT_SUPPORTED = 2005
836
+ ERROR_INVALID_CMM = 2010
837
+ ERROR_INVALID_PROFILE = 2011
838
+ ERROR_TAG_NOT_FOUND = 2012
839
+ ERROR_TAG_NOT_PRESENT = 2013
840
+ ERROR_DUPLICATE_TAG = 2014
841
+ ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE = 2015
842
+ ERROR_PROFILE_NOT_FOUND = 2016
843
+ ERROR_INVALID_COLORSPACE = 2017
844
+ ERROR_ICM_NOT_ENABLED = 2018
845
+ ERROR_DELETING_ICM_XFORM = 2019
846
+ ERROR_INVALID_TRANSFORM = 2020
847
+ ERROR_COLORSPACE_MISMATCH = 2021
848
+ ERROR_INVALID_COLORINDEX = 2022
849
+ ERROR_CONNECTED_OTHER_PASSWORD = 2108
850
+ ERROR_BAD_USERNAME = 2202
851
+ ERROR_NOT_CONNECTED = 2250
852
+ ERROR_OPEN_FILES = 2401
853
+ ERROR_ACTIVE_CONNECTIONS = 2402
854
+ ERROR_DEVICE_IN_USE = 2404
855
+ ERROR_UNKNOWN_PRINT_MONITOR = 3000
856
+
857
+ ERROR_USER_DEFINED_BASE = 0xF000
858
+
859
+ # Flags for FormatMessage function:
860
+
861
+ FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100
862
+ FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200
863
+ FORMAT_MESSAGE_FROM_STRING = 0x00000400
864
+ FORMAT_MESSAGE_FROM_HMODULE = 0x00000800
865
+ FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
866
+ FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000
867
+ FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF
868
+
869
+ # Set/GetErrorMode values:
870
+
871
+ SEM_FAILCRITICALERRORS = 0x0001
872
+ SEM_NOALIGNMENTFAULTEXCEPT = 0x0004
873
+ SEM_NOGPFAULTERRORBOX = 0x0002
874
+ SEM_NOOPENFILEERRORBOX = 0x8000
875
+
876
+ ###############################################
877
+ # Win32 API Bindings
878
+ ###############################################
879
+
880
+ ffi_lib 'kernel32', 'user32'
881
+
882
+ =begin
883
+ DWORD WINAPI FormatMessage(
884
+ __in DWORD dwFlags,
885
+ __in_opt LPCVOID lpSource,
886
+ __in DWORD dwMessageId,
887
+ __in DWORD dwLanguageId,
888
+ __out LPTSTR lpBuffer,
889
+ __in DWORD nSize,
890
+ __in_opt va_list *Arguments
891
+ );
892
+ =end
893
+ safe_attach_function :FormatMessageA, [:DWORD, :LPCVOID, :DWORD, :DWORD, :LPTSTR, :DWORD, :varargs], :DWORD
894
+ safe_attach_function :FormatMessageW, [:DWORD, :LPCVOID, :DWORD, :DWORD, :LPWSTR, :DWORD, :varargs], :DWORD
895
+
896
+ =begin
897
+ DWORD WINAPI GetLastError(void);
898
+ =end
899
+ safe_attach_function :GetLastError, [], :DWORD
900
+ =begin
901
+ void WINAPI SetLastError(
902
+ __in DWORD dwErrCode
903
+ );
904
+ =end
905
+ safe_attach_function :SetLastError, [:DWORD], :void
906
+ safe_attach_function :SetLastErrorEx, [:DWORD, :DWORD], :void
907
+ =begin
908
+ UINT WINAPI GetErrorMode(void);s
909
+ =end
910
+ safe_attach_function :GetErrorMode, [], :uint
911
+ =begin
912
+ UINT WINAPI SetErrorMode(
913
+ __in UINT uMode
914
+ );
915
+ =end
916
+ safe_attach_function :SetErrorMode, [:UINT], :UINT
917
+
918
+ end
919
+ end
920
+ end
921
+ end