mykadpro@onlineapp.com.my
Bandar Putra Permai, Selangor
MYKAD SDK API Call
Function BeginJPN(ByVal Readername As String, ByVal LicenseKey As String) As String
Function getIDNum() As String
Function getOldIDNum() As String
Function getKPTName() As String
Function getGMPCName() As String
Function getBirthDate() As String
Function getBirthPlace() As String
Function getReligion() As String
Function getGender() As String
Function getRace() As String
Function getAddress() As String
Function getAddress1() As String
Function getAddress2() As String
Function getAddress3() As String
Function getPostcode() As String
Function getCity() As String
Function getState() As String
Function getCitizenship() As String
Function getDateIssued() As String
Function getCardVer() As String
Function getSocsoNum() As String
Function getLocality() As String
Function getGreenCardExpiry() As String
Function getGreenCardNationality() As String
Function getPhoto(ByVal Filename As String) As Boolean
Function getPhotoBase64String() As String
Function getPhotoEx(ByRef memstream As MemoryStream) As Boolean
Function getThumbRight(ByVal strFilename As String) As Boolean
Function getThumbLeft(ByVal strFilename As String) As Boolean
Function getRegistrationKey() As String
Function EndJPN() As String
Sample HTML Code for Web Developer. PHP, JAVA and ASP.NET
Microsoft Internet Explorer Only!
1. MYKAD READER. FT SCR301 0
2. MYKAD READER. uTrust 2700 R
3. BIOMETRICS MYKAD SDK. SAGEM READER
Microsoft Internet Explorer , Chrome and Mozilla
4. OPENWEB SDK. MYKADPRO SERVICE
*View page source to view the HTML and javascript.
Sample Source Code VB.NET
'--must start with BeginJPN
'each pc need license key. call getRegistrationKey and login online to generate licensekey
strRet = oMYKAD.BeginJPN(txtReadername.Text, txtLicensekey.Text)
If strRet <> "0" Then
MsgBox(strRet)
lstResult.Items.Clear()
Exit Sub
End If
lstResult.Items.Add("getRegistrationKey:" & oMYKAD.getRegistrationKey())
'--start
lstResult.Items.Add("Timing Start:" & Now.ToLongTimeString)
Dim strIDNum As String = oMYKAD.getIDNum
lstResult.Items.Add("getIDNum:" & strIDNum)
lstResult.Items.Add("getKPTName:" & oMYKAD.getKPTName)
lstResult.Items.Add("getGMPCName:" & oMYKAD.getGMPCName)
lstResult.Items.Add("getOldIDNum:" & oMYKAD.getOldIDNum)
lstResult.Items.Add("getRace:" & oMYKAD.getRace)
lstResult.Items.Add("getReligion:" & oMYKAD.getReligion)
lstResult.Items.Add("getAddress:" & oMYKAD.getAddress)
'--how to split the address into a few lines. separator in address is pipeline |
Dim strAddress As String
Dim strTemp As String
strAddress = oMYKAD.getAddress
strTemp = strAddress.Replace("|", vbCrLf)
txtAddress.Text = strTemp
'--address already in separate field
lstResult.Items.Add("getAddress1:" & oMYKAD.getAddress1)
lstResult.Items.Add("getAddress2:" & oMYKAD.getAddress2)
lstResult.Items.Add("getAddress3:" & oMYKAD.getAddress3)
lstResult.Items.Add("getPostCode:" & oMYKAD.getPostCode)
lstResult.Items.Add("getCity:" & oMYKAD.getCity)
lstResult.Items.Add("getState:" & oMYKAD.getState)
'--continue reading
lstResult.Items.Add("getBirthDate:" & oMYKAD.getBirthDate)
lstResult.Items.Add("getBirthPlace:" & oMYKAD.getBirthPlace)
lstResult.Items.Add("getCitizen:" & oMYKAD.getCitizenship)
lstResult.Items.Add("getGender:" & oMYKAD.getGender)
lstResult.Items.Add("getIssueDate:" & oMYKAD.getDateIssued)
lstResult.Items.Add("getCardVer:" & oMYKAD.getCardVer)
lstResult.Items.Add("getThumbLeft:" & oMYKAD.getThumbLeft("left.txt"))
lstResult.Items.Add("getThumbRight:" & oMYKAD.getThumbRight("right.txt"))
lstResult.Items.Add("getSocsoNum:" & oMYKAD.getSocsoNum)
lstResult.Items.Add("getLocality:" & oMYKAD.getLocality)
lstResult.Items.Add("getGreenCardExpiry:" & oMYKAD.getGreenCardExpiry)
lstResult.Items.Add("getGreenCardNationality:" & oMYKAD.getGreenCardNationality)
If chkLoadPhoto.Checked = True Then
'--sample to get photo from mykad and direct load to screen
'Dim photostream As New MemoryStream
'photostream = New MemoryStream
'If oMYKAD.getPhotoEx(photostream) = True Then
' picMYKAD.Image = System.Drawing.Image.FromStream(photostream)
'End If
'photostream.Close()
'--sample get photo from mykad and save to local disk, bfore loading to screen
Dim strFilename As String = Application.StartupPath & "\" & strIDNum & ".jpg"
If oMYKAD.getPhoto(strFilename) = True Then
picMYKAD.ImageLocation = strFilename
End If
'--sample get photo base64 string
'Dim strPhotoBase64String As String = oMYKAD.getPhotoBase64String
'lstResult.Items.Add("getPhotoBase64String:" & strPhotoBase64String)
End If
lstResult.Items.Add("Timing End:" & Now.ToLongTimeString)
'--must end with EndJPN
strRet = oMYKAD.EndJPN()
Sample FOXPRO Source Code
1. Install the driver and sdk as usual.
2. Run foxpro and click 'Object Browser'.
Then select the
TLB file, NOT DLL file!
3. Visual Foxpro source code
------------- start ---------------
LOCAL cReturn, cReader_Name, cLicenseKey, oObject
cLicenseKey = "your license key"
cReader_Name = "FT SCR2000 0"
oObject=CreateObject("mykadpro.mykad.jpn")
cReturn = oObject.BeginJPN(cReader_Name,cLicenseKey)
IF cReturn=="0" && if success
WAIT WINDOW oObject.getIDNum()
WAIT WINDOW oObject.getOldIDNum()
WAIT WINDOW oObject.getKPTName()
WAIT WINDOW oObject.getGMPCName()
WAIT WINDOW oObject.getAddress()
WAIT WINDOW oObject.getCardVer()
ELSE
MESSAGEBOX(cReturn)
ENDIF
------------- end ---------------