< Back to Tools Directory
using System; //C# example byte[] idBuf = new byte[32]; int idRaw = 0; int id = 0; int fac = 0; int B = 8; //or Set B=32 for large card IDs short bits = 0; if(B == 32) { bits = RFIDeas_pcProxAPI.pcProxDLLAPI.getActiveID32(32); } else { bits = RFIDeas_pcProxAPI.pcProxDLLAPI.getActiveID(8); } for(short z=0; z<B; z++) { idBuf[(B-1)-z]=RFIDeas_pcProxAPI.pcProxDLLAPI.getActiveID_byte(z); } if(bits > 0) { // Convert BYTE array to long [0]= MSB..[n]=LSB for(int i = 0; i<(bits+7)/8; i++) { idRaw = (idRaw<<8) | idBuf[i]; } id = idRaw>>1; // Remove Trailing parity id = (int)(idRaw & 0x0ffffL); fac = id>>17; fac &= 0x0ff; Console.Write("Card Bits={0:D},FAC={1:D},ID={2:D}\n",bits,fac,id); }