.586 .MODEL FLAT, STDCALL OPTION CASEMAP :NONE INCLUDE \MASM32\INCLUDE\WINDOWS.INC INCLUDE \MASM32\INCLUDE\USER32.INC INCLUDE \MASM32\INCLUDE\KERNEL32.INC INCLUDE \MASM32\INCLUDE\GDI32.INC INCLUDE \MASM32\INCLUDE\COMDLG32.INC INCLUDELIB \MASM32\LIB\USER32.LIB INCLUDELIB \MASM32\LIB\KERNEL32.LIB INCLUDELIB \MASM32\LIB\GDI32.LIB INCLUDELIB \MASM32\LIB\COMDLG32.LIB INCLUDELIB \MASM32\LIB\DDRAW.LIB WindowProc PROTO STDCALL, :DWORD, :DWORD, :DWORD, :DWORD ;======================================================================== .DATA ;------------------------------------------------------------------------ ;dll hInstDLL DWORD ? reason DWORD ? unused DWORD ? ;------------------------------------------------------------------------ iBytesRead DD ? iBytesWritten DD ? ; smart card reader GemPC410 & GPM2K portName DB "COMx",0 hCom DD ? dcb DCB dcbString DB "baud=9600 parity=N data=8 stop=1",0 cto COMMTIMEOUTS comstat COMSTAT ; GemCore 1.21 based reader commands GCR121Restart DB 00Ch,000h,000h,000h GCR121ReadFirmVers DB 022h,005h,03fh,0E0h,010h GCR121DisRosComp DB 001h,000h,000h ; which command is this ? ; GBP protocol RESET_TEMPTATIVES DD ? GBP_Temptatives DD ? ;left temptatives to read a char from COMx: GBP_NAD DB 042h ;command NAD GBP__NAD DB ? ;response NAD GBP_PCB DB ? ;command PCB GBP__PCB DB ? ;response PCB GBP_SequenceBit DB ? ;00000000b or 01000000b GBP__SequenceBit DB ? ;00000000b or 01000000b GBP_LEN DD ? ;command length GBP__LEN DD ? ;response length GBP_Command DB 270 DUP(?) ;app 2 reader buffer GBP__Response DB 270 DUP(?) ;reader 2 app buffer GBP_EDC DB ? ;command EDC GBP__EDC DB ? ;response EDC GBP__CalcEDC DB ? ;calculated response EDC GBP_Error DD ? ;command error GBP__Error DD ? ;response error (from PCB) ; GemPC410 reader commands GPC410Led DB 055h,000h ; GPM2K memory smart card commands GPM2KSetCardType DB 017h,009h ;GemCore 1.21 command 0x17 GPM2KCardPowerUp DB 012h ;GemCore 1.21 command 0x12 GPM2KCardPowerDn DB 011h ;GemCore 1.21 command 0x11 ; the following command 0x14 is "Send Data to Synchronous card (ISO In)" ; followed by 8 bytes "Present Card Secret Code" (GPM2K specific command) GPM2KChkSecrCode DB 014h,000h,020h,000h,000h,003h,000h,000h,000h ; the following command 0x14 is "Send Data to Synchronous card (ISO In)" ; followed by 8 bytes "Write Card Secret Code" (GPM2K specific command) GPM2KSetSecrCode DB 014h,000h,0D0h,0C0h,001h,003h,000h,000h,000h GPM2KRead DB 013h,000h,0B0h,000h,000h,000h GPM2KWrite DB 014h,000h,0D0h,000h,000h,000h DB 256 DUP(?) ;======================================================================== .code ;------------------------------------------------------------------------ DllEntryPoint proc h_InstDLL:DWORD, r_eason:DWORD, u_nused:DWORD ;-------------------------------------------; PUSH h_InstDLL POP hInstDLL PUSH r_eason POP reason PUSH u_nused POP unused MOV EAX,1 ;thanks, Luca !! RET ;-------------------------------------------; DllEntryPoint Endp ;======================================================================== INCLUDE FFGCR121.INC ;======================================================================== End DllEntryPoint