int control(IntPtr hCard, int controlCode, byte[] sendBuffer, byte[] recvBuffer) { int bytesReturned = 0; uint ret = NfcApi.SCardControl(hCard, controlCode, sendBuffer, sendBuffer.Length, recvBuffer, recvBuffer.Length, ref bytesReturned); if (ret != NfcConstant.SCARD_S_SUCCESS) { Debug.LogWarning("カードへの制御命令送信に失敗しました。code = " + ret); } return(bytesReturned); }
int control(IntPtr hCard, int controlCode, byte[] sendBuffer, byte[] recvBuffer) { int bytesReturned = 0; uint ret = NfcApi.SCardControl(hCard, controlCode, sendBuffer, sendBuffer.Length, recvBuffer, recvBuffer.Length, ref bytesReturned); if (ret != NfcConstant.SCARD_S_SUCCESS) { throw new ApplicationException("カードへの制御命令送信に失敗しました。code = " + ret); } return(bytesReturned); }