First commit 07/07/2002
This commit is contained in:
89
Main.h
Normal file
89
Main.h
Normal file
@ -0,0 +1,89 @@
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
#ifndef MainH
|
||||
#define MainH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Menus.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
class TSmartCard_Reader : public TForm
|
||||
{
|
||||
__published: // IDE-managed Components
|
||||
TMainMenu *MainMenu1;
|
||||
TMenuItem *Archivo1;
|
||||
TMenuItem *Acercade1;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *Salir1;
|
||||
TMenuItem *Configuracin1;
|
||||
TMenuItem *Puertoserie1;
|
||||
TMenuItem *N2;
|
||||
TMenuItem *Conectar1;
|
||||
TMenuItem *Desconectar1;
|
||||
TMenuItem *ATR1;
|
||||
TMenuItem *N4;
|
||||
TStatusBar *StatusBar1;
|
||||
TPageControl *PageControl1;
|
||||
TTabSheet *TabSheet1;
|
||||
TTabSheet *TabHistorico;
|
||||
TMemo *mlog;
|
||||
TEdit *Edit1;
|
||||
TLabel *Label1;
|
||||
TEdit *Edit2;
|
||||
TUpDown *UpDown1;
|
||||
TUpDown *UpDown2;
|
||||
TLabel *Label2;
|
||||
TButton *Button1;
|
||||
TTabSheet *cmdManual;
|
||||
TMemo *Memo1;
|
||||
TLabel *Label3;
|
||||
TLabel *Label4;
|
||||
TEdit *Edit3;
|
||||
TBitBtn *BitBtn1;
|
||||
void __fastcall Puertoserie1Click(TObject *Sender);
|
||||
void __fastcall Conectar1Click(TObject *Sender);
|
||||
void __fastcall Desconectar1Click(TObject *Sender);
|
||||
void __fastcall Salir1Click(TObject *Sender);
|
||||
void __fastcall ATR1Click(TObject *Sender);
|
||||
void __fastcall Edit3KeyPress(TObject *Sender, char &Key);
|
||||
void __fastcall BitBtn1Click(TObject *Sender);
|
||||
private: // User declarations
|
||||
void __fastcall SendCommand( AnsiString cmd );
|
||||
public: // User declarations
|
||||
__fastcall TSmartCard_Reader(TComponent* Owner);
|
||||
void __fastcall Logger(AnsiString log);
|
||||
|
||||
|
||||
/* Funciones para tratar con el puerto serie... */
|
||||
HANDLE hCom;
|
||||
char ComErr[40],serconfig1[40],serconfig2[40];
|
||||
unsigned char ATR[40],ATRinv[40],lenATR;
|
||||
unsigned long delay;
|
||||
bool inver, atr;
|
||||
|
||||
void __fastcall CloseCOM(void);
|
||||
void __fastcall OpenCOM(void);
|
||||
|
||||
DWORD __fastcall SRead(BYTE *buf,DWORD bytes_to_read,DWORD wait);
|
||||
DWORD __fastcall SWrite(BYTE *buf,DWORD bytes_to_write);
|
||||
int __fastcall Send(unsigned char *out,char *buf,unsigned char *in,int m,int RL);
|
||||
|
||||
int __fastcall DoReset(void);
|
||||
int __fastcall SetConfig(const char *serconfig);
|
||||
unsigned char __fastcall inverso(unsigned char ch);
|
||||
int __fastcall getbyte(char *buf);
|
||||
int __fastcall getnyb(char c);
|
||||
int __fastcall getarr(unsigned char *a,char *buf,int n);
|
||||
int __fastcall getvar(unsigned char *a,char *buf);
|
||||
int __fastcall setarr(char *buf,unsigned char *a,int n);
|
||||
int __fastcall Open(const char *serconfig);
|
||||
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern PACKAGE TSmartCard_Reader *SmartCard_Reader;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
Reference in New Issue
Block a user