BugInTheSYS

Untitled

Nov 21st, 2011
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1.  
  2.     /// <summary>
  3.     /// Structure used in getaddrinfo() call
  4.     /// </summary>
  5.     /// <remarks></remarks>
  6.     [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
  7.     public unsafe struct addrinfo
  8.     {
  9.         public int ai_flags;
  10.         public int ai_family;
  11.         public int ai_socktype;
  12.         public int ai_protocol;
  13.         public uint ai_addrlen;
  14.         [System.Runtime.InteropServices.MarshalAsAttribute(System.Runtime.InteropServices.UnmanagedType.LPStr)]
  15.         public string ai_canonname;
  16.         public sockaddr* ai_addr; //ERROR
  17.         public addrinfo* ai_next; //ERROR
  18.     }
  19.  
  20. //Example from C# language specification:
  21.     public unsafe struct Node
  22.     {
  23.         public int Value;
  24.         public Node* Left;
  25.         public Node* Right;
  26.     }
  27.  
  28. //Y U NO WORK?
  29.  
Advertisement
Add Comment
Please, Sign In to add comment