Lines Matching refs:IntPtr
34 private static extern int strlen (IntPtr ptr); in strlen()
37 private static extern IntPtr avahi_address_snprint (IntPtr buf, int size, IntPtr address); in avahi_address_snprint()
40 private static extern IntPtr avahi_address_parse (IntPtr str, Protocol proto, IntPtr ret); in avahi_address_parse()
42 public static string PtrToString (IntPtr ptr) in PtrToString()
44 if (ptr == IntPtr.Zero) in PtrToString()
53 public static string PtrToStringFree (IntPtr ptr) in PtrToStringFree()
55 if (ptr == IntPtr.Zero) in PtrToStringFree()
71 private static IntPtr StringToPtr (string str) in StringToPtr()
74 return IntPtr.Zero; in StringToPtr()
77 IntPtr buf = Stdlib.malloc ((uint) bytes.Length + 1); in StringToPtr()
83 public static void Free (IntPtr ptr) in Free()
88 public static IntPtr AddressToPtr (IPAddress address) in AddressToPtr()
90 IntPtr straddr = Utility.StringToPtr (address.ToString ()); in AddressToPtr()
91 IntPtr addrPtr = Stdlib.malloc (32); in AddressToPtr()
98 public static IPAddress PtrToAddress (IntPtr ptr) in PtrToAddress()
102 if (ptr != IntPtr.Zero) { in PtrToAddress()
103 IntPtr buf = Stdlib.malloc (256); in PtrToAddress()
104 IntPtr addrPtr = avahi_address_snprint (buf, 256, ptr); in PtrToAddress()