Dear All,
I am doing code in vb6.0 to call function of .net dll
gettign ERROR AS
can't find dll entry point procCheckHostStatus TelnetStatus.dll
Dll name is : TelnetStatus.dl
Option Explicit
Private Declare Function procCheckHostStatus Lib "TelnetStatus.dll" (ByVal strIPAddress As String, ByVal lPortNo As Long) As Boolean
Private Sub Command1_Click()
Dim bStatus As Boolean
bStatus = procCheckHostStatus(Text1.Text, CInt(Text2.Text))
MsgBox (bStatus)
End Sub
My .NET dll code
using System;
using System.Net.Sockets;
public class TelnetStatus
{
private TcpClient objTcp = null;
public bool procCheckHostStatus(string strIPAddress, int iPort)
{
try
{
objTcp = new TcpClient();
objTcp.Connect(strIPAddress, iPort);
objTcp.Close();
return true;
}
catch (Exception ex)
{
return false;
}
}
}