[ofw] WV:Disconnect return values

Fab Tillier ftillier at windows.microsoft.com
Wed Feb 11 16:56:06 PST 2009


I'm trying to figure out the expected status values for disconnection in WinVerbs.

If both sides call Disconnect at roughly the same time, both Disconnect requests will get completed in error with STATUS_CONNECTION_DISCONNECTED.

If one side calls Disconnect after receiving the DREQ, it sends the DREP and returns STATUS_SUCCESS.

If one side initiates disconnection by calling Disconnect, when the DREP is received the call fails with STATUS_CONNECTION_DISCONNECTED.

It seems to me all of these should complete with STATUS_SUCCESS.

Also, it doesn't seem that the code checks to see what IRP is being completed.  For example, if a NotifyDisconnect request is outstanding, it will get completed with STATUS_CONNECTION_DISCONNECTED, along with the Disconnect request and whatever other IRP might be queued.

Also, if a user requested NotifyDisconnect, and then initiates disconnection, shouldn't that satisfy the NotifyDisconnect request? Isn't NotifyDisconnect used to detect when disconnection begins?  Or is it strictly for remotely initiated disconnection?



More information about the ofw mailing list