472,789 Members | 1,309 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 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 8850
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: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.