On 23.10.2015 02:03, Erich E. Hoover wrote:
Now that we have TransmitFile support, there are a couple important flags that are frequently used by applications utilizing this feature (particularly in async mode). This patch adds support for the TF_DISCONNECT flag, which closes out the socket handle once the TransmitFile operation is complete.
I would prefer a solution without NtClose from an APC callback. I have tests in the Staging tree, which show that NtClose will throw an exception for invalid handles, when a debugger is attached.