473,404 Members | 2,187 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,404 software developers and data experts.

Error creating COM component

I am trying to create an instance of a 3rd party COM component, and I'm
getting an error.

I've opened a ticket with this vendor as well, but I want to approach it
from the C# .NET side to make sure I'm not missing anything. I did recently
upgrade the product we are using to a newer version, I'm wondering if that
has anything to do. I did re-add the references to DOCSObjects however.

I try to create an instance of the object as follows,

DocAppObj = new Hummingbird.DM.Extensions.Interop.DOCSObjects.Appl ication();
Which produces this runtime error :
Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002.
System.InvalidCastException was unhandled
Message="Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002."
Source="MECTS3"
Any ideas?

Thanks,
Greg
Oct 25 '08 #1
4 8936
Try to use this COM component from a VC++ application first...if it
works then proceed to .Net!
Also from VC++ first try to create the COM object by directly using
CoCreateInstance(Ex) then try going the IClassFactory way by calling
CoGetClassObject then calling the CreateInstance on the IClassFactory!

This way you will at-least be able to find out where the problem is.

Thanks & Regards,
Ashutosh

greg wrote:
I am trying to create an instance of a 3rd party COM component, and I'm
getting an error.

I've opened a ticket with this vendor as well, but I want to approach it
from the C# .NET side to make sure I'm not missing anything. I did recently
upgrade the product we are using to a newer version, I'm wondering if that
has anything to do. I did re-add the references to DOCSObjects however.

I try to create an instance of the object as follows,

DocAppObj = new Hummingbird.DM.Extensions.Interop.DOCSObjects.Appl ication();
Which produces this runtime error :
Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002.
System.InvalidCastException was unhandled
Message="Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002."
Source="MECTS3"
Any ideas?

Thanks,
Greg
Oct 26 '08 #2
80004002 is a generic error - Interface not supported....I didn't pay
attention to it before posting the last message!!! So, only you
component provider can help here!!!

greg wrote:
I am trying to create an instance of a 3rd party COM component, and I'm
getting an error.

I've opened a ticket with this vendor as well, but I want to approach it
from the C# .NET side to make sure I'm not missing anything. I did recently
upgrade the product we are using to a newer version, I'm wondering if that
has anything to do. I did re-add the references to DOCSObjects however.

I try to create an instance of the object as follows,

DocAppObj = new Hummingbird.DM.Extensions.Interop.DOCSObjects.Appl ication();
Which produces this runtime error :
Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002.
System.InvalidCastException was unhandled
Message="Creating an instance of the COM component with CLSID
{1CF0DE77-8CAE-11D1-82A2-0060083F9B01} from the IClassFactory failed due to
the following error: 80004002."
Source="MECTS3"
Any ideas?

Thanks,
Greg
Oct 26 '08 #3
Good morning Greg. Nice to see you again.

Apart from the possibility that the problem is caused by the component
vendor, (for example, they possibly did not handle the inheritance
relationship rightly or did not apply "Binary Compatibility" when releasing
the new version), another possible cause is related to "re-adding" the COM
component to our project. To double confirm that the error is not caused by
the .NET side, may I suggest re-adding the component based on the following
steps though I understand you already tried doing them:

1. Create a new C# project for test.
2. Add reference to the updated version of the COM component. Be sure that
the TypeLib version is new.
3. Call the code
DocAppObj = new Hummingbird.DM.Extensions.Interop.DOCSObjects.Appl ication();

If this test does not throw the error, I intend to think that the problem
is on the .NET side. You may want to do these steps to your real project:

1. Clean the project (Build menu -Clean <project>)
2. Remove all the references to the COM component and, the components that
were replied on if any, from the References node
3. Add the references again as we did in the above test project.

Best Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 27 '08 #4
Thanks. I created a new project, added the reference as you suggested, and
typed in just 2 lines of code to create the new instance of the object, it
gave the same error.

I will follow up with the vendor.

Thanks,
Greg

""Jialiang Ge [MSFT]"" wrote:
Good morning Greg. Nice to see you again.

Apart from the possibility that the problem is caused by the component
vendor, (for example, they possibly did not handle the inheritance
relationship rightly or did not apply "Binary Compatibility" when releasing
the new version), another possible cause is related to "re-adding" the COM
component to our project. To double confirm that the error is not caused by
the .NET side, may I suggest re-adding the component based on the following
steps though I understand you already tried doing them:

1. Create a new C# project for test.
2. Add reference to the updated version of the COM component. Be sure that
the TypeLib version is new.
3. Call the code
DocAppObj = new Hummingbird.DM.Extensions.Interop.DOCSObjects.Appl ication();

If this test does not throw the error, I intend to think that the problem
is on the .NET side. You may want to do these steps to your real project:

1. Clean the project (Build menu -Clean <project>)
2. Remove all the references to the COM component and, the components that
were replied on if any, from the References node
3. Add the references again as we did in the above test project.

Best Regards,
Jialiang Ge (ji****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Oct 27 '08 #5

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

Similar topics

7
by: SÁRINGER Zoltán | last post by:
hi, When I open the connection to a JET database, I get 80004005 "unknown error". I know, it's usually permission problem, but I added all users to the db directory, and have this error only if...
6
by: DraguVaso | last post by:
Hi, In my application, on some given actions while debugging in Visual Studio, I suddenly get a "System.ComponentModel.Win32Exception was unhandled" Message="Error creating window handle."...
9
by: Tyler | last post by:
I am attempting to extend a legacy VB6 application by making it use a .NET component written in C# exposed through COM interop. Everything appeared to be going well (VB application creates the...
4
by: John | last post by:
Hi My first web service seems to be OK as I can put its url in explorer and can use the invoke button to view the returned data as xml. The problem comes when I call it form a client app using;...
1
by: michaeltorus | last post by:
Hi I'm currently designing a new web application in .Net. I've pretty covered everything, apart from error handling. There seems to be a few different way to do this, but something I've read...
3
by: Harish | last post by:
I am buiding an application in ASP.Net 2.0 with C#. After installing corel wordperfect i am adding the reference into the application. Afetr adding reference interop.wordperfect.dll is added to the...
7
by: Raj | last post by:
I have developed a component create database, sql login,pwd, create tables etc., The component is working fine with VB But the same is not working with ASP as I get this error: Error 800a01a8...
0
by: syedsarfaraz | last post by:
Hi There! Could anybody please help regarding the below issue. We had a COM+ component deployed on Windows 2000/NT machine it was working fine, I mean when it was being invoked from other...
7
by: phpachu | last post by:
Hi, Iam struggling with a COM component Error---"Error HRESULT E_FAIL has been returned from a call to a COM component. " while generating ppt from asp.net application. Its isworking fine in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.