{"id":20445841,"url":"https://github.com/rapid7/windows_error","last_synced_at":"2025-04-09T11:10:36.887Z","repository":{"id":33684261,"uuid":"37337029","full_name":"rapid7/windows_error","owner":"rapid7","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-13T14:48:20.000Z","size":432,"stargazers_count":4,"open_issues_count":1,"forks_count":8,"subscribers_count":57,"default_branch":"master","last_synced_at":"2025-04-02T09:07:09.958Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapid7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-06-12T18:11:01.000Z","updated_at":"2025-02-13T14:48:23.000Z","dependencies_parsed_at":"2025-02-28T23:12:17.879Z","dependency_job_id":"99660e98-ef09-439d-840e-89dafc97f1f0","html_url":"https://github.com/rapid7/windows_error","commit_stats":{"total_commits":48,"total_committers":6,"mean_commits":8.0,"dds":"0.27083333333333337","last_synced_commit":"7e06000ee91ebdfd1f95870c78a847b70d1bf1ff"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fwindows_error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fwindows_error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fwindows_error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapid7%2Fwindows_error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapid7","download_url":"https://codeload.github.com/rapid7/windows_error/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248027407,"owners_count":21035594,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T10:14:39.012Z","updated_at":"2025-04-09T11:10:36.865Z","avatar_url":"https://github.com/rapid7.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WindowsError\n[![Gem Version](https://badge.fury.io/rb/windows_error.svg)](http://badge.fury.io/rb/windows_error)\n[![Build Status](https://travis-ci.org/rapid7/windows_error.svg)](https://travis-ci.org/rapid7/windows_error)\n[![Code Climate](https://codeclimate.com/github/rapid7/windows_error/badges/gpa.svg)](https://codeclimate.com/github/rapid7/windows_error)\n[![Coverage Status](https://coveralls.io/repos/rapid7/windows_error/badge.svg?branch=master)](https://coveralls.io/r/rapid7/windows_error?branch=master)\n[![PullReview stats](https://www.pullreview.com/github/rapid7/windows_error/badges/master.svg?)](https://www.pullreview.com/github/rapid7/windows_error/reviews/master)\n\n\nThe WindowsError gem provides an easily accessible reference for standard Windows API Error Codes. It allows you to do comparisons as well as direct lookups of error codes to translate the numerical value returned by the API, into a meaningful and human readable message. WindowsError currently supports [NTSTATUS](https://msdn.microsoft.com/en-us/library/cc231200.aspx) and [Win32 Error Codes](https://msdn.microsoft.com/en-us/library/cc231199.aspx). See [Windows Error Codes](https://msdn.microsoft.com/en-us/library/cc231196.aspx) for more details on all Windows Error Codes.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'windows_error'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install windows_error\n\n## Usage\n\n###Looking up an NTSTATUS code\nCode:\n\n```ruby\nrequire 'windows_error/nt_status'\nreturn_value_from_api_call = 0x00000000\nerror_codes = WindowsError::NTStatus.find_by_retval(return_value_from_api_call)\nerror_codes.each do |error_code|\n\tputs \"#{error_code.name}: #{error_code.description}\"\nend\n```\n\nOutput:\n\n```\nSTATUS_SUCCESS: The operation completed successfully.\nSTATUS_WAIT_0: The caller specified WaitAny for WaitType and one of the dispatcher objects in the Object array has been set to the signaled state.\n```\n\n###Looking up a Win32 code\nCode:\n\n```ruby\nrequire 'windows_error/win32'\nreturn_value_from_api_call = 0x00000002\nerror_codes = WindowsError::Win32.find_by_retval(return_value_from_api_call)\nerror_codes.each do |error_code|\n\tputs \"#{error_code.name}: #{error_code.description}\"\nend\n```\n\nOutput:\n\n```\nERROR_FILE_NOT_FOUND: The system cannot find the file specified.\n```\n\n###Testing Equality\n\n```ruby\nrequire 'windows_error/win32'\nreturn_value_from_api_call = 0x00000002\nreturn_value_from_api_call == WindowsError::Win32::ERROR_FILE_NOT_FOUND #=\u003e true\nWindowsError::Win32::ERROR_FILE_NOT_FOUND == return_value_from_api_call #=\u003e true\n0x00000001 == WindowsError::Win32::ERROR_FILE_NOT_FOUND #=\u003e false\n```\n\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/windows_error/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fwindows_error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapid7%2Fwindows_error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapid7%2Fwindows_error/lists"}