Hacker News new | past | comments | ask | show | jobs | submit login

Weird that you need to dip down to an Nt* function to open a child given a parent handle. It's not like it's unheard of to be able to do that in the Windows API. The registry is also a hierarchical system and opening any key requires passing in a parent key handle (the root handles are predefined).



It's a quirk of history, imho. If Win32 had been written without concern for what came before, it probably would have more closely followed NT conventions.

But it wasn't. It followed on from Win16 and DOS so, to an extent, it emulated DOS-style path and file handling. After all, that's what developers and users were familiar with. The Windows registry did not have all this baggage so it followed the style of the NT kernel.

Though this doesn't explain why Win32 never added CreateFileRelativeToDirectoryHandleW




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: