public static void GetAuthInfoHack (int fd, out AuthInfo authinfo) { /* string fname = UnixMarshal.PtrToStringUnix (XauFileName ()); Trace.WriteLine ("auth fname: " + fname); */ Xau xau = new Xau (); //string fname = xau.GetFileName (); //foreach (Xauth xauth in xau.ReadAuths (fname)) foreach (Xauth xauth in xau) { Trace.WriteLine (xauth.Name); } /* UnixFileInfo ufi = new UnixFileInfo (fname); UnixStream us = ufi.OpenRead (); Trace.WriteLine ("a: " + us.Handle); IntPtr auth = XauReadAuth (us.Handle); Trace.WriteLine ("auth: " + auth); us.Close (); */ IntPtr authPtr = XauGetAuthByAddr ((ushort)AddressFamily.Unix, (ushort) 5, "rover", 1, "1"); Trace.WriteLine ("authPtr: " + authPtr); authinfo = new AuthInfo (); }
static extern IntPtr XCBConnectToFD (int fd, ref AuthInfo auth);
static extern int XCBGetAuthInfo (int fd, out AuthInfo auth);
static extern IntPtr XCBConnectToFD(int fd, ref AuthInfo auth);
static extern int XCBGetAuthInfo(int fd, out AuthInfo auth);