4 ms·
No. Because the API is fragmented into old, not-so-old and new parts, some higher-, some lower-level[0]. You need things from all of them, the new API isn't com
by c4mpute 3y ago
No. Because the API is fragmented into old, not-so-old and new parts, some higher-, some lower-level[0]. You need things from all of them, the new API isn't complete enough and has warts in places where using one of the older ones is better/easier/safer. So in the end you will have to use all the ways, and know when to use which one.
All this can of course be fixed with another layer of indirection. But if you ever wanted to know why Windows file APIs and filesystems are so dog-slow, here is (part of) your answer.
[0] e.g. there are lower level APIs that can create and access files and filenames that higher level APIs will filter out or disallow.
- sn_master 3y ago> new API isn't complete enough and has warts in places where using one of the older ones is better/easier/safer Describes Windows Forms vs everything else MS has been trying to do in the past 15 years.
- HeckFeck 3y agoI feel inclined to bypass all that Win32 gubbins and talk to the Kernel directly. Back in my day we just walked into the office of the man in charge and shook hands, we struck deals like real men. If we ask ask the NT kernel politely in a language it understands, we will get our filepath. Right? http://undocumented.ntinternals.net/index.html?page=UserMode%2FUndocumented%20Functions%2FNT%20Objects%2FFile%2FNtOpenFile.html http://undocumented.ntinternals.net/index.html?page=UserMode...
- huhtenberg 3y agoNT API is now documented by Microsoft. The coverage is not complete, but enough to be useful. E.g. https://learn.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntopenfile https://learn.microsoft.com/en-us/windows/win32/api/winternl....