Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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;
}
}
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900