I am calling a dll ( written in vb6 ) from asp.net application . I am calling the following function of dll :
Public Function FamIdentify_BYTE(strName As String, strDatabaseTemplate As Variant, len_of_data As Long, strIdentifyTemplate As String, strIP As String) As Boolean
The following code in C# calls the above function :
public Boolean VerifyFinger(String name , String SampleModel, String REMOTE_ADDR)
{
try
{
Connect();
OracleCommand command = connection.CreateCommand();
string sql = "SELECT FINGER_DATA,DATA_LENGTH,SERIAL_NO FROM FP_BIOMETRIC_DATA WHERE CUST_NO =" + name.Trim();
command.CommandText = sql;
OracleDataReader reader = command.ExecuteReader();
bool fingerMatched = false;
FamServer.FamApp famApp = new FamServer.FamApp();
while (reader.Read())
{
Object[] values = new object[3];
int numColumns = reader.GetValues(values);
byte[] fingerData = values[0] as byte[];
string result = System.Text.Encoding.UTF8.GetString(fingerData);
int length_of_data = Convert.ToInt32(values[1]);
int serial_no = Convert.ToInt32(values[2]);
// FamIdentify_BYTE(ref string, ref object, ref int, ref string, ref string)
fingerMatched = famApp.FamIdentify_BYTE(name, fingerData, length_of_data, SampleModel, REMOTE_ADDR);
// if (fingerMatched)
// break;
}
famApp.Termination();
// famApp = null;
GC.Collect();
Close();
return fingerMatched;
}
catch (Exception e)
{
HttpContext.Current.Response.Write("<br>" + e.GetBaseException() + "<br>");
return false;
}
}
But when I run the application in IIS express , I am getting this error :
The best overloaded method match for 'FamServer._FamApp.FamIdentify_BYTE(ref string, ref object, ref int, ref string, ref string)'
has some invalid arguments ASPNET(1)
This is the full error list :
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,37): error CS1502: The best overloaded method match for 'FamServer._FamApp.FamIdentify_BYTE(ref string, ref object, ref int, ref string, ref string)' has some invalid arguments
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,61): error CS1620: Argument '1' must be passed with the 'ref' keyword
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,67): error CS1503: Argument '2': cannot convert from 'byte[]' to 'ref object'
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,79): error CS1620: Argument '3' must be passed with the 'ref' keyword
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,95): error CS1620: Argument '4' must be passed with the 'ref' keyword
F:\ASP.NET Projects\ASPNET\App_Code\Global.asax.cs(180,108): error CS1620: Argument '5' must be passed with the 'ref' keyword
If I run the above the above application in IIS server , The redirecting time is too much long . I cant understand why this is happening . Please help me .