IntByReference pdwProtocol = new IntByReference();
byte pbAtr[] = new byte[36];
IntByReference pcbAtrLen = new IntByReference();
pcbAtrLen.setValue(36);
NativeLong callStatus = nimpPcscDll.NimpSCardStatusW(new NativeLong(cardId), null, pcchReaderLen, pdwState, pdwProtocol, pbAtr, pcbAtrLen);
if (SCARD_S_SUCCESS != callStatus.longValue()) {
throw new PcScException(callStatus.intValue());
}
byte out[] = new byte[pcbAtrLen.getValue()];
for (int i = 0; i < pcbAtrLen.getValue(); i++) {
out[i] = pbAtr[i];