{"id":18280008,"url":"https://github.com/lordmike/mbw.libraries.deviceobjectlib","last_synced_at":"2025-04-09T04:49:28.904Z","repository":{"id":12867156,"uuid":"73005655","full_name":"LordMike/MBW.Libraries.DeviceObjectLib","owner":"LordMike","description":"Library to interact with Windows Object Tree, much like winobj","archived":false,"fork":false,"pushed_at":"2023-09-19T21:14:58.000Z","size":67,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T17:10:37.111Z","etag":null,"topics":["win-obj","win32"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LordMike.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"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":"2016-11-06T17:03:42.000Z","updated_at":"2022-03-19T12:37:50.000Z","dependencies_parsed_at":"2024-11-05T12:32:25.899Z","dependency_job_id":"f84eb6b2-8b37-4463-a127-2daf043ecb2a","html_url":"https://github.com/LordMike/MBW.Libraries.DeviceObjectLib","commit_stats":null,"previous_names":["lordmike/deviceobjectlib"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMike%2FMBW.Libraries.DeviceObjectLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMike%2FMBW.Libraries.DeviceObjectLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMike%2FMBW.Libraries.DeviceObjectLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LordMike%2FMBW.Libraries.DeviceObjectLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LordMike","download_url":"https://codeload.github.com/LordMike/MBW.Libraries.DeviceObjectLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980820,"owners_count":21027803,"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":["win-obj","win32"],"created_at":"2024-11-05T12:32:11.467Z","updated_at":"2025-04-09T04:49:28.878Z","avatar_url":"https://github.com/LordMike.png","language":"C#","readme":"DeviceObjectLib [![Generic Build](https://github.com/LordMike/MBW.Libraries.DeviceObjectLib/actions/workflows/dotnet.yml/badge.svg)](https://github.com/LordMike/MBW.Libraries.DeviceObjectLib/actions/workflows/dotnet.yml) [![Nuget](https://img.shields.io/nuget/v/MBW.Libraries.DeviceObjectLib)](https://www.nuget.org/packages/MBW.Libraries.DeviceObjectLib)\n==================\n\nA C# Library to work with the Win32 Windows Object Tree\n\n### Reasons\n\nThe Windows Object Tree is available and documented, but not very covered in C#. I've implemented methods necessary to explore the object tree and get useful information from it. It is f.ex. now very simple to get a list of all volumes available to Windows.\n\n#### Notes\n\nSome parts of the object tree require Admin rights.\n\n### High level\n\nThe main class to use is `DeviceObjectLib.NtUtils`, which provides static methods. The two main methods are `ListObjects` and `ListDirectoryObjects`:\n\n* `ListObjects` - Lists objects, but makes no attempt to interpret them\n* `ListDirectoryObjects` - Lists objects, and attempts to interpret them as special types\n\nObjects interpreted by this library include (See more in the `ObjectTypes` namespace):\n\n* `NtDirectory` - a directory in the object tree\n* `HarddiskPartitionIdentifier` - e.g. `\\Device\\Harddisk0Partition2`\n* `HarddiskVolumeIdentifier` - e.g. `\\Device\\HarddiskVolume3`\n\nThese objects can typically also be listed using the methods on `NtUtils`.\n\nThe objects also typically provide some convenience features, such as calculating the paths of the object in question, so they can be opened using `File.Open`.\n\n#### Example: List all objects\n\nThis example lists all objects in the tree, recursively, and prints out their paths and types.\n\n    using System;\n    using System.Collections.Generic;\n    using DeviceObjectLib;\n    using DeviceObjectLib.ObjectTypes;\n    \n    namespace ListAllObjects\n    {\n        public class Program\n        {\n            public static void Main(string[] args)\n            {\n                IEnumerable\u003cNtObjectBase\u003e objects = NtUtils.ListDirectory(\"\\\\\", true);\n    \n                foreach (NtObjectBase @base in objects)\n                    Console.WriteLine($\"{@base.Type}: {@base.FullName}\");\n            }\n        }\n    }\n\nSee more examples in the `Examples` folder.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordmike%2Fmbw.libraries.deviceobjectlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flordmike%2Fmbw.libraries.deviceobjectlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flordmike%2Fmbw.libraries.deviceobjectlib/lists"}