//读手牌码 public static int RF_ID(int seat_length, ref string id) { int rtv; sHandle hand = new sHandle(); rtv = GetHandId(ref hand); if (rtv == 0) { if (Convert.ToByte(hand.id1 ^ hand.id2 ^ hand.id3) == hand.id4) { id = asciicode[hand.id1 / 16].ToString() + asciicode[hand.id1 % 16].ToString(); id += asciicode[hand.id2 / 16].ToString() + asciicode[hand.id2 % 16].ToString(); id = id.Substring(4 - seat_length); return(0); } else { return(-1); } } else { return(rtv); } }
//读手牌码 public static int RF_ID(int seat_length, ref string id) { int rtv; sHandle hand = new sHandle(); rtv = GetHandId(ref hand); if (rtv == 0) { if (Convert.ToByte(hand.id1 ^ hand.id2 ^ hand.id3) == hand.id4) { id = asciicode[hand.id1 / 16].ToString() + asciicode[hand.id1 % 16].ToString(); id += asciicode[hand.id2 / 16].ToString() + asciicode[hand.id2 % 16].ToString(); id = id.Substring(4 - seat_length); return 0; } else return -1; } else return rtv; }
private static extern int SetHandId(ref sHandle RFID);