Certain users try and make tagging too complicated. It has especially been a problem in the c++ tag, leading to extended discussions in comments and lots of soul-searching. Resist the temptation to read too much into a tag. Tagging your question with a language tag means that you are writing code in that language. In the case of the c++ tag, it means that you are running your code through a C++ compiler.
A c++ tag absolutely does not imply anything about ISO standard C++. It just means you're writing C++. Additional context is provided by the other tags you use on your question. A windows tag means you intended for that C++ code to run on Windows, so Windows-specific idioms and APIs are acceptable.
For typical Windows programming questions, you would want to use a tag corresponding to the GUI toolkit that you're using, or if you are targeting the Windows API directly, use the winapi tag.
It is a rare case indeed where you would tag a question with the nt-native-api tag, but if you actually are targeting that API, then yes, use the tag. If you're writing the code to run through a C++ compiler, then also tag it with c++. I think what was confusing in your case is that you generally don't write C++ code when targeting the NT Native API. Many of the C++ language features are inappropriate, so you restrict yourself to what is essentially the subset of C++ that corresponds to C. That still doesn't mean you're writing C, though. If it runs through a C++ compiler, it's C++, even if it's a subset of C++ that looks very much like C.
Note that in your case, you were not targeting the NT Native API, so the tag would not have been appropriate. There's a user-mode solution for your problem, and it was the one you were actually looking for. RbMm's depth of knowledge sometimes leads him to propose killing flies with a bazooka, thinking nothing of the consequences because he understands and knows how to deal with them. Or just doesn't care about the problems with calling intentionally undocumented, non-public APIs. You just wanted a regular windows winapi solution that would be compiled in c++.
kernel32.DeleteFile
andntdll.ZwDeleteFile
? only in name of dll and function. ifDeleteFile
is winapi -NtDeleteFile
tooZwDeleteFile
isn't part of the Windows API. How this is wired up internally is an implementation detail, that is deliberately undocumented. Given the constraints of the question, you didn't provide the best answer. In fact, given the constraints, you didn't even provide a sufficient answer. You need to spend more time at the help center to learn, what Stack Overflow is about. If you are more comfortable with Russian, try this instead.ZwDeleteFile
isn't part of the Windows API ? because you say this ? i say thatZwDeleteFile
this is also win api. you not reply what is different betweenkernel32.DeleteFile
andntdll.ZwDeleteFile
? andZwDeleteFile
very well documented for use in both kernel and user modeZwDeleteFile
isn't part of the Windows API, because it isn't listed in the Windows API Index. The difference betweenZwDeleteFile
andDeleteFile
is, that one is part of the Windows API and the other isn't. A question being tagged winapi thus cannot use one, but can use the other.{2, 3, 5, 7, 11, 13}
, and someone decides to 'pick' 8, then surely, that someone didn't honor the constraints. That someone is going to argue, that8
is an equally good choice. It's a non-fractional number, positive, falls within the same range, and so on. The problem is, that that someone simply didn't see, what's special about the set of numbers to choose from.