LPFN_DISCONNECTEX.cs 1.5 KB

1234567891011121314151617181920212223
  1. using System;
  2. namespace Microsoft.Win32
  3. {
  4. //LPFN_DISCONNECTEX定义
  5. public static partial class NativeMethods
  6. {
  7. /// <summary>
  8. /// The DisconnectEx function closes a connection on a socket, and allows the socket handle to be reused.Note This function is a Microsoft-specific extension to the Windows Sockets specification.
  9. /// </summary>
  10. /// <param name="s">A handle to a connected, connection-oriented socket.</param>
  11. /// <param name="lpOverlapped">A pointer to an OVERLAPPED structure. If the socket handle has been opened as overlapped, specifying this parameter results in an overlapped (asynchronous) I/O operation.</param>
  12. /// <param name="dwFlags">A set of flags that customizes processing of the function call. When this parameter is set to zero, no flags are set. The dwFlags parameter can have the following value.</param>
  13. /// <param name="dwReserved">Reserved. Must be zero. If nonzero, WSAEINVAL is returned.</param>
  14. /// <returns>On success, the DisconnectEx function returns TRUE. On failure, the function returns FALSE. Use the WSAGetLastError function to get extended error information. If a call to the WSAGetLastError function returns ERROR_IO_PENDING, the operation initiated successfully and is in progress. Under such circumstances, the call may still fail when the operation completes.</returns>
  15. public delegate bool LPFN_DISCONNECTEX(
  16. IntPtr s,
  17. IntPtr lpOverlapped,
  18. int dwFlags,
  19. int dwReserved
  20. );
  21. }
  22. }