Gunnar Dalsnes wrote:
Sounds more like a bug than a "feature". And if this was a feature, we would all be expected to try to find the possibly created handle in the handletable every time a handle creating routine failed:-)
No, it's not a bug. A function might have created directories, symbolic links, driver objects, ... that operated already, if you closed the handle you might destroy some of these things even though other applications or other parts of the operating system are already aware of them and all the sudden e.g. devices might vanish. So it actually makes sense. Remember, some objects perform certain operations (like closing completion ports) if the last handle was closed.
Best Regards, Thomas