#pragma comment(lib,"LFReaderAPI.lib")
#include "LFReaderAPI.h"
#include <iostream> 


int main() 
{
	if(gOpenReader("COM3", 38400))//
	{
		std::cout<<"1->打开读写器"<<std::endl;
		gSetBeep(50);

		BYTE model[50];
		int res_len;
		gGetModel(model, &res_len);
		model[res_len] = 0;
		std::cout<<"2->读卡器型号：";
		std::cout<<model<<std::endl;

		std::cout<<"3->关闭读卡器"<<std::endl;
		gCloseReader();
	} 
	else
	{
		std::cout<<"连接读写器时发生错误"<<std::endl;
	}
	getchar();  
	return 0; 
}  