What does "Error HRESULT E_FAIL has been returned from a call to a COM component" mean?

J

Jialiang Ge [MSFT]

Hello Dave,

The HRESULT E_FAIL is described as "unspecified error" in winerror.h:

// MessageId: E_FAIL
// MessageText:
// Unspecified error
#define E_FAIL _HRESULT_TYPEDEF_(0x80004005L)

In this point only, I am sorry that I cannot tell why the error happens.
Would you tell me more information about how&where IRibbonUI.Invalidate()
is called? What's the host application? Word or Excel? Is it a COM add-in
or a VSTO one?

Here are my researches so far:
1. I tried to reproduce the E_FAIL error with a simple Word COM add-in in
my Vista box. IRibbonUI.Invalidate is called in a button callback, etc,
however, no error is thrown from the line.
2. I queried the issue in the internal data base, and found a report that
says m_pRibbonUI.Invalidate(); may return E_FAIL in mail merge. However,
according to the report log, the issue has been resolved by the developers
in 2006.
3. I queried the error in the internet, and got a lot of hits because
E_FAIL is a very general error.

My next action plan is to consult with some Office developers for their
suggestions on this error message. I appreciate it if you can let me know
the information above. Some code snippets or a reproducible project will be
very helpful for our trouble-shooting.

Thanks,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
D

David Thielen

Hi;

E_FAIL is like when your children are small and they come to you
crying saying "something happened" and it is tremendous effort to find
out WHAT happened.

We're an IExtensibitily AddIn written in C# & J# (the part this
happens in is all C#). It only occurs on Excel 2007 on Vista on a
64-bit system. And it only happens when it first starts, the first
time we call Invalidate.

thanks - dave


Hello Dave,

The HRESULT E_FAIL is described as "unspecified error" in winerror.h:

// MessageId: E_FAIL
// MessageText:
// Unspecified error
#define E_FAIL _HRESULT_TYPEDEF_(0x80004005L)

In this point only, I am sorry that I cannot tell why the error happens.
Would you tell me more information about how&where IRibbonUI.Invalidate()
is called? What's the host application? Word or Excel? Is it a COM add-in
or a VSTO one?

Here are my researches so far:
1. I tried to reproduce the E_FAIL error with a simple Word COM add-in in
my Vista box. IRibbonUI.Invalidate is called in a button callback, etc,
however, no error is thrown from the line.
2. I queried the issue in the internal data base, and found a report that
says m_pRibbonUI.Invalidate(); may return E_FAIL in mail merge. However,
according to the report log, the issue has been resolved by the developers
in 2006.
3. I queried the error in the internet, and got a lot of hits because
E_FAIL is a very general error.

My next action plan is to consult with some Office developers for their
suggestions on this error message. I appreciate it if you can let me know
the information above. Some code snippets or a reproducible project will be
very helpful for our trouble-shooting.

Thanks,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Thank you, Dave, for the information.

I'm still striving to reproduce it on my side: I build up a Windows Vista
x64 system with Office 2007 Enterprise. Because the system is newly
created, it has no additional add-in or development environment. Then I
write an Excel COM Addin with C# in my dev pc by following the steps in the
MSDN article http://msdn.microsoft.com/en-us/library/bb421511.aspx. I
choose this MSDN article in that it is a good demonstration for
ribbon.Invalidate(). After the setup project is created, I install the
add-in in the Vista x64 system, start Excel, and see the add-in
(ribbon.Invalidate()) works well on my side.

Dave, according to your description, can I understand that the issue can be
consistently reproduced on all (more than 1) your x64 Vista boxes? If that,
this is more likely to be a code issue (e.g. re-entrance/threading issues)
or an issue of Microsoft product. Dave, I know it's difficult, but would
you have a try to refine the project and build a reproducible one for me?
Is it convenient/allowed to tell me where you called "Invalidate"? Thank
you for your efforts.

Thanks
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
D

David Thielen

So of course the simple sample works here too. I tried but can't get a
simple sample to have this problem.

Is there some way to get from Excel why it is unhappy?

thanks - dave


Thank you, Dave, for the information.

I'm still striving to reproduce it on my side: I build up a Windows Vista
x64 system with Office 2007 Enterprise. Because the system is newly
created, it has no additional add-in or development environment. Then I
write an Excel COM Addin with C# in my dev pc by following the steps in the
MSDN article http://msdn.microsoft.com/en-us/library/bb421511.aspx. I
choose this MSDN article in that it is a good demonstration for
ribbon.Invalidate(). After the setup project is created, I install the
add-in in the Vista x64 system, start Excel, and see the add-in
(ribbon.Invalidate()) works well on my side.

Dave, according to your description, can I understand that the issue can be
consistently reproduced on all (more than 1) your x64 Vista boxes? If that,
this is more likely to be a code issue (e.g. re-entrance/threading issues)
or an issue of Microsoft product. Dave, I know it's difficult, but would
you have a try to refine the project and build a reproducible one for me?
Is it convenient/allowed to tell me where you called "Invalidate"? Thank
you for your efforts.

Thanks
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Hello Dave,
Is there some way to get from Excel why it is unhappy?
This is very difficult. I'm striving to do it. My consulting email has been
sent to the product team. I hope I can be back with some good news soon.

Regards,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
J

Jialiang Ge [MSFT]

I'm very sorry, Dave. We are still not able to figure out the reason. The
product team has no suggestion either. As they told me, E_FAIL just means
an unspecified error. It's generally used in this way:

HRESULT Function()
{
¡­. ¡­.
return known error 1
¡­. ¡­.
return Known error 2
¡­. ¡­.
Last, return unknown error E_FAIL
}

So without a callstack or a dump, it's very difficult for us to tell why it
happens. Because the issue cannot be reproduced on my side, I am not able
to create a case for you through the newsgroup support channel. You may
consider submitting a service request by using your MSDN free support
incidents. If the problem turns out to be an issue of our product, the
service request will be free. That means your MSDN free support incidents
won't be deducted. Thanks for your understanding.

Regards,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 
D

David Thielen

Bummer. We've surrounded it with a try/catch so we're ok. But please
suggest to the Office team that "something happened" is not a great
error message.

thanks - dave


I'm very sorry, Dave. We are still not able to figure out the reason. The
product team has no suggestion either. As they told me, E_FAIL just means
an unspecified error. It's generally used in this way:

HRESULT Function()
{
¡­. ¡­.
return known error 1
¡­. ¡­.
return Known error 2
¡­. ¡­.
Last, return unknown error E_FAIL
}

So without a callstack or a dump, it's very difficult for us to tell why it
happens. Because the issue cannot be reproduced on my side, I am not able
to create a case for you through the newsgroup support channel. You may
consider submitting a service request by using your MSDN free support
incidents. If the problem turns out to be an issue of our product, the
service request will be free. That means your MSDN free support incidents
won't be deducted. Thanks for your understanding.

Regards,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
J

Jialiang Ge [MSFT]

Thank you, Dave. The product team will know it.

Regards,
Jialiang Ge ([email protected], 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:
(e-mail address removed).

This posting is provided "AS IS" with no warranties, and confers no rights.
=================================================
 

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

Top