goodmorningsky
Centurion
- Joined
- Aug 18, 2003
- Messages
- 172
Hi, all...
Question sounds confusing..
Let me explain my question.
I'm using Remoting call..
Server Side..I created TimeClockComponent.NetworkUtils class.
that uses COM object written by VB.
This COM has method: DoPing.
My Client object call the Ping(string ipAddr) using Remote call.
So, actually the COM component is used in Server side!
I registered .NET Component and the COM in Serverside, but not in the Client side.
But, when I call Remote object, it thow exception like:
System.Runtime.InteropService.COMException (0x...): COM object with CLSID .... is either not valid or not registered.
My question is..
Why do I need resgister COM object in Remoting Client side?
Since COM is run in Server side.
and Client reference dll file to create Proxy only as I know..
Please reply with any knowledge considering this issue..
or any link about this issue..
Thank you...
using System;
namespace TimeClockComponent
{
/// <summary>
/// Summary description for NetworkUtils
/// NetworkUtilities reference comes from NetworkUtilities COM object
/// written by VB (ActiveX DLL)
/// First register the component using regsrv32 NetworkUtilities.dll
/// on client machine to run this application
/// </summary>
public class NetworkUtils
{
NetworkUtilities.NetUtilityClass netUtil;
public NetworkUtils()
{
//
// TODO: Add constructor logic here
//
netUtil = new NetworkUtilities.NetUtilityClass();
}
public bool Ping(string ipAddr)
{
bool result = netUtil.DoPing(ipAddr.Trim());
long re2 = netUtil.DoPingAsLong(ipAddr);
return result;
}
public bool test(string boolVal)
{
return netUtil.Test(boolVal);
}
}
}
// code snipet of the COM class method in VB
Public Function DoPing(ByVal ipAddr As String) As Boolean
Dim result As Long
Dim ECHO As ICMP_ECHO_REPLY
result = mdPing.Ping(ipAddr, "ECHO!!!", ECHO)
If result = 0 Then '-- success
DoPing = True
Else
DoPing = False
End If
End Function
//code snipet of Client app calling the Remote Component object
TimeClockComponent.NetworkUtils objNt = new TimeClockComponent.NetworkUtils();
MessageBox.Show(objNt.Ping("10.208.2.11").ToString());
Question sounds confusing..
Let me explain my question.
I'm using Remoting call..
Server Side..I created TimeClockComponent.NetworkUtils class.
that uses COM object written by VB.
This COM has method: DoPing.
My Client object call the Ping(string ipAddr) using Remote call.
So, actually the COM component is used in Server side!
I registered .NET Component and the COM in Serverside, but not in the Client side.
But, when I call Remote object, it thow exception like:
System.Runtime.InteropService.COMException (0x...): COM object with CLSID .... is either not valid or not registered.
My question is..
Why do I need resgister COM object in Remoting Client side?
Since COM is run in Server side.
and Client reference dll file to create Proxy only as I know..
Please reply with any knowledge considering this issue..
or any link about this issue..
Thank you...
using System;
namespace TimeClockComponent
{
/// <summary>
/// Summary description for NetworkUtils
/// NetworkUtilities reference comes from NetworkUtilities COM object
/// written by VB (ActiveX DLL)
/// First register the component using regsrv32 NetworkUtilities.dll
/// on client machine to run this application
/// </summary>
public class NetworkUtils
{
NetworkUtilities.NetUtilityClass netUtil;
public NetworkUtils()
{
//
// TODO: Add constructor logic here
//
netUtil = new NetworkUtilities.NetUtilityClass();
}
public bool Ping(string ipAddr)
{
bool result = netUtil.DoPing(ipAddr.Trim());
long re2 = netUtil.DoPingAsLong(ipAddr);
return result;
}
public bool test(string boolVal)
{
return netUtil.Test(boolVal);
}
}
}
// code snipet of the COM class method in VB
Public Function DoPing(ByVal ipAddr As String) As Boolean
Dim result As Long
Dim ECHO As ICMP_ECHO_REPLY
result = mdPing.Ping(ipAddr, "ECHO!!!", ECHO)
If result = 0 Then '-- success
DoPing = True
Else
DoPing = False
End If
End Function
//code snipet of Client app calling the Remote Component object
TimeClockComponent.NetworkUtils objNt = new TimeClockComponent.NetworkUtils();
MessageBox.Show(objNt.Ping("10.208.2.11").ToString());