3

I have a bunch of device files which are accessible by using \\.\name_of_file as an argument to CreateFile.

I can use WinObj to see the list of these files, but what I'd like to do is iterate over them programmatically. Much Googling seems to be implying that I can use the Object Manager or the NT namespace, but I can't find an API for either of these, nor the source for WinObj to trawl through...

Can anyone enlighten me please?

3
  • I dont know, if you exactly mean this, but function NtQuerySymbolicLinkObject / ZwQuerySymbolicLinkObject is used to enumerate to all symbolic links.
    – Xearinox
    May 22, 2012 at 15:40
  • You can browse some namespaces with the for command. Try this at the command line for %i in (\\.\Mailslot\*) do @echo %i
    – ixe013
    May 22, 2012 at 18:03
  • @ixe013: the 'for' approach doesn't seem to work for my files :( May 23, 2012 at 7:30

2 Answers 2

3

Meandering Through the Object Manager might be what you are looking for. Osronline is just cool.

1
  • Thanks, that was one of the pages I'd found in my initial trawl, but it doesn't cover any of the API calls I'd need to create a tool such as WinObj May 23, 2012 at 7:31
2

The APIs to do this are documented but are not guaranteed to work in future versions of Windows. With that in mind, look at the following: NtOpenDirectoryObject , NtQueryDirectoryObject

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.