$. "kyt_7000.dll" Library 
     - Library for Windows NT4.0/2000/XP and Windows 98/Millennium
     - Notice: BYTE==unsigned char, UINT==unsigned int
=====================================================================

@. EnablePort()
     - Set the serial port to communicate with the terminal.
	
* PROTOTYPE 
     - BOOL EnablePort(char* port, BYTE size, BYTE parity, BYTE stopbit
       , DWORD baudrate, BYTE control)
* PARAMETERS(Refer to "struct _DCB" in the MSDN.)
     - port      : ex) "COM1", "COM2", ...
     - size      : Number of bits/byte, 4-8.
     - parity    : 0-4=None,Odd,Even,Mark,Space.
     - stopbit   : 0,1,2 = 1, 1.5, 2.
     - baudrate  : Baudrate at which running.
     - control   : 0,1,2,3 = None, XOn/XOff, RTS/CTS, Both.
* RETURN
     - Normal: 1
     - Error : 0
=====================================================================

@. DisablePort()
     - Close the serial port to communicate with the terminal.

* PROTOTYPE 
     - BOOL DisablePort()
* PARAMETERS : void
* RETURN     : 
     - Normal: 1
     - Error : 0
=====================================================================

@. chk_res()
     - Check finishing the execution about the request command. and read 
       the result values about the request command.

* PROTOTYPE 
     - int chk_res(BYTE *pbp_stat, BYTE *pbp_res, 
       UINT *pipu_res_len, BYTE * pbp_prc_no, int *pi_errno)
* PARAMETERS
     - pbp_stat: The Pointer of the buffer to take the status value(1BYTE) of the terminal.
     - pbp_res: The Pointer of the buffer to take the result value of the request command
     - res_len: The length of pbp_res
     - pbp_prc_no: The variable for save the sequence number of the request command to process.
     - pi_errno:
         . Normal: 0
         . Error : etc(Refer Error Code List.)
* RETURN
     - 0:	Don't finish the processing.
     - 1:	Finish the processing.
* DETAIL
     - If(pi_errno!=0): You must handle that error
     - If(pi_errno==2000): Negative Response save Negative Code(2Byte) in pbp_res variable.
=====================================================================

@. exe_stop()
     - Stop process about request command.
     	
* PROTOTYPE 
     - void exe_stop()
* PARAMETERS : void
* RETURN 	 : void
* DETAIL
     - If you must stop the execution because of the time is delayed. 
       Call exe_stop() function.
=====================================================================

@. call_src_ver()
     - Display source version of the dll program into the Message Box
	
* PROTOTYPE 
     - void call_src_ver()
* PARAMETERS : void
* RETURN     : void 

=====================================================================
 $. eject()
      - eject the card in the terminal.
	
 * PROTOTYPE 
      - int eject()
 * PARAMETERS	: void
 * RETURN : The Sequence number about that request
      - It is utilized to confirm whether it is the result about request 
        when you read the result.
=====================================================================
 
 @. read_ms_data()
      - Read the Magnetic Card Data

 * PROTOTYPE 
      - int read_ms_data()
 * PARAMETERS : void
 * RETURN : The Sequence number about that request
      - It is utilized to confirm whether it is the result about request 
        when you read the result.
=====================================================================

 @. stat_rqt()
      - Request Status Value.
	
 * PROTOTYPE 
      - int stat_rqt()
 * PARAMETERS : void
 * RETURN : The Sequence number about that request
      - It is utilized to confirm whether it is the result about request 
        when you read the result.
=====================================================================
@. ver_rqt()
      - Read F/W Version of the terminal.
	
 * PROTOTYPE 
      - int ver_rqt()
 * PARAMETERS : void
 * RETURN : The Sequence number about that request
      - It is utilized to confirm whether it is the result about request 
        when you read the result.

=====================================================================

 @. set_baudrate()
       - Baud Rate Setting Command

 * PROTOTYPE 
      - int set_baudrate(BYTE pb_baudrate)
 * PARAMETERS : 
      - pb_baudrate
          .pb_baudrate=='0': 9600 BPS
          .pb_baudrate=='1': 19200 BPS(Default)
          .pb_baudrate=='2': 38400 BPS
 * RETURN : The Sequence number about that request
      - It is utilized to confirm whether it is the result about request 
        when you read the result.
=====================================================================


$. Error Code List

1		: No ACK Error
2		: TIMEOUT Error
3		: NAK Error
2000	: Negative Error
102		: Compulsion termination Error
106		: Packet Frame Error
107		: BCC Error


$. Implement the Manager Program.

1.Open and set the serial port by calling EnablePort() function in7000.dll.

2.Call eject(), ver_rqt(), read_ms_data(),... function according to the deed to do.

The Returned value(pbp_prc_no) in an each function is the sequence number about that

request command.

It is utilized to confirm whether it is the result about the request when you read the

result of the request command.

3. For confirm the result about the request. First you ckeck finishing the execution

about the request by chk_res() function. if that finished the execution. Process the result values.

4.If you must stop the execution because of the time is delayed. Call exe_stop() function.

5.Call DisablePort() function if you close the serial port.

6. If you changes the setup of the serial port. call EnablePort() function again.

But you must call DisablePort() function for close the existing serial port before call 

EnablePort() function.

