473,385 Members | 1,372 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Com Exception from .Net Application.

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_I tem(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.
Jun 27 '08 #1
3 2114
On May 26, 8:41*pm, karim <ka...@discussions.microsoft.comwrote:
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_I tem(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.
Jun 27 '08 #2
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" wrote:
On May 26, 8:41 pm, karim <ka...@discussions.microsoft.comwrote:
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_I tem(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.
Jun 27 '08 #3
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

karim wrote:
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" wrote:
>On May 26, 8:41 pm, karim <ka...@discussions.microsoft.comwrote:
>>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.
Jun 27 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Noor | last post by:
please tell the technique of centralize exception handling without try catch blocks in c#.
3
by: Professor Frink | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
5
by: PCC | last post by:
I am using the Exception Managment Application Block on Windows Server 2003 Enterprise and .NET v1.1. If I use the block with an ASP.NET web wervice or in a web application I get the following...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
13
by: tolisss | last post by:
Hi i have setup a global exception handler b4 Application.Run like Application.ThreadException += new ThreadExceptionEventHandler(GlobalExceptionProcessing.AppThreadException ); then after...
4
by: Craig831 | last post by:
First off, I apologize if this gets long. I'm simply trying to give you all enough information to help me out. I'm writing (almost finished, actually), my first VB.Net application. It's a forms...
9
by: Claudio Di Flumeri | last post by:
Hello all, I've added a global exception handler to my application in this way: Sub Main() AddHandler Application.ThreadException, AddressOf ThreadException AddHandler...
4
by: ZorpiedoMan | last post by:
I just ran across an interesting phenon... If you bind a control, say a textbox, to a class.property, and in changing the value of the textbox an error is thrown in the class.property, you get...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
6
by: Steve | last post by:
Hi All I have a windows forms Application (SAM) in vb.net 2008 using .net framework V2 One and only one customer out of 30 customers is getting errors daily where they have to close and...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.