Calling an ActiveX (COM) in a web service

N

Nicolas

Hi,

I have a big problem trying to call an activeX class into a web service.
When I'm instanciating a class everything seems ok, but as soon as I'm
trying to set some properties. I get the following error "catastrophic
failure".

That's the string that the exception had:

System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic
failure at System.RuntimeType.ForwardCallToInvokeMember(String memberName,
BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData&
msgData) at LwAccessLib.LwAccessClass.set_PortName(enumCommPort ) at
HelloService.HelloService.TestLwAccess() in
c:\inetpub\wwwroot\firstwebservice\main.asmx.cs:line 82

This is the code:

[WebMethod(true)]
public string TestLwAccess()
{
LwAccessClass oLonAccess = new LwAccessClass();

try
{
oLonAccess.PortName = LwAccessLib.enumCommPort.cpLon1;
return "yess!";
}
catch (Exception e)
{
return e.ToString();
}
}

Can someone help me?

Thanx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top