10    internal static class Kernel32
 
   12        [DllImport(
"kernel32.dll", 
CharSet = 
CharSet.Unicode, EntryPoint = 
"LoadLibraryExW", ExactSpelling = 
true, 
SetLastError = 
true)]
 
   37        [StructLayout(
LayoutKind.Sequential, Size = 408)]
 
   69        [DllImport(
"ws2_32.dll", ExactSpelling = 
true, SetLastError = 
true)]
 
   72        [DllImport(
"ws2_32.dll", SetLastError = 
true)]
 
   75        [DllImport(
"ws2_32.dll", BestFitMapping = 
false, 
CharSet = 
CharSet.Unicode, SetLastError = 
true, ThrowOnUnmappableChar = 
true)]
 
   76        internal unsafe 
static extern SocketError GetNameInfoW(
byte* pSockaddr, 
int SockaddrLength, 
char* pNodeBuffer, 
int NodeBufferSize, 
char* pServiceBuffer, 
int ServiceBufferSize, 
int Flags);
 
   78        [DllImport(
"ws2_32.dll", BestFitMapping = 
false, 
CharSet = 
CharSet.Unicode, ExactSpelling = 
true, SetLastError = 
true, ThrowOnUnmappableChar = 
true)]
 
   81        [DllImport(
"ws2_32.dll", ExactSpelling = 
true, SetLastError = 
true)]
 
   90            unsafe 
static void Initialize()
 
 
  105        [DllImport(
"ws2_32.dll")]
 
  108        [DllImport(
"ws2_32.dll")]
 
  111        [DllImport(
"ws2_32.dll", 
CharSet = 
CharSet.Unicode, SetLastError = 
true)]
 
  114        [DllImport(
"ws2_32.dll", 
CharSet = 
CharSet.Unicode, ExactSpelling = 
true, SetLastError = 
true)]
 
  115        internal unsafe 
static extern int GetAddrInfoExW([In] 
string pName, [In] 
string pServiceName, [In] 
int dwNamespace, [In] 
IntPtr lpNspId, [In] 
AddressInfoEx* pHints, [Out] 
AddressInfoEx** ppResult, [In] 
IntPtr timeout, [In] 
NativeOverlapped* lpOverlapped, [In] delegate* unmanaged<int, int, NativeOverlapped*, void> lpCompletionRoutine, [Out] 
IntPtr* lpNameHandle);
 
  117        [DllImport(
"ws2_32.dll", ExactSpelling = 
true)]
 
  120        [DllImport(
"ws2_32.dll", ExactSpelling = 
true)]
 
 
static void SetLastError(int errorCode)
 
static IntPtr LoadLibraryEx(string libFilename, IntPtr reserved, int flags)
 
static unsafe int GetAddrInfoW([In] string pNameName, [In] string pServiceName, [In] AddressInfo *pHints, [Out] AddressInfo **ppResult)
 
static unsafe SocketError GetNameInfoW(byte *pSockaddr, int SockaddrLength, char *pNodeBuffer, int NodeBufferSize, char *pServiceBuffer, int ServiceBufferSize, int Flags)
 
static unsafe void FreeAddrInfoExW(AddressInfoEx *pAddrInfo)
 
static IntPtr WSASocketW([In] AddressFamily addressFamily, [In] SocketType socketType, [In] int protocolType, [In] IntPtr protocolInfo, [In] int group, [In] int flags)
 
static SocketError WSACleanup()
 
static SocketError closesocket([In] IntPtr socketHandle)
 
static unsafe SocketError gethostname(byte *name, int namelen)
 
static unsafe int GetAddrInfoExW([In] string pName, [In] string pServiceName, [In] int dwNamespace, [In] IntPtr lpNspId, [In] AddressInfoEx *pHints, [Out] AddressInfoEx **ppResult, [In] IntPtr timeout, [In] NativeOverlapped *lpOverlapped, [In] delegate *unmanaged< int, int, NativeOverlapped *, void > lpCompletionRoutine, [Out] IntPtr *lpNameHandle)
 
static void EnsureInitialized()
 
static unsafe SocketError WSAStartup(short wVersionRequested, WSAData *lpWSAData)
 
static unsafe void FreeAddrInfoW(AddressInfo *info)
 
static unsafe int GetAddrInfoExCancel([In] IntPtr *lpHandle)
 
static int CompareExchange(ref int location1, int value, int comparand)
 
AddressInfoHints ai_flags
 
unsafe AddressInfoEx * ai_next
 
unsafe AddressInfo * ai_next
 
unsafe sbyte * ai_canonname
 
AddressInfoHints ai_flags