Unitech mr350 mkii Software Guide

Page of 33
 
29
3.20 
F_SET_SC 
This function unlocks/changes a secret code in the secret code file under the currently selected DF. 
There is no limit to the number of times that a secret code can be unlocked/changed. 
 
 
Compatible with ISO7816 or Gemplus command set 
 
 
Genplus 
 
 
Function call 
void F_SET_SC( S_SET_SC* ); 
   
 
Data structure of S_SET_SC 
typedef struct 
int Class; 
int Mode; 
int CodeNum; 
unsigned char ChkValue[8]; 
unsigned char NewValue[8]; 
int IdOk; 
unsigned char Sw12[2]; 
} S_SET_SC; 
 
    Input parameter : 
Class   
 
:0:NORMAL     
 
 
1:SECURE 
Mode     
:0:change secret code      
1:unlock code 
CodeNum   
:code number 0-7 only. 
ChkValue[]    :holds Previous/unlock code 
NewValue[]  :holds new code value 
 
   Output parameter : This function updates the following parameters. 
IdOk       : 0 = OK   
 
1 = Timeout   
2 = No card 
; 3 = EDC error 
5 = Parity error 
7 = see SW1-SW2 
Sw12[]     :SW1-SW2