USB接口ID卡读卡器oem软件/读写卡测试程序及源代码/c++builder源代码 (2)

这篇博客详细介绍了如何使用C++Builder进行USB接口ID卡读卡器的读写卡操作,包括读取卡信息、设备发声、读取设备序列号的源代码示例,并提供了遇到问题时的联系方式和动态库加载方法。
摘要由CSDN通过智能技术生成

 

 

详细代码如下(如有疑问可13826029618进行咨询或者获取源代码)

 

 

 

//---------------------------------------------------------------------------

//广州荣士电子,定制13826029618 网址http://www.icmcu.com


#include <vcl.h>
#pragma hdrstop

#include "Unit1.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------


void __fastcall TForm1::Button1Click(TObject *Sender)
//轻松读卡
{
/*
技术支持:
网站:
*/
        unsigned char status;//存放返回值
        unsigned char idserial[5]; //卡数据缓冲
        unsigned char (__stdcall *idr_read)(unsigned char *serial);
        //判断动态库是否存在
        AnsiString FileName=ExtractFilePath(Application->ExeName);
        if(FileName.SubString(FileName.Length(),1) != "//")
        {
             FileName += "//";
        }
        FileName += "OUR_IDR.dll";
        if(!FileExists(FileName))
        {
                ShowMessage("无法在应用程序的文件夹找到OUR_IDR.dll");
                return;
        }
        //提取函数
        HINSTANCE hDll;
        hDll=LoadLibrary(FileName.c_str());
        idr_read = (unsigned char (__std

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值