> Really nice  to see that, ntdeviceiocontrol thread could be put in
> alertable state and  thus safely stopable by an APC.

APC to stop? Do you mean call WSAIoctl and then use an APC to terminate the 
thread? I don't think that would be safe and I assume there would remain a 
pending operation if the socket is blocking.

> If you could try direclty the  ntdeviceiocontrol with the same flag we
> could have some good  clue. 

I don't think that will work. In wsaioctl when ntdeviceiocontrol is called an 
input buffer is passed. The buffer contents varies. Also there is an 
enter/leavecriticalsection.

> What give  FILE_MODE_INFORMATION query using NtQueryInformationFile on
> (Handle) Socket  ?

What should I be looking for?

> Yes but  it seems that a least C# know when socket is non blocking. Yes
> you could help  but we are clueless how to determine 

I monitored getting the C# Socket.Blocking property but I'm not seeing any 
ws2_32 or ntdeviceiocontrol etc called when that happens. I also monitored 
setting the property and in those cases ioctlsocket(wsaioctl) is called with 
FIONBIO. It's possible that managed code stores the last known state internally 
and returns it when a get is attempted.

Jay

Reply via email to