Windows error 0x80029C4A, -2147312566

Detailed Error Information

TYPE_E_CANTLOADLIBRARY[1]

MessageError loading type library/DLL.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode2 (0x002)
NameFACILITY_DISPATCH[2][1]
DescriptionThe source of the error code is a COM Dispatch.[2][1]
Error Code40010 (0x9c4a)

Questions

16votes
3answers

Export to excel in TFS 2012, error code: TF400422

I've installed Visual Studio 2012 RC. I'm working with TFS2012, and when I want to export a user story to excel I get the following dialog box error: Microsoft Visual Studio Team Foundation Error TF400422: Failed to open in Microsoft Excel: Error loading type library/Dll. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) [...] read more
excel
visual-studio-2012
12votes
1answer

Reg free COM interop with C#, possible?

Is it possible to use registration free COM with Dotnet interop and C#? If so how does one add a reference to the COM object in the C# project? I have a reg free ATL COM server dll with an embedded manifest and two test clients, one cpp the other [...] read more
c#
visual-studio-2010
com
7votes
3answers

Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'

I am getting an error: > Unable to cast COM object of type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. This operation failed because > the Query Interface call on the COM component for the interface with IID > '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: > Error loading type [...] read more
excel
vb.net
5votes
2answers

How to latebind COM event without interface

I need to late bind to a 3rd party VB6 COM object in a 3.5 C# application (to avoid version dependencies that we currently have). The dll that was provided is not consumable in most non-latebound ways due to some bug that causes errors when we try to consume it [...] read more
c#
vb6
.net-3.5
late-binding
oleview
5votes
3answers

Error loading type library/DLL when I try to add file in VS (HRESULT: 0x80029C4A)

I have a trouble when I try to create a view in my web project. Here is my error message: There was an error running the selected code generator: 'Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))' I've already checked other response. If I run as admin or none, [...] read more
c#
asp.net
visual-studio
visual-studio-2013
4votes
4answers

COM Exception - TYPE_E_CANTLOADLIBRARY?

I am using a COM dll in my .Net web application. This works fine on multiple different machines. However on one particular machine I get the following error: Unable to cast COM object of type 'CServer.CApplicationClass' to interface type 'CServer.ICApplication'. This operation failed because the QueryInterface call on the COM [...] read more
asp.net
exception
com
registry
4votes
8answers

Visual Studio 2013 wont run as administrator

I'm trying to get Visual Studio 2013 running as an administrator, but I'm constantly getting errors. I've searched and tried solutions for other versions of VS, but those fixes didn't apply, so hopefully someone here can help. When I try to run VS2013 as an admin, I an error saying [...] read more
visual-studio-2013
nuget
nuget-package-restore
4votes
4answers

COM Interop, client not finding interface in Out-of-process COM

I'm using Microsoft's CSExeCOMServer as a base for setting up a Out-of-process COM server, but it's not working properly. The server is 64 bit, and the client is 32 bit. Here's the sample interface [Guid(XXCryptService.InterfaceId), ComVisible(true)/*, InterfaceType(ComInterfaceType.InterfaceIsIUnknown)*/] public interface IXXCryptService { [DispId(1)] string Encrypt(string password, string key); [DispId(2)] string Decrypt(string [...] read more
c#
.net
delphi
com-interop
out-of-process
4votes
2answers

Adding NUnit 2.6.1 reference Visual Studio 2012

I'm using Visual Studio 2012, and I've downloaded NUnit 2.6.1 to run Unit Tests on the code. I've added the reference to nunit.framework in the project of the solution where I'll be needing it. The problem is, for some reason when I try to include the namespace it doesn't work. [...] read more
c#
frameworks
reference
nunit
visual-studio-2012
4votes
1answer

My first COM import

I have a .h file with the following declarations: //////////////////////////////////////////////////////////////////////////////// // Syntek Plug-In Custom Control GUIDs. // //////////////////////////////////////////////////////////////////////////////// // {59DF6360-6F14-4472-82B6-6EAB971EEFAD} DEFINE_GUID(CLSID_IStkCustomControl, 0x59DF6360, 0x6F14, 0x4472, 0x82, 0xB6, 0x6E, 0xAB, 0x97, 0x1E, 0xEF, 0xAD); // {59DF6361-6F14-4472-82B6-6EAB971EEFAD} DEFINE_GUID(CLSID_IStkCustomControl_PropertyPage, 0x59DF6361, 0x6F14, 0x4472, 0x82, 0xB6, 0x6E, 0xAB, 0x97, 0x1E, 0xEF, 0xAD); // Custom Control Interfaces. [...] read more
c#
com-interop
3votes
0answers

Getting error (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY) when migrating from MS Access 2013 to SQL Server 2014

OK.... I've checked and rechecked Google, StackFault, Experts-Exchange, etc... for a resolution on this error and they all say to register the DAO360.DLL and add its path to the environment settings. I've done that several times and I still get the following error: > Access Object Collector error: Database > [...] read more
sql-server
ms-sql
microsoft-access-2013
3votes
2answers

How to Debug Com dll (accessed through Interop) in IIS 7.0( Windows Server 2008 R2) invoked from ASPX Page using VB 6.0

Can anybody tell how to debug the Com Dll in IIS 7.0 using VB 6.0 in Windows Server 2008 R2. I am able to hit break point in VB 6.0 accessed from Console Application using interop dlll.Through ASPX pages in IIS 7.0 I am getting the following Exception > Unable [...] read more
asp.net
debugging
iis
com
interop
2votes
1answer

How to solve this error caused due to the Microsoft.Office.Interop.Access.ApplicationClass?

When i am working on COM Component Access I am getting this error. > Unable to cast COM object of type > 'Microsoft.Office.Interop.Access.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Access._Application'. > > This operation failed because the QueryInterface call on the COM component for > the interface with IID '{68CCE6C0-6129-101B-AF4E-00AA003F0F07}' failed due [...] read more
vb.net
vb6-migration
2votes
1answer

I'm having trouble transferring datagridview to Excel

What is the reason I am getting the error like in datagridview below? > System.InvalidCastException: The COM object of type '' > Microsoft.Office.Interop.Excel.ApplicationClass' could not be assigned to > interface type 'Microsoft.Office.Interop.Excel._Application'. This operation > failed because the QueryInterface call in the COM component for the interface > with the [...] read more
c#
winforms
2votes
1answer

Trying to debug from C# into VB6 yields TYPE_E_CANTLOADLIBRARY?

I have a VB6 DLL being accessed from some C# code. Using the compiled & registered VB6 DLL there is no problem. But when I load the VB6 source into the VB6 IDE and run the project, the next run of the C# code will fail with the error below. [...] read more
vb6
com-interop
2votes
3answers

Not able to create object of Excel.Application

In my C# application i am importing and exporting data to excel. I have office 2013. I am using following code: using Excel = Microsoft.Office.Interop.Excel; Excel.Application _excelApp = null; _excelApp = new Excel.Application(); This code was working fine but recently i installed Microsoft project professional 2013, it also update office. [...] read more
c#
.net
excel
interop
2votes
2answers

Error while using a COM component in winform

I'm building a Winform application on c# .net 4. I'm trying to use a VLC plugin as a toolbox COM component. The component is successfully added into the toolbox. However, when I use it there is an error: > Failed to create component 'AxHost'. The error message follows: > 'System.Runtime.InteropServices.COMException [...] read more
c#
winforms
.net-4.0
vlc
libvlc
2votes
2answers

Broken Excel Interop COM assembly after installing/removing 2013 beta release

I have recently installed Microsoft Office 2013 beta release while having 2007 already installed. When I opened a COM based Excel interop application under Visual Studio 2008, I noticed a few warnings I didn't have before. I tried to start compile the application and it still worked, but when I [...] read more
c#
.net
excel
excel-interop
office-2013
2votes
1answer

Error Printing When Using Microssoft.office.interop

I was normally printing through an application that I developed in C # using interop in Office 2013 (Word). I then installed the version of office 2007 and from there, it did not work anymore. This is the exception I have: You can not convert the COM object of type [...] read more
c#
visual-studio
interop
office-interop
2votes
0answers

Error in Invalidating ribbon using Invalidate & Invalidate Control - MS Word 2007 & .Net-4.5.1

I am on .Net version 4.5.1 . I am creating a MS Word 2007 ribbon control. It's a COM dll. While trying to Invalidate the ribbon or any of the control in there, i am getting the following error related to COM... m_Ribbon.InvalidateControl(RibbonXTagConstants.gsClassicGroupStatus); Error: Unable to cast COM object of [...] read more
c#
ms-office
ribbon-control
word-2007
comaddin
2votes
1answer

Error loading type library/DLL (Microsoft.Office.Interop.Excel.Application)

I'm trying to create an Excel document via C#. When I run the application, it gives the following error: > Unable to cast COM object of type 'System.__ComObject' to interface type > 'Microsoft.Office.Interop.Excel.Application'. This operation failed because > the QueryInterface call on the COM component for the interface with IID [...] read more
visual-studio-2012
ms-office
office-interop
office-2013
2votes
2answers

WatiN : Textfields are not getting automated while running the code as

WatiN.Core.IE window = new WatiN.Core.IE(); // Frames // Model TextField txt_txtName = window.TextField(Find.ByName("txtName")); TextField txt_txtPassword = window.TextField(Find.ByName("txtPassword")); Button btn_btnLogin = window.Button(Find.ByName("btnLogin")); // Code window.GoTo("http://134.554.444.55/asdfgfghh/"); txt_txtName.TypeText("fghfjghm"); txt_txtPassword.TypeText("gfhgjfgh"); btn_btnLogin.Click(); } only the window.GoTo("http://134.554.444.55/asdfgfghh/"); code works and the rest are doing nothing, When I am using a catch block it throws exception as [...] read more
c#
testing
watin
1vote
0answers

Can't open package manager console in visual studio 2019

I am learning asp .net from this udemy course udemy_course_link. Whenever I open package manager console in visual studio 2019, Following error comes : error_msg [https://i.stack.imgur.com/TNVSr.png] The error message is: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE80.DTE2'. This operation failed because the QueryInterface call on [...] read more
c#
asp.net
visual-studio
package-manager-console
nuget-package-manager-console
1vote
1answer

C# Interop.Excel can't find dll

this ist my first VS and C# project. I want to access an excel file and add some data. Pretty much standard I guess. So I used a code example from the microsoft page (see below). No red underlines in the editor. But when I run it, I get the [...] read more
c#
excel
visual-studio
dll
office365
1vote
0answers

Struggling to access very old DLL

We have a very old DLL that is no longer supported by a vendor, that we need to try and get working via a new piece of software as part of transitioning away from it. It was written in 2000 (!) and we have a fair bit of documentation for [...] read more
com
1vote
0answers

Shallow understanding of COM interop leads to TYPE_E_CANTLOADLIBRARY exception - where's the mistake?

We have a .Net assembly, A, that makes use of a class Foo from a COM library, B. We've created an interop for B (Interop.b.dll) and A makes use of Foo via the interop. If I decompile Interop.b.dll I can see the following interface defined within it: using System.Runtime.InteropServices; namespace [...] read more
c#
.net
com
com-interop
1vote
2answers

VB: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)

I am working on an app which needs to import data from Excel. My solution is using Microsoft.office.Interop.Excel. But I get this error when I debug: > Message=Unable to cast COM object of type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. This operation failed because > the QueryInterface call on [...] read more
excel
vb.net
office-interop
1vote
1answer

Unable to cast COM object (EXCEL)

My application just added a new function to allow export data into Excel. It worked fine on one device but when we implement it on the second one the following error appeared: Error Message: > System.InvalidCastException: Unable to cast COM object of type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. [...] read more
.net
excel
regedit
1vote
1answer

Unable to cast COM object (Delphi XE7 - Delphi Berlin incompatibility)

I installed Delphi Berlin recently. Didn't worked so I uninstalled it same day. Now my Delphi XE7 stopped working. I get this error when I try to compile anything, and I don't know how to fix it. > Unable to cast COM object of type 'System.__ComObject' to interface type > [...] read more
delphi
delphi-xe7
delphi-10.1-berlin
1vote
1answer

Could not determine the dependencies of the COM reference "Microsoft.Office.Interop.Excel"

I'm trying to run a project I loaded which uses Microsoft.Office.Interop.Excel. I've installed the Primary Interop Assemblies and the bootrap as well for Officer 2010 (as installed). I had Office 2013 which I uninstalled and reinstalled Office 2010. I've added the Microsoft.Office.Interop.Excel through the COM references tab. Afterwards I've deleted [...] read more
c#
.net
office-interop
1vote
0answers

Programatically compiling VBA modules with c#

I have the following code Microsoft.Office.Interop.Excel.Application oXL = new Microsoft.Office.Interop.Excel.Application(); Workbook oWB = oXL.Workbooks.Open(solutionDirectory); where string solutionDirectory contains the path to an Excel xlam file. It is and Excel Macro-Enabled Add-In file that is used to add new functions to Excel : if you open it with Excel, you won't [...] read more
c#
excel
automation
vba
1vote
0answers

VS 2015 - Unable to add Controller or View

When I create a new ASP.NET project in Visual Studio 2015, I'm consistently unable to add a Controller or a View (there is are no issues with adding a Model). Note: this does not happen when using an existing project It appears to be hit or miss with existing projects. [...] read more
visual-studio-2015
1vote
0answers

Outlook 2016 automation through MAPI with interop dll

I have a problem with a Outlook solution - it worked fine with Office 2007-2013. We recently updated Office to Version 2016 and now we get an error. I don't understand why, we use the Interop.Outlook.dll from Visual Studio 2015(Office2013/2016 Add-in). We cannot downgrade because Office 365 does not allow [...] read more
c#
office365
mapi
outlook-2016
1vote
3answers

Unable to install nuget package Microsoft.AspNet.Identity.Owin -Version 2.1.0

I'm a newbie and creating an ASP.Net empty web application (C#) project. But I got this error when installing nuget package Microsoft.AspNet.Identity.Owin -Version 2.1.0. I don't know what's seemed to be the problem bcoz I'm using the newer version VS 2012 .Net Framework 4.5 and not VS 2010. Tried install [...] read more
asp.net
nuget
1vote
2answers

Failed to create component 'AxHost' System.Runtime.InteropServices.COMException (0x80029C4A)

I have created .Net usercontrol in C#. it is graphical control with a text box and listbox. Now I want to use this control in legacy VC++ application.(native binary). means I want to call manage code from unmanage code. suppose my usercontrol name is xyz.dll. I generated tlb file using [...] read more
c#
.net
user-controls
1vote
0answers

Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))

I have installed VS2008 (SP1) on Windows 7 (64bit) machine. When I run the VS IDE in "Run as administrator" mode and create a new Winform application or open the design view of a Form in an already existing application, I get following error message: Error loading type library/DLL. (Exception [...] read more
c#
winforms
visual-studio-2008
1vote
1answer

TYPE_E_CANTLOADLIBRARY - COM interop via MTA thread

I have a simple x86-targeting .NET 3.5 console program that calls methods on COM objects in an ActiveX DLL via interop. In my registry, the ActiveX DLL has a ThreadingModel of Apartment. When the .NET program is running in an STA thread, everything works fine. In an MTA thread, some [...] read more
c#
com-interop
1vote
0answers

Error loading type library DLL. (Exception from HRESULT: 0x80029C4A(Type_E_CANTLOADLIBRARY))

I'm developing a c# desktop app on a customer's dev machine. Part of the app involves using a third party dll to communicate with another application installed on the box. My app builds fine and even executes to a certain degree but whilst debugging I noticed I was getting the [...] read more
c#
exception
dll
desktop
1vote
1answer

VLC plugin in .net 4.5 gives "Failed to create component 'AxHost' System.Runtime.InteropServices.COMException (0x80029C4A)"

We are using windows forms application in VisualStudio 2012.(.net 4.5). We just want to use a vlc player in the design. We dragged and dropped the vlc icon after which we got the above error. We have tried registering the axvlc.dll. It has been registered. Still this error is not [...] read more
c#
vlc
1vote
1answer

initializing OutlookEmail object gives Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)

When I try to initialize object as: OutlookEMail email = new OutlookEMail(MailType); in C# I get exception: > Unable to cast COM object of type > 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because > the QueryInterface call on the COM component for the interface with IID > [...] read more
c#
email
outlook
1vote
1answer

TFS 2012 error TF400422 when exporting to Excel

I have installed Microsoft Visual Studio Professional 2012 (v11.0.060610.01 Update 3) and I also have Office Professional Plus 2010 installed in a Windows 7 Enterprise (with SP1) 64-bit operating system. Since some weeks ago everytime I try to export in the result of a Work Items' query (through "Open Query [...] read more
tfs
export-to-excel
1vote
1answer

Lync: VideoWindows of AVModality.VideoChannel are null after successfully calling BeginStart (COMException HRESULT: 0x80029C4A TYPE_E_CANTLOADLIBRARY)

We are currently trying to incorporate Lync communication (Lync SDK 2010) into our application and we have run into an issue with the VideoWindows (CaptureVideoWindow, RenderVideoWindow) of the AVModality's VideoChannel: They are always null, even after successfully calling BeginStart. The connection is definitely established. We can talk. Our own video [...] read more
c#
video
lync
lync-2010
comexception
1vote
1answer

64 bit dll register

I have converted 32 bit COM dll into 64 bit dll by using x64 build.I tried to register this 64 bit dll into 64 bit windows 2008 server uisng C:windows\system32 regsrv32.exe .But i'm getting an error message "Dllregister server failed with error code 0x80029c4a". How can i register this dll [...] read more
windows
dll
com
64-bit
regsvr32
1vote
3answers

CastError when calling interop Excel functions in a thread?

I have an excel addin class that has this function: public void testRibbon() { Excel.Workbook workbook = this.Application.ActiveWorkbook; Excel.Worksheet activeSheet = workbook.Sheets[1]; Excel.Range range = activeSheet.get_Range(JOB_ID_FIELD + HEADER_ROW, TOTAL_STATUS_PERCENTAGE_KEY_FIELD + (10 + 1).ToString()); range.get_Range("C4").Value = "test Ribbon complete"; } In the ribbon I added a button that when pressed will [...] read more
c#
excel
excel-interop
1vote
1answer

DLL registration return code 0x80029c4a

I'm fairly new to COM programming and I have a DLL that compiles, but wont register when I attempt to run it. I followed this tutorial here http://msdn.microsoft.com/en-US/library/2wad1c0e(v=vs.80) and modified it to produce the code bellow. I'm not quite sure what I did wrong here. #pragma once #define STRICT #ifndef [...] read more
c++
windows
com
1vote
2answers

Error when accessing a COM dll with Threading Model Apartment from Multithread Apartment

I have to communicate with a third party application and the only way to do so is by accessing the provided COM component. Because the interaction takes about 3 minutes it's mandatory that it takes place in the background. So what i tried to do is to add a reference [...] read more
c#
multithreading
visual-studio-2010
com
com-interop
1vote
1answer

Visual Studio 2010 throws error when creating a Resource File

This is very strange...I get an error when trying to create a resource file in Visual Studio 2010...I have absolutely no idea how to fix this...tried googling it and came up with nothing. I tried two different ways...right click on the Class Library Project, click the Resources tab on the [...] read more
visual-studio-2010
1vote
2answers

Windows 2008 64 bit OS and 32 bit COM EXE's

getting a COM error trying to run 32 bit OOP COM exe's on a 64 bit OS. Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)). If I have a compiled 32bit EXE that reads registry for GUID's how do I resolve this? David D read more
windows
oop
com
windows-server-2008
0votes
0answers

Debugging Installation Problems with Visual Studio 2013 Express for Web

I'm having 2 strange issues on a fresh install of VS2013 Express for Web. The install seemed to go ok, but when completed I have two problems. Could anybody help or point me in the right direction to either solve or begin debugging this? I am praying against a Windows [...] read more
windows-7
installation
visual-studio-2013
0votes
1answer

My Visual Studio is completely broken and I can't fix it. No errors just doesn't run

Alright so I'm just starting to learn C#, I'm not the most savy with everything yet, I'm trying to learn but this issue has really hindered me from going forward learning C#. So basically no matter what I do I can't run a project. Even though there are no errors [...] read more
c#
visual-studio
visual-studio-2019
0votes
0answers

unable to cast COM object of type microsoft.office.interop.outlook.applicationclass to interface type Microsoft.Office.Interop.Outlook._Application

Perform a development where it is necessary for me to obtain the mail that is registered in the Outlook session in Windows. In that sense, the only thing that the user has to do is enter their windows session password to be able to log in and then go to [...] read more
vb.net
outlook
0votes
2answers

I am getting an error while exporting to Excel

I want to transfer the data from dataGridView to Excel. For this, I added the "Microsoft.Office.Interop.Excel" plug-in to my project. I wrote the necessary codes properly. But when I run the project and click the "Export to Excel" button, I get an error. What should I do? This is my [...] read more
c#
sql-server
excel
visual-studio
export-to-excel
0votes
2answers

How to understand the cast exception in automating Word from a VB code in Visual Studio?

I am developing a form application in the German Visual Studio 2019 that should automate Word using VB. In my VB project, I added a reference to the Microsoft.Office.Interop.Word.dll and can compile the application. To debug the application in VS, I use the code: Dim oWord As Microsoft.Office.Interop.Word.Application oWord = [...] read more
vb.net
automation
visual-studio-2019
0votes
0answers

Problem with 32-bit COM component from 64-bit application. (TYPE_E_CANTLOADLIBRARY)

I have a created a dummy application for testing purposes which is a 64-bit console application, which creates an instance of a 32-bit COM application. It is a third party application called Laserforms. static void Main(string[] args) { LFM32.Application application; try { application = new LFM32.Application(); Console.WriteLine("Success!"); application.Quit(); } catch [...] read more
com
com-interop
0votes
1answer

Opening MS Access database with Powershell?

I am trying to open a form in an access database using powershell: $application = New-Object -ComObject Access.Application $Fullpath = "path.accdb" $application.OpenCurrentDataBase($Fullpath) $application.docmd.OpenForm("frm") I am getting the following error message: > Exception calling "OpenCurrentDatabase" with "1" argument(s): "Unable to cast > COM object of type 'Microsoft.Office.Interop.Access.ApplicationClass' to > interface type [...] read more
forms
powershell
ms-access
0votes
1answer

Error loading type library/DLL (any Nuget package)

I'm trying to add packages within a .NET Core Class Library project, but after I run the following command Install-Package <package-name> I get the following error: Install-Package : Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) At line:1 char:1 + Install-Package Microsoft.EntityFrameworkCore + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [...] read more
.net
windows
.net-core
nuget
visual-studio-2019
0votes
1answer

Can I register multiple *.tlb files at once in Inno Setup?

When I try to register all the *.tlb files using a wildcard: RegisterTypeLibrary(Is64BitInstallMode, ExpandConstant('{app}') + '\TLB\*.tlb'); I get the runtime error 0x80029C4A. Does it mean that I have to register all the files one by one? Is there a way to register a folder? read more
registry
inno-setup
tlb
0votes
2answers

Microsoft SQL Server Management Studio Error

I installed SSMS 2017. When I run it, I can connect to a server successfully in Object Explorer. But when I try to open New Query (File - New - Query with Current Connection), I get the following error: > Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A > (TYPE_E_CANTLOADLIBRARY)) [...] read more
sql-server
dll
0votes
0answers

automate outlook email error loading library

Hi i am trying to automate sending email with attachment of excel file however i am getting an error stating Send Outlook Mail Message: Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface type 'Microsoft.Office.Interop.Outlook._Application'. This operation failed because the QueryInterface call on the COM component for the interface [...] read more
uipath
0votes
3answers

Error loading Office.dll COMException: 'Errorloading type library/DLL'

I have a working Excel COM library and I am trying to use the following method to determine if excel is in edit mode public bool IsEditMode(Microsoft.Office.Interop.Excel.Application xlApp) { //https://stackoverflow.com/questions/464196/workaround-to-see-if-excel-is-in-cell-edit-mode-in-net //xlApp = (Microsoft.Office.Interop.Excel.Application)ExcelDnaUtil.Application; var bars = xlApp.Application.CommandBars; var commandBar = bars["Worksheet Menu Bar"]; var menu = commandBar.FindControl( 1, //the type [...] read more
c#
excel
visual-studio
com
office-interop
0votes
1answer

PowerShell Exception Calling "Unable to cast COM object" - Error loading type library/DLL

I have the following script in PowerShell which has been executing fine for months. I did not change anything, but I am receiving the error below. I've tried on other machines, but I keep receiving the same error. Any assistance or guidance would be greatly appreciated. I would have to [...] read more
vba
powershell
0votes
1answer

Word as COM object has no attributes/ability to set attributes

I'm sorry that this is quite alien to me, but I had a previously working script that functioned like the following: $wd = new-object -comobject word.application but when I print the COM object it has empty/blank values for all attributes. PS C:\Users\XXX> $wd Application : Creator : Parent : Name [...] read more
powershell
ms-word
com
0votes
0answers

QueryInterface call on the COM component failed TYPE_E_CANTLOADLIBRARY (calling VB6 from VS2013)

I already added the reference and registered the dll file on syswow64 (because it is a 32bit dll). I also set the debug platform to x86, and yes, i did enable 32 bits applications on the AppPool of the iis. The error is produced on this line: Dim calc As [...] read more
asp.net
dll
vb6-migration
0votes
1answer

VB.net Error When Trying To Connect To Access Database With OpenCurrentDatabase in Microsoft.Office.Interop.Access.Application Namespace

I am trying to get a legacy system to work in a new environment. The legacy system consists of a VB.net application that connects to an Access database. My new environment consists of Visual Studio 2017 and Access 365. When I try to run the application, I get an error [...] read more
vb.net
ms-access
office365
0votes
0answers

How to load type library file in MSFT format using LoadTypeLibEx

I have an old OLB file that actually is a type library (probably MSFT file format). It´s signature starts with 0x4D, 0x53, 0x46, 0x54, 0x02, 0x00, 0x01, 0x00 which is an OLE Type Libary 2, or C++ type library file, as I learned so far. I am trying to load [...] read more
c#
com
interop
typelib
0votes
0answers

Issue when adding Controller using "Add scaffold" wizard in VS Community 2015

Need your help! I have tried other responses from different posts nothing worked f me. So posting my issue here. When adding "Web API 2 controller - Empty" using "Add Scaffold" wizard: image [https://i.stack.imgur.com/dkeNa.jpg] I'm getting this issue. > There was an error running the selected code generator Error loading [...] read more
visual-studio-2015
asp.net-web-api2
vs-community-edition
0votes
0answers

Problem in exporting excel sheet using Office Interop

I have a page that exports the data to an excel workbook in 3 different worksheets (ASP.net C#) with graphs. The page is working fine on my development machine but when I am running this page on server, it is giving me the following error: Unable to cast COM object [...] read more
c#
asp.net
excel
office-interop
excel-2013
0votes
1answer

Error loading type library/DLL after vs 2017 installation

> Error occurred while restoring NuGet packages: > System.Runtime.InteropServices.COMException (0x80029C4A): Error loading type > library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) at > EnvDTE.Project.get_Properties() at > NuGet.VisualStudio.VsUtility.GetPropertyValue[T](Project project, String > propertyName) at NuGet.VisualStudio.VsUtility.GetFullPath(Project project) at > NuGet.VisualStudio.VsUtility.GetPackageReferenceFileFullPath(Project project) > at NuGet.VsEvents.PackageReferenceFileList.GetPackageReferenceFiles(Project > project) at NuGet.VsEvents.PackageReferenceFileList..ctor(Solution solution) > at NuGet.VsEvents.PackageRestorer.BuildEvents_OnBuildBegin(vsBuildScope Scope, > [...] read more
c#
visual-studio
visual-studio-2013
visual-studio-2017
nuget
0votes
1answer

Can't run VS 2015 Community without /resetsettings; Getting CANTLOADLIBRARY on opening new projects, and crashing on new .cpp files

I have Windows 10, fully updated. I downloaded and installed Visual Studio Community 2015 last week for the first time, (previously programmed in Code:blocks, still installed) and selected custom install to allow for C++ and Python programming. Installation ran smoothly, but VS always fails on launch. On first launch ever, [...] read more
c++
visual-studio-2015
0votes
1answer

Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A

I want to communicate with Excel, so im using the 'Microsoft.Office.Interop.Excel 16.0' DLL. Tho im getting the expection: > System.InvalidCastException: 'Unable to cast COM object of type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. This operation failed because > the QueryInterface call on the COM component for the interface with [...] read more
c#
.net
excel
dll
0votes
1answer

delete excel content c#

I want to delete content of an Excel file from my web application but I have some errors, I have used this code: var excel = new Application(); var workbook = excel.Workbooks.Open(ExcelFileName, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); try { foreach (dynamic [...] read more
c#
excel
0votes
0answers

Visual Studio 2015 can't read settings from csproj file

Yesterday my VS2015 suddenly stopped being able to read the settings from any csproj files, and I've no idea why. There are several symptoms of this: * I get many warnings when opening a project, saying "Load of property 'OutputPath' failed", "Load of property 'AssemblyName' failed" etc. etc. * Most [...] read more
visual-studio-2015
0votes
1answer

Visual Studio 2008 Publish fails, can't load dll (envdte.dll)

I started to get this error after I had installed and uninstalled various MS SDKs Error: Publish failed with the following error: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.Project'. This operation failed because the QueryInterface call on the COM component for the interface with IID [...] read more
visual-studio-2008
publish
envdte
0votes
2answers

AutoCAD 2014: System.Runtime.InteropServices.COMException (0x80029C4A) (TYPE_E_CANTLOADLIBRARY))

I have created classLibrary dll in vb.net 2013 for AutoCAD 2013 using ObjectARX 2013. It works fine in AutoCAD 2013 32bit & 64 bit (winxp, win7, win8). The same program I copied for AutoCAD 2014 and libraries used ObjectARX 2014. But it give this error when I run in AutoCAD [...] read more
vb.net
autocad
0votes
0answers

VS2015 Nuget error but not using Nuget at all

Yesterday i upgraded from visual studio 2010 to vs2015. I have an existing project, a simple Windows Forms application that used to build without problem. Now when building the project in VS2015 i get Error while restoring Nuget packages, HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY). I'm not using Nuget, don't know what Nuget [...] read more
vb.net
visual-studio-2015
compiler-errors
nuget-package-restore
0votes
1answer

Accessing an ITypeInfo that references an ITypeInfo from an importlib-ed unregistered type library causes TYPE_E_CANTLOADLIBRARY error

I am using the Automation API from .NET (System.Runtime.InteropServices.ComTypes) to inspect a type library Bar.tlb that I generated myself (see below). This type library declares an interface IBar which inherits from interface IFoo which is defined in an imported type library Foo.tlb. Inspecting the ITypeInfo representing IBar causes an exception. [...] read more
c#
.net
ole
midl
ole-automation
0votes
0answers

Multi-threading issue with WebKitBrowser

I am trying to get two WebKitBrowser controls to navigate to a website at the same time. I am running into a System.InvalidCastException error which is caused by the multi-threading as I read something related to marshalling but I am still stuck. I attached the code below if that would [...] read more
.net
vb.net
multithreading
marshalling
0votes
0answers

vb 2008 Application calling Outlook with an Attachment

Have an application that I have the task of upgrading from VB6 to VB 2008. The program has code that creates an Excel sheet and opens Outlook with the Excel sheet as an attachment. My problem is there are 3 different versions of Outlook. I had it working from my [...] read more
vb.net
visual-studio-2008
vb6-migration
office-automation
0votes
0answers

COM - Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY))

I've got a very strange issue happening and will try describe this as best as I can. So I have a COM object which I've registered correctly and then reference from my test application. I then create an object (called Connection) and populate it with the connection details. Next I [...] read more
com
0votes
1answer

How to keep single Redemption.rdosession object through entire add-in application

In my outlook add-in, I create new rdoSession object and set mapi object each time I need to make use of the rdoSession objects as following. > Redemption.RDOSession session = Redemption.RedemptionLoader.new_RDOSession(); > session.MAPIOBJECT = outlookApplicaitonObject.Session.MAPIOBJECT; Is there a possibility to have one static Redemption.rdoSession object globally, so I can call [...] read more
c#
outlook
outlook-addin
outlook-redemption
comobject
0votes
0answers

Visual studio Error in adding any references OR installing and updating any packages (loading type library/DLL)

Visual Studio 2012 RTM I have a MVC website project and i have some problem with adding some references; EDIT: My Visual Studio has some problems (More info in stackoverflow) * I can't add any reference to my projects (even inside new solutions and new projects) * I can't install [...] read more
c#
asp.net-mvc
visual-studio
t4mvc
0votes
0answers

Visual Studio 2012 Error: Could not determine the dependencies of the COM reference "WordClientPkgLib"

I have received following error while trying to do replace a style set in word document. This will replace the styles in multiple document, currently i am building in visual studio 2012. kindly help me on this. Error: Warning 1 Could not determine the dependencies of the COM reference "WordClientPkgLib". [...] read more
vb.net
visual-studio-2012
error-handling
0votes
1answer

Visual Studio 2015 crash when opening solutions as administrator

1. Open VS 2015 as administrator 2. Open a solution 3. Projects in solution are listed with status Initializing, then suddenly VS crash. Everything works as normal when NOT running as administrator Tried: - Disable all extensions - Run VS in /safemode /log - Examine ActivityLog.XML, but nothing special in [...] read more
visual-studio-2015
0votes
0answers

Getting error (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY) when migrating from MS Access 2013 to SQL Server 2014

OK.... I've checked and rechecked Google, StackFault, Experts-Exchange, etc... for a resolution on this error and they all say to register the DAO360.DLL and add its path to the environment settings. I've done that several times and I still get the following error: > Access Object Collector error: Database > [...] read more
sql-server
ms-access-2013
sql-server-2014
0votes
1answer

C# Program that uses excel throwing exception TYPE_E_CANTLOADLIBRARY

So I made a program that read some cells from an Excel file (.xlsx) and then do an online search with the data. It is working fine on my computer (Windows 8.1, Visual Studio Community 2013, Office 2013) but when I send it to a friend on another machine (Windows [...] read more
c#
.net
excel
interop
vsto
0votes
2answers

Outlook 2010 get contacts of a specitfic Profile

Currently I am getting all my Contacts with this code: Dim outlookApplication = New Microsoft.Office.Interop.Outlook.Application() Dim contacts As MAPIFolder = outlookApplication.GetNamespace("mapi").GetDefaultFolder(OlDefaultFolders.olFolderContacts) For i As Integer = 1 To contacts.Items.Count Dim contact = DirectCast(contacts.Items(i), ContactItem) cboEmail.Items.Add(contact.Email1Address) Next But I seem to have Problems when a user has more than one Profile [...] read more
vb.net
outlook
outlook-2010
0votes
1answer

Why do I get an error 0x80029C4A (TYPE_E_CANTLOADLIBRARY) on anything other than my dev box?

I've read plenty of answers on here about how to deal with the error 0x80029C4A (TYPE_E_CANTLOADLIBRARY) that say that regsvr is the way to go and checking the registry to make sure that the dll I'm using is properly registered. I've done all of this on computers other than my [...] read more
c#
.net
vb6
com-interop
0votes
0answers

Solid FFMPEG in background worker fails on user pc

I'm using Solid FFPEG to rip out individual frames from a video, I'm using this to 'play' the video (so it rips out each frame). I'm using a background worker to keep the UI responsive. Running on my PC I have no problems, but on the test PC it will [...] read more
c#
ffmpeg
backgroundworker
0votes
1answer

access automation no longer working in 4.0 framework

I have an application that opens up microsoft access performs some automation, then closes. This worked fine when using 4.5 framework. But now the application has to work on xp machines which only supports 4.0 framework. When i changed the application target framework to 4.0, i get this error which [...] read more
c#
.net
ms-access
0votes
2answers

Visual Studio 2013 RC & Visual Studio Tools for Office - TF400422 Error when using Excel

I have Visual Studio 2013 RC running on Windows 8 Pro 64 bit. Also installed is Office 2013 64 bit. The team server is TFS2012. When I want to send my queries or items to Excel, Visual Studio responds with: Microsoft Visual Studio Team Foundation Error TF400422: Failed to open [...] read more
excel
vsto
visual-studio-2013
0votes
1answer

Unable to cast COM object of type 'MSScriptControl.ScriptControlClass'

Got this error when deploying a VB6 / .NET application on a 64-bit Windows 2008 machine. Unable to cast COM object of type 'MSScriptControl.ScriptControlClass' to interface type 'MSScriptControl.IScriptControl'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{xxx}' failed due to the following [...] read more
.net
vb6
64-bit
msscriptcontrol
0votes
2answers

C# ,Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)

I face this problem when I try the exe at the user's end. The user has MicosoftExcel 2000 and I have execel 2003. Can someone please help me. I have created this tool in c# and have used COM if( strDataSheetFile.Trim().EndsWith( ".xls" ) || strDataSheetFile.Trim().EndsWith( ".xlsx" ) ) { System.IO.StreamWriter [...] read more
c#
excel
exception
0votes
1answer

Embed COM type library resouce (TLB) in MinGW-built DLL

I have a COM type library built with midl, call it "mylib.tlb". I want to embed it in a DLL, "mylib.dll" which is compiled and linked with MinGW. The DLL "mylib.dll" also contains a function myfunc(). I want to be able to embed "mylib.tlb" as a resource within "mylib.dll" so [...] read more
c++
dll
com
mingw
embedded-resource
0votes
0answers

Entity Framework Error System.__ComObject to EnvDTE.ProjectItem

I tried to add some entities from my db to my Model.tt and I couldn't do it. the project doesn't recognize the entities and there aren't appear inside of my Model.tt, but the are in the folder of my project. When I try to add the new tables/entities I got [...] read more
visual-studio-2010
entity-framework
compiler-errors
0votes
1answer

COM object in C# VS2008: Error loading type library/DLL

I am trying to reference a third party COM DLL from a Visual Studio 2008 project (.NET 3.5 SP1) on Vista Ultimate. I ran the setup for the COM component, and then discovered that it was not the right setup. So I uninstalled and ran the correct install. After adding [...] read more
.net
com
interop
0votes
2answers

Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)

I'm creating a windows service on a windows 2003 machine, using dsofile to modify custom properties on a bunch of documents. This works fine until I install the service on a win2k8 machine where it gives me the following error: > ERROR [2010-09-06 13:17:12,317] An unknown error occured: > System.InvalidCastException: [...] read more
c#
windows
com
64-bit
0votes
1answer

"Could not determine the dependencies" warning in VB.NET?

I am getting the following warnings in my VB.NET solution... > Warning 5 Could not determine the dependencies of the COM reference "Excel". > Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A > (TYPE_E_CANTLOADLIBRARY)) MyProject Warning 6 Could not determine the > dependencies of the COM reference "VBIDE". Error loading [...] read more
vb.net
0votes
1answer

Debugging visual basic dll library from asp.net hosted in IIS

I have the following problem. I have some project written in Visual Basic (not Visual Basic .NET but simple Visual Basic - sic!). I can compile it and generate a dll. Then inside my web application I add reference to this dll library. When I run my web application hosted [...] read more
asp.net
vb.net
debugging
com
-1votes
3answers

c# Windows Application failed to run on another computer

I have created an new C# windows forms application. I have added COM Reference "Microsoft Excel 15.0 Object Library" to my project. This project is for importing excel data to the dataset. I have done it. I works fine in my computer. If i run the exe file on another [...] read more
c#
.net
vb.net
excel
office-interop
-1votes
1answer

Getting an error while trying to import query results from VS 2013 to microsoft excel 2013

I have VS 2013 installed on my laptop and I am using MS OFFICE 2013. I have created queries for tracking tasks in TFS. I am getting an error while trying to open\import the query results in MS EXCEL. Here is the error that I am getting: TF400422: Failed to [...] read more
excel
tfs
-1votes
1answer

Switching between Platform-Configurations breaks COM-Compatibility

I have an rather odd problem with Visual Studio once more. I have a library which depends on one COM-Library. Out of the blue the COM-Library depending on MDAC 2.7 suddenly1 produced this Compile-Error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)) Together with this error others showed up [...] read more
visual-studio-2008
com
-2votes
1answer

Refer to COM object in the worker thread in C#

I have a COM object SerInterface objCANinterface; which is created in VC++ 6.0 ATL which i was able to successfully call the methods from my C# GUI.(ThreadingModel is Both when checked in registry) But i have created a thread which has to use this object opened inside this thread to [...] read more
c#
multithreading
object
com
call

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0