public static YkStatus YkStatus() { IntPtr yk = IntPtr.Zero; YkStatus st = new YkStatus(); yk = yk_open_first_key(); if (yk == IntPtr.Zero) { throw new YubikeyNotFoundException(); } bool result = yk_get_status(yk, ref st) == 1; return(st); }
private static extern int yk_get_status(IntPtr yk, ref YkStatus status);