Red Gate forums :: View topic - HRESULT E_FAIL when starting VS 2005
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

HRESULT E_FAIL when starting VS 2005

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
grose



Joined: 12 Dec 2007
Posts: 3

PostPosted: Wed Dec 12, 2007 8:51 pm    Post subject: HRESULT E_FAIL when starting VS 2005 Reply with quote

Hi,

I get the error "problem launching the PInvoke.net VS add-in: Error HRESULT E_FAIL has been returned from a call to a COM component. I've uninstalled and reinstalled PInvoke, but the error persists.

This may in fact be a VS error. Has anyone seen it and know how to handle it? Thanks,

Gordon
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Thu Dec 13, 2007 11:25 am    Post subject: Reply with quote

Hi Gordon,

Problems with VS add-in can usually be blamed on the VS extensibility components. You should find EnvDTE in the Global Assembly cache. If that's present, then the problem may be the underlying components, so maybe re-registering them would help:

cd %commonprogramfiles%\microsoft shared\MSEnv
regsvr32 dte80.olb
regsvr32 dte.olb
regsvr32 dte80a.olb
Back to top
View user's profile Send private message
grose



Joined: 12 Dec 2007
Posts: 3

PostPosted: Tue Aug 26, 2008 2:17 pm    Post subject: Performed steps -- any other thoughts? Reply with quote

Hi Brian,

This is a slow response response Smile --

I registered the components you described -- they are the only three files present in the directory using the mask dte*.*. However, I still get the error message. I ran gacutil to list the contents. Here is what I have that starts with EnvDTE

EnvDTE, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

Do you have any other thoughts on how to fix this? I suppose I could uninstall VS2005 and reinstall, but that seems a little extreme. Thanks!

Gordon
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6670

PostPosted: Fri Aug 29, 2008 10:37 am    Post subject: Reply with quote

Hi Gordon,

Anything further would be a guess. COM errors aren't terribly specific and there could be any number of components that have failed, from the Interop layer to the component itself, to the Visual C Runtime. Maybe a repair would be the easiest thing instead of spending who-knows-how-long trying to figure it out.
Back to top
View user's profile Send private message
grose



Joined: 12 Dec 2007
Posts: 3

PostPosted: Sat Sep 27, 2008 7:08 pm    Post subject: Re: Reply with quote

Brian Donahue wrote:
Hi Gordon,

Anything further would be a guess. COM errors aren't terribly specific and there could be any number of components that have failed, from the Interop layer to the component itself, to the Visual C Runtime. Maybe a repair would be the easiest thing instead of spending who-knows-how-long trying to figure it out.

Hi Brian,

I did a maintenance install and reapplied SP1 to VS2005 - I still get the error. I realize there are many possibilities. Does this information from even viewer help at all?

There was an exception trying to launch the PInvoke.net Visual Studio add-in:
Error HRESULT E_FAIL has been returned from a call to a COM component.

at EnvDTE.Commands.AddCommandBar(String Name, vsCommandBarType Type, Object CommandBarParent, Int32 Position)
at PInvokeDotNetAddIn.Connect.OnConnection(Object application, ext_ConnectMode connectMode, Object addInInst, Array& custom)

Thanks,

Gordon
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Fri Jul 17, 2009 11:31 am    Post subject: Reply with quote

My general advice for resetting add-ins (which is here: http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Profiler&c=knowledgebase%5cANTS_Profiler%5cKB200905000388.htm) may also work in this case, so please try:


1. Export your current VS settings into a file via Tools->Import And Export Settings
2. Choose the Visual Studio command prompt tool from the start menu, under the Visual Studio program group.
3. Execute the following commands:

>devenv /resetsettings
>regasm /codebase "%programfiles%\red gate\PInvoke.NET\PInvokeDotNetAddIn2008.dll"

[You may get a warning here which is safe to ignore but you should finally get the message: "Types registered successfully"]

>devenv /setup

Now your add-in should be re-initilaized. Ensure you have a ready-to-run project loaded into VS and the addin integration should work perfectly.

4. Import your saved settings via Tools->Import And Export Settings

Enjoy PInvoke goodness, hopefully!
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Fri Jul 17, 2009 11:42 am    Post subject: Reply with quote

Sorry- I shouls have been clearer, use:

"%programfiles%\red gate\PInvoke.NET\PInvokeDotNetAddIn2005.dll"

if you're having the problem with VS 2005.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group