Com Exception from .Net Application.


K

karim

Hi,

My .Net application call a COM Class method. The signature of COm method is
object get_Item(ref object Key);
This method had defined in "NCR.APTRA.AXFS" namespace

and I Have "formList" of Type "NCR.APTRA.AXFS.IXFSDictionary"

Here i am getting an exception with the below statement
NCR.APTRA.AXFS.XFSGenericPrintForm formObj =
(NCR.APTRA.AXFS.XFSGenericPrintForm)formList.get_Item(ref formNameObject);

Exception Details:
===========
Unable to cast COM object of type 'System.__ComObject' to interface type
'NCR.APTRA.AXFS.XFSGenericPrintForm'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{B9EEACF8-6552-4E85-9069-D58160BC40FF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).

Please can anyone help me to resolve.

Thanks & Regards,
Karimulla.
 
Ad

Advertisements

A

Aneesh Pulukkul [http://dotnet-revolutions.blogspo

Hi,

My .Net application call a COM Class method. The signature of COm method is
object get_Item(ref object Key);
This method had defined in "NCR.APTRA.AXFS" namespace

and I Have "formList" of Type "NCR.APTRA.AXFS.IXFSDictionary"

Here i am getting an exception with the below statement
NCR.APTRA.AXFS.XFSGenericPrintForm formObj =
(NCR.APTRA.AXFS.XFSGenericPrintForm)formList.get_Item(ref formNameObject);

Exception Details:
===========
Unable to cast COM object of type 'System.__ComObject' to interface type
'NCR.APTRA.AXFS.XFSGenericPrintForm'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{B9EEACF8-6552-4E85-9069-D58160BC40FF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).

Please can anyone help me to resolve.

Thanks & Regards,
Karimulla.
NCR.APTRA.AXFS.XFSGenericPrintForm is a .Net type? If yes we can't
cast to __ComObject. Else we can re-register the COM dll and try again.
 
K

karim

Yes, NCR.APTRA.AXFS.XFSGenericPrintForm is a .Net type.
Here the COM get_Item method has a return type Object, which i am capturing
in .Net object of type "NCR.APTRA.AXFS.XFSGenericPrintForm".
Can you pls tell me how do we handle COM call from .Net application?

Regards,
Karimulla.

Aneesh Pulukkul [http://dotnet-revolutio said:
Hi,

My .Net application call a COM Class method. The signature of COm method is
object get_Item(ref object Key);
This method had defined in "NCR.APTRA.AXFS" namespace

and I Have "formList" of Type "NCR.APTRA.AXFS.IXFSDictionary"

Here i am getting an exception with the below statement
NCR.APTRA.AXFS.XFSGenericPrintForm formObj =
(NCR.APTRA.AXFS.XFSGenericPrintForm)formList.get_Item(ref formNameObject);

Exception Details:
===========
Unable to cast COM object of type 'System.__ComObject' to interface type
'NCR.APTRA.AXFS.XFSGenericPrintForm'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{B9EEACF8-6552-4E85-9069-D58160BC40FF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).

Please can anyone help me to resolve.

Thanks & Regards,
Karimulla.
NCR.APTRA.AXFS.XFSGenericPrintForm is a .Net type? If yes we can't
cast to __ComObject. Else we can re-register the COM dll and try again.
 
Ad

Advertisements

L

Leon Lambert

The way i have my C# components use COM is by using the tlbimp.exe tool.
It will generate a wrapper assemble for the COM component so I can just
use it in C#. Search your help for tlbimp.exe for examples on how to use it.

Hope this helps
Leon Lambert
Yes, NCR.APTRA.AXFS.XFSGenericPrintForm is a .Net type.
Here the COM get_Item method has a return type Object, which i am capturing
in .Net object of type "NCR.APTRA.AXFS.XFSGenericPrintForm".
Can you pls tell me how do we handle COM call from .Net application?

Regards,
Karimulla.

Aneesh Pulukkul [http://dotnet-revolutio said:
Hi,

My .Net application call a COM Class method. The signature of COm method is
object get_Item(ref object Key);
This method had defined in "NCR.APTRA.AXFS" namespace

and I Have "formList" of Type "NCR.APTRA.AXFS.IXFSDictionary"

Here i am getting an exception with the below statement
NCR.APTRA.AXFS.XFSGenericPrintForm formObj =
(NCR.APTRA.AXFS.XFSGenericPrintForm)formList.get_Item(ref formNameObject);

Exception Details:
===========
Unable to cast COM object of type 'System.__ComObject' to interface type
'NCR.APTRA.AXFS.XFSGenericPrintForm'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{B9EEACF8-6552-4E85-9069-D58160BC40FF}' failed due to the following error:
No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).

Please can anyone help me to resolve.

Thanks & Regards,
Karimulla.
NCR.APTRA.AXFS.XFSGenericPrintForm is a .Net type? If yes we can't
cast to __ComObject. Else we can re-register the COM dll and try again.
 

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

Similar Threads


Top