(Solved) – how to call dll from ms access?


im calling a JordanIdCardReader.dll in c# and everything sounds good this is the code in c#
how can i call this dll file in vba ms access , i know i have to use the Declare keyword as the following
Public Declare Function test1 Lib “C:WindowsSystem32JordanIdCardReader.dll” (ByRef card_no As String) As String but i dont know how to declare the parameters to it ? any help?

CardReader reader = new CardReader();

            CardInfo cardInfo = reader.Read(Card_no.Text);

            txtFirstName.Text = cardInfo.FirstNameEn;
            txtMiddleName.Text = cardInfo.MiddleNameEn;
            txtFamilyName.Text = cardInfo.LastNameEn;
            txtNameAR.Text = cardInfo.FullNameAr;
            txtPhoneNum.Text = cardInfo.MobileNumber;
            txtMobNum.Text = cardInfo.PhoneNumber;
            txtBirthDate.Text = cardInfo.DateOfBirth;
            txtAddress1.Text = cardInfo.Address1;
            txtAddress2.Text = cardInfo.Address2;
            txtCity.Text = cardInfo.City;
            txtID.Text = cardInfo.IdNumber;
            txtExpiryDate.Text = cardInfo.ExpiryDate;
            txtNationalID.Text = cardInfo.NationalId;
            txtIssuePlace.Text = cardInfo.IssuePlace;
            txtGender.Text = cardInfo.Gender;
            txtMotherName.Text = cardInfo.MotherName;
            txtAddress.Text = cardInfo.Address;
            txtCivilNum.Text = cardInfo.CivilNumber;
            txtCivilOffic.Text = cardInfo.CivilOffice;

Leave a Reply

Your email address will not be published. Required fields are marked *