HRESULT E_FAIL when starting VS 2005

Announcements and discussion for PInvoke

Moderators: Luke Jefferson, Robert

HRESULT E_FAIL when starting VS 2005

Postby grose » Wed Dec 12, 2007 8:51 pm

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
grose
 
Posts: 3
Joined: Wed Dec 12, 2007 8:47 pm

Postby Brian Donahue » Thu Dec 13, 2007 11:25 am

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
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Performed steps -- any other thoughts?

Postby grose » Tue Aug 26, 2008 2:17 pm

Hi Brian,

This is a slow response response :) --

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
grose
 
Posts: 3
Joined: Wed Dec 12, 2007 8:47 pm

Postby Brian Donahue » Fri Aug 29, 2008 10:37 am

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.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am

Re:

Postby grose » Sat Sep 27, 2008 7:08 pm

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
grose
 
Posts: 3
Joined: Wed Dec 12, 2007 8:47 pm

Postby Chris.Allen » Fri Jul 17, 2009 11:31 am

My general advice for resetting add-ins (which is here: http://www.red-gate.com/supportcenter/C ... 000388.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!
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby Chris.Allen » Fri Jul 17, 2009 11:42 am

Sorry- I shouls have been clearer, use:

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

if you're having the problem with VS 2005.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm


Return to PInvoke.Net

Who is online

Users browsing this forum: No registered users and 1 guest