Error creating com object



Error creating com object

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m using a third party vb6 dll (COM object) that enables me to check whether the product is registered and for how many users. When tested it work fine without any issues, but one particulat computer, on creating an instance of the COM object the following error is thrown.

Creating an instance of the COM component with CLSID <6F2A52CF-9B57-4C17-AD96-935497A9D2B2>from the IClassFactory failed due to the following error: 80040001.

I’m using Visual C# 3.5. Both computer, mine and the test pc, run Windows XP SP2. I tried searching on the internet what the error code means, 80040001. Any help would be greatly appriciated

Answers

My guess is that the registration of the component is screwed up in some way, despite you registering it.

A couple of ideas:

Are you able to create and call the component using VBScript (assuming it has an IDispatch interface)?

Copy OleView to the computer where you get the exception and examine the component through that (Object Classes, All Objects). If you right click the component progId, you get an option to «Create Instance». Do you get any errors?

If these tests fail then it it likely the component is not registered properly and you need to clean up the registry, which is tricky. You can try unregistering and re-registering the component first. There are also registry cleaners available, but use at your peril!

Источник

Error creating com object

This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.

Answered by:

Question

I’m using a third party vb6 dll (COM object) that enables me to check whether the product is registered and for how many users. When tested it work fine without any issues, but one particulat computer, on creating an instance of the COM object the following error is thrown.

Читайте также:  Error device unauthorized please check the confirmation dialog on your device

Creating an instance of the COM component with CLSID <6F2A52CF-9B57-4C17-AD96-935497A9D2B2>from the IClassFactory failed due to the following error: 80040001.

I’m using Visual C# 3.5. Both computer, mine and the test pc, run Windows XP SP2. I tried searching on the internet what the error code means, 80040001. Any help would be greatly appriciated

Answers

My guess is that the registration of the component is screwed up in some way, despite you registering it.

A couple of ideas:

Are you able to create and call the component using VBScript (assuming it has an IDispatch interface)?

Copy OleView to the computer where you get the exception and examine the component through that (Object Classes, All Objects). If you right click the component progId, you get an option to «Create Instance». Do you get any errors?

If these tests fail then it it likely the component is not registered properly and you need to clean up the registry, which is tricky. You can try unregistering and re-registering the component first. There are also registry cleaners available, but use at your peril!

Источник

Error creating com object

Asked by:

Question

I have tried solve the following problem without success and I hope you can help me.

The code below can describe the situation:

The calling to an COM object from a secundary Thread throws exception.

How can I solve it?

Sorry, my English is not so good. 🙂

All replies

I’m not able to reproduce the exception. I’ve used a different COM object.

Suggestion: Before calling t.Start(), call

I’m afraid, I have not soultion then.

Читайте также:  Collect2 error ld returned 1 exit status in linux

Have you tried to start the thread without creating two instances in Button1_Click before? Maybe only one automation instance is possible.

In Button1_Click, you can also try to create it twice:

llama = CreateObject(«Llama.LMADataSource»)
llama = CreateObject(«Llama.LMADataSource»)

Humm. it doesn’t work.

I put the two lines (new and createobject) only to describe the situation. they not to be necessary.

I tried to execute the code in a console application, the same code, and it works fine.

I need to found the differences between the two environments and reproduce for the windows application.

Источник

Error creating com object

Question

I have tried solve the following problem without success and I hope you can help me.

The code below can describe the situation:

The calling to an COM object from a secundary Thread throws exception.

How can I solve it?

Sorry, my English is not so good. 🙂

All replies

I’m not able to reproduce the exception. I’ve used a different COM object.

Suggestion: Before calling t.Start(), call

I’m afraid, I have not soultion then.

Have you tried to start the thread without creating two instances in Button1_Click before? Maybe only one automation instance is possible.

In Button1_Click, you can also try to create it twice:

llama = CreateObject(«Llama.LMADataSource»)
llama = CreateObject(«Llama.LMADataSource»)

Humm. it doesn’t work.

I put the two lines (new and createobject) only to describe the situation. they not to be necessary.

I tried to execute the code in a console application, the same code, and it works fine.

I need to found the differences between the two environments and reproduce for the windows application.

Источник

Читайте также:  Smtp error ehlo command failed

Error creating com object

Asked by:

Question

I have tried solve the following problem without success and I hope you can help me.

The code below can describe the situation:

The calling to an COM object from a secundary Thread throws exception.

How can I solve it?

Sorry, my English is not so good. 🙂

All replies

I’m not able to reproduce the exception. I’ve used a different COM object.

Suggestion: Before calling t.Start(), call

I’m afraid, I have not soultion then.

Have you tried to start the thread without creating two instances in Button1_Click before? Maybe only one automation instance is possible.

In Button1_Click, you can also try to create it twice:

llama = CreateObject(«Llama.LMADataSource»)
llama = CreateObject(«Llama.LMADataSource»)

Humm. it doesn’t work.

I put the two lines (new and createobject) only to describe the situation. they not to be necessary.

I tried to execute the code in a console application, the same code, and it works fine.

I need to found the differences between the two environments and reproduce for the windows application.

Источник

Оцените статью
toolgir.ru
Adblock
detector