using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;//这是用到DllImport时候要引入的包
namespace ReadCard
{
    class ReadCardSDK
    {

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsReadIDCard", CharSet = CharSet.Auto, CallingConvention = CallingConvention.StdCall)]
        public static extern int KsReadIDCard();

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetName", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetName(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetNation", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetNation(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetSex", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetSex(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsBirthday", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsBirthday(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsAddress", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsAddress(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetStartTime", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetStartTime(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetEndTime", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetEndTime(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetPeopleIDCode", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetPeopleIDCode(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetDepartment", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetDepartment(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetIdCardImgPath", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetIdCardImgPath(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetGuidInfo", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetGuidInfo(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetSimIDInfo", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetSimIDInfo(Byte[] buf, int iLen);

        [DllImport("IdCardLibWrappage.dll", EntryPoint = "KsGetIcCardInfo", CharSet = CharSet.Auto, SetLastError = false)]
        public static extern int KsGetIcCardInfo(Byte[] buf, int iLen);
    }
}
