4 ms·
Windows NT series architecture (XP, 8.1, Xbox, etc.) has the same wonderful "everything is a filesystem" paradigm. http://en.wikipedia.org/wiki/Object_Manager_
by frik 12y ago
Windows NT series architecture (XP, 8.1, Xbox, etc.) has the same wonderful "everything is a filesystem" paradigm.
http://en.wikipedia.org/wiki/Object_Manager_(Windows) http://en.wikipedia.org/wiki/Object_Manager_(Windows)
Try out WinObj.exe (Microsoft): http://technet.microsoft.com/en-us/sysinternals/bb896657.aspx http://technet.microsoft.com/en-us/sysinternals/bb896657.asp... (best with admin privileges)
- laumars 12y agoNT might have system objects structured in a tree for privileged access, but it's not quite the same thing as having everything as a file system object that's transparently accessible by any application. eg, you couldn't use Notepad to edit those NT objects, where as you could with Plan 9's design since.
- frik 12y agoThe problem is backwards compatibility. To make the code transition from Win16API to Win32API very easy in 1994-95 era Microsoft made several design decisions for Win32API, that don't make sense anymore - 20 years later. Some of them are the limited MAX_PATH, which is defined as 260 characters, reserved characters in file names, 8.3 filename aliasing (fixed), etc. - see: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... Unfortunately, the Windows shell (explorer.exe/shell32.dll & cmd.exe) are more limited than what you can do with Win32API. One can access the NT object tree from C/C++ You can use CreateFile(), ReadFile(), WriteFile(), etc. Win32API function to work on NT objects (not just files but real NT objects, the name is just inherited from Win16API) - http://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa365747(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... , http://msdn.microsoft.com/en-us/library/windows/desktop/aa365467(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... Some NT path examples: "\\.\PhysicalDrive2" ... opens third physical drive "\\.\C:\" ... opens the file system of the C: volume "\\.\COM1" ... opens serial port 1 "\\.\pipe\pipename" ... opens named pipe "\\.\mailslot\sample" ... open mailslot "\\?\UNC\server\share" ... opens universal UNC path "\\?\C:\" ... opens C:, you can exceed the MAX_PATH limits screenshot of WinObj that corresponds to the last example: http://s1.postimg.org/ckhs6xedr/ntobject.png http://s1.postimg.org/ckhs6xedr/ntobject.png Instead of further improving Win32API, as they have done like ReadFileEx() (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365468(v=vs.85).aspx http://msdn.microsoft.com/en-us/library/windows/desktop/aa36... ), Microsoft toys around with several dotNet API layers on top of Win32API and now a WinRT API that stills sits on top of the Win32 subsystem. Windows NT would support several subsystems (like there are POSIX, OS/2, Xbox subsystems for WinNT/ReactOS).
- xioxox 12y agoIt's a shame if it has this architecture that you can't access a pipe in the same way as a socket using the traditional C API. There's a whole mess of handles, C files and the really nasty self-incompatible MSVCRT.
- frik 12y agoWell, you can use Win32API CreateFile(), WriteFile(), ReadFile() to access, read/write files, pipes, named-pipes and mailslots (all types also over network). Berkeley sockets introduced in Win3.1 for Workgroups and later as WinSocks for IE 1 (based on Mosaic) came late (Bill Gates vision was the Microsoft Network based on Win95 GUI, later renamed was MSN as dial-up network): http://en.wikipedia.org/wiki/Berkeley_sockets http://en.wikipedia.org/wiki/Berkeley_sockets , http://en.wikipedia.org/wiki/Microsoft_Network#MSN_Classic http://en.wikipedia.org/wiki/Microsoft_Network#MSN_Classic