zoukankan      html  css  js  c++  java
  • 发送指令

    CString CLZYHDlg::SendCommd(CString Command)
    {
    BYTE BackBuf[1024];
    memset(BackBuf,0,1024);
    int BackbufLen = 0;

    BYTE _SIMNo;

    BYTE WriteDataBuf[1024];
    memset(WriteDataBuf,0x00,sizeof(WriteDataBuf));
    int WriteDataBufLen;

    BYTE buf[1024];
    memset(buf,0,1024);

    WriteDataBufLen = Command.GetLength() / 2;
    if (WriteDataBufLen == 0)
    {
    AfxMessageBox("Please input the APDU command string!");
    return "";
    }
    if (GetDECData(buf,Command))
    {
    AfxMessageBox("nThe data to wrote is not validity!");
    return "";
    }

    for (int i=0;i< Command.GetLength() /2 ;i++)
    {
    WriteDataBuf[i] = buf[i];
    }
    WriteDataBufLen = Command.GetLength() /2;

    unsigned char rlen,recdata[1024];
    memset(recdata,0x00,1024);

    int st = phtwd_cpuapdu(icdev,WriteDataBufLen,WriteDataBuf,&rlen,recdata);
    if (st != 0)
    {
    MessageBox("failed");
    return "";
    }
    return Lication(recdata,rlen);
    }

  • 相关阅读:
    ListView
    ScrollView-电影列表
    ScrollView
    Image组件
    TextInput
    Touchable类组件
    Text
    View
    FlexBox
    StyleSheet
  • 原文地址:https://www.cnblogs.com/dengpeng1004/p/4279766.html
Copyright © 2011-2022 走看看