Windows error 0x80004002, -2147467262

Detailed Error Information

E_NOINTERFACE[1]

MessageNo such interface supported
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode0 (0x000)
NameFACILITY_NULL[2][1]
DescriptionThe default facility code.[2][1]
Error Code16386 (0x4002)

Questions

74votes
10answers

Visual Studio 2015 crashes

Visual studio that won't be repaired... Everytime I want to compile an app on vs 2015 - it crashes. Even if I want to compile the main function or write somthing to it, there appears a window, which says > Visual Studio 2015 has stopped working It goes same on [...] read more
visual-studio
visual-studio-2015
18votes
3answers

Exception when using Shell32 to get File extended properties

I am trying to use Shell32 to get extended file properties in c#. My code for this is as follows. var file = FileUpload1.PostedFile; List<string> arrHeaders = new List<string>(); Shell shell = new ShellClass(); //Exception is thrown at next line Folder rFolder = shell.NameSpace(Path.GetDirectoryName(file.FileName)); FolderItem rFiles = rFolder.ParseName(Path.GetFileName(file.FileName)); for (int [...] read more
c#
asp.net
.net
13votes
3answers

Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass'

I have 2 windows program. Program A : create with visual studio 2015 with crystal report SP18 Program B : create with visual studio 2017 with crystal report SP22 I have a computer with crystal report runtime SP 18. I run program A in that computer. Program A can create [...] read more
winforms
visual-studio-2015
crystal-reports
visual-studio-2017
report
10votes
1answer

Azure App Services suddenly pegging at 100% CPU

This is a problem that I'm intermittently running into, but when it happens it takes down all of my app services at the massive displeasure of the clients that are paying me to use them. At 4am this morning (when no-one was using any of the apps), the CPU on [...] read more
azure
azure-web-app-service
8votes
4answers

Unable to cast COM object of Office Interop Word

My application has a feature to export to Microsoft Word, but it hasn't worked since I've upgraded from Microsoft Office 2010 to Microsoft Office 2013. Here is the code: Microsoft.Office.Interop.Word.Application appVersion = new Microsoft.Office.Interop.Word.Application(); appVersion.Visible = false; and this is the error message: > Unable to cast COM object of [...] read more
.net
com
ms-office
office-interop
6votes
2answers

Failure to install NetFX3 on Windows Server 2012: Error 3017 -- Am I missing something here?

I am really struggling to get this installed. I have tried the suggestions here in an attempt to rectify any possible corruption. I mounted the disk image to 'G' to do an offline install. I also attempted an online install with similar results. Output as follows: Microsoft Windows [Version 6.2.9200] [...] read more
windows-server-2012
.net-3.5
6votes
1answer

How can I get my Win32 app running with Wine in Docker?

I have a Win32 app that exposes a REST endpoint and displays a window to log requests. It's written in Delphi and is 32-bit. I've run it in Ubuntu (20.04) using Wine (4.0.4). It runs straight out of the box. I create a 32-bit prefix and launch it. All is [...] read more
docker
wine
6votes
4answers

Set custom document properties with Word interop

I want to set some custom document properties of a word document I'm creating in my C# code. To do this, I followed this MSDN article and came up with this code: using Word = Microsoft.Office.Interop.Word; // Version 12.0.0.0 word = new Word.Application(); word.Visible = false; Word._Document doc = word.Documents.Add(ref [...] read more
interop
ms-word
vsto
office-2010
office-addins
5votes
1answer

Using DataTable as a Table Valued Parameter in EF Core 2.0

[Updated problem description] We have a bulk import process for which we were passing IEnumerable<SqlDataRecord> as a Table Valued Parameter (TVP) to a Stored Proc, as DataTable Type was not available until EF Core 1.1. We just upgraded our project to use .Net Core 2.0 and started updating the code [...] read more
c#
entity-framework
entity-framework-core
table-valued-parameters
5votes
2answers

Windows form application error with crystal report

I'm a novice in the windows form application. It's my first application at the office. My office management gives me the source code. But they don't know anything about it. I run those codes on visual studio 12 (64 bit). Everything is running, but the crystal report is not working. [...] read more
c#
visual-studio
crystal-reports
4votes
2answers

wineboot hangs and does not complete

I'm having a strange issue with Wine on macOS 10.13.4. I have Homebrew installed and have installed Wine with brew install wine winetricks. $ wine --version wine-3.0 When I run wineboot --init > log 2>&1 I get a dialog box that says The Wine configuration in /Users/richard/.wine is being updated, [...] read more
macos
wine
3votes
1answer

Installing SCCM Client 2012 failed: "CcmSetup failed with error code 0x80004002"

We're using Microsoft System Center Configuration Manager 2012. And I have issues installing the SCCM Client on a Windows XP Prof SP3 PC. The Log on the XP machine says: Failed to query BITS 2.5 interface with error 0x80004002 ccmsetup 22.10.2014 15:46:34 268 (0x010C) This operating system does not contain [...] read more
windows-xp
sccm
sccm-2012
bits
3votes
3answers

Google Chrome install fails with error 0x80004002

I'm using Windows 7 64 bits and I'm trying to install Google Chrome. However, every time I do, I get this error message: > Google Update installation failed with error 0x80004002. There is a Show me help for this issue link, but it does nothing. I tried the standalone installer [...] read more
windows-7
google-chrome
64-bit
3votes
2answers

how to get document content using DFC in c#

I have documentum developer edition 6.6. I want to get document content (read content into stream) using DFC in c#. I have used following C#.net code IDfId id = collection.getId("r_object_id"); IDfDocument doc = (IDfDocument) session.getObject(id); but it throws following exception. > Exception: Unable to cast COM object of type 'System.__ComObject' [...] read more
c#
documentum
dfc
3votes
3answers

How to get CustomDocumentProperties using Excel Interop?

The below code is used to get the custom document properties for Excel workbook. var xlApp = Globals.ThisAddIn.Application; // This works in VSTO Excel Add-in var xlApp = new global::Microsoft.Office.Interop.Excel.Application(); // This doesn't work anywhere xlApp.Visible = true; global::Microsoft.Office.Interop.Excel.Workbook workbook = xlApp.Workbooks.Open(file, false, true, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, [...] read more
c#
excel
interop
vsto
2votes
1answer

VisualSVN Server installation fails with error "Cannot query proxy blanket: No such interface supported"

VisualSVN Server installation fails with the following error message: > Custom action InstallWMISchemaExcute failed: Cannot query proxy blanket: No > such interface supported (0x80004002). read more
windows
svn
visualsvn-server
2votes
1answer

Validation is throwing "Unable to cast object of type 'BaseModel' to type 'DerivedModel'."

I'm seeing a strange issue with FluentValidation (v8.2.0) when I try to compose validators: > System.InvalidCastException HResult=0x80004002 Message=Unable to cast object > of type 'BaseModel' to type 'DerivedModel'. Source=FluentValidation > StackTrace: at > FluentValidation.Internal.ConditionBuilder1.<>c__DisplayClass2_0.<When>g__Condition|0(ValidationContext > context) in > C:\Projects\FluentValidation\src\FluentValidation\Internal\ConditionBuilder.cs:line > 62 at FluentValidation.Internal.PropertyRule.<Validate>d__67.MoveNext() in > C:\Projects\FluentValidation\src\FluentValidation\Internal\PropertyRule.cs:line > 270 at System.Linq.Enumerable.SelectManySingleSelectorIterator2.MoveNext() [...] read more
c#
fluentvalidation
2votes
2answers

How to fix a Failed Task for a Biml-Built SSIS Script Task: No such interface supported

I've been testing out creating script tasks through Biml for SSIS packages. I want to be able to locally execute/test packages successfully. I was unable to execute the packages for a project from my local development environment, as they all error with the same error below. Issue: Error: 0x0 at [...] read more
c#
ssis
biml
2votes
2answers

CoreAudioApi with threading - InvalidCastException

I'm writing an application to modify the volume of another application and using the CoreAudioApi dll to do so. The following block of code works perfectly on the main thread, but when called in a separate thread, an InvalidCastException is raised. I threw in a Mutex in case this was [...] read more
c#
multithreading
com
.net
2votes
3answers

Opening Word Document through code in Visual Studio C#

I am developing a Office Development with Visual Studio. And receive the error below Error: ** Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following [...] read more
c#
.net
vsto
2votes
1answer

Handling Inbox.items collection - VSTO Outlook Visual Basic

I couldn't find anything regarding a search by conversation ID in the Outlook.Items object collection (corresponding an outlook inbox) Scenario: we designed a website that requests an email to be searched in outlook client through a table insert insert into Request(UserID,CID,emailDate,outlookAccount) values ('myUserID','28603734D8EE4316A59257895B1B4A1A','2020-02-11','myOutlookAccount@outlook.com') From out VSTO add-in (visual basic) we [...] read more
sql-server
vb.net
outlook
2votes
3answers

Printing the contents of a WPF WebBrowser

I'm trying to print the contents of a WPF WebBrowser control so that no print dialog is shown, but am having no luck. I have tried the following and am sure it did work: PrintDialog printDialog = new PrintDialog(); printDialog.PrintDocument(((IDocumentPaginatorSource)browser.Document).DocumentPaginator, "My App"); but for some reason, I'm now getting the [...] read more
wpf
browser
printing
2votes
0answers

System.InvalidCastException on FFDShow Video Decoder on "Standard User" account

Exception: Unable to cast COM object of type 'System.__ComObject' to interface type 'DirectShowLib.IBaseFilter'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{56A86895-0AD4-11CE-B03A-0020AF0BA770}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)). My Graph: Custom File Source [...] read more
windows
directshow
directshow.net
ffdshow
1vote
1answer

Cannot uninstall KB4338815

Trying to uninstall this update as it breaks one of our .net applications but it will not remove. Tried in Installed Updates which fails, also tried removing via DISM which fails with the log below (I had to remove timestamps and a little inconsequential data to make it all fit [...] read more
windows
windows-server-2012-r2
update
windows-update
1vote
2answers

Windows 10: sfc and dism cannot repair corruption

There are several posts along this line, but the fixes that answered other questions did not solve my problem. * Windows 10 Pro * Upgraded from W7 Pro, then did a "Reset", as I was having some problems with a screen saver and wanted to get a cleaner install without [...] read more
windows-10
dism
sfc
1vote
0answers

How Can I Execute DISM Through A Specific Source On Windows 10?

Right now I my computer crashes with errors like SystemService exception. It does this quite frequently. Especially if I run a GPU intensive application like a game. I've executed a DISM command for RestoreHealth after sfc /scannow revealed corrupted files. However, it seems that the files needed for that are [...] read more
windows-10
hard-drive
command-line
iso-image
dism
1vote
2answers

Trouble installing Chrome using wine on Linux

As some of google chrome's dependencies for Linux are unable to be met (libstdc++6 and lsb-base), I've been unable to update it, which bothers me. So I've tried to install Google Chrome for Windows. I have installed wine (version 1.6.1) and it seems to be working. In addition, I've gotten [...] read more
google-chrome
linux-mint
wine
winetricks
1vote
1answer

(Win Server 2012 R2) Can't enable data deduplication

Windows Server 2012 R2 (Datacentre edition) I cannot enable Data Deduplication. This particular volume previously had data deduplication enabled. Computer was changed from BIOS to UEFI boot, so basically Windows was reinstalled and boot disk has changed. However I get the same error on new volumes that did not previously [...] read more
storage
windows-server-2012-r2
administration
deduplication
storage-spaces
1vote
0answers

Winebottler prefix creation aborted

I've used Winebottler without problems to create an app bundle but now I can't create them anymore because I get a similar error for every attempt. I even tried creating a new user account and uninstalling Wine and Winebottler and deleting every trace of them from terminal but the problem [...] read more
macos
wine
1vote
0answers

Why is Windows 10 suddenly asking me to Activate (Error 0xC004C003)

I upgraded last year from Windows 8.1 which was licensed. Since then I've been using Windows 10 quite happily with no problems although Windows Update reports it hasn't updated since May 2016 and that it can't update now due to problems with error 0x80004002 reported. Last night I installed Photoshop [...] read more
windows
windows-10
1vote
0answers

Portable Virtual Box Error

I installed Portable Virtual Box in my flash memory.when I run it in my laptop it works great.but when I want to run it in my PC this error appears and it appears again when I run it as administrator. Failed to create the Virtual Box COM object. The application [...] read more
virtualbox
1vote
1answer

Install Hyper-V on Windows 8 PRO

I've tried to install Hyper-v platform component on my Windows 8 Pro. I got no message about anything going wrong. Just after "need restart" i got 30% progress done, then sudden restart again and "canceling unsuccessful install" message. No log messages, or rather say i don't know where to look [...] read more
windows-8
installation
hyper-v
1vote
1answer

How can I set the Zoom Level on my Bing Map?

I've got this shared event handler for 19 menu items, labeled "1" to "19", with corresponding tag values of 1 to 19: // This event handler is shared by all 19 zoom level menu items private void toolStripMenuItem_ZoomLevel1_Click(object sender, EventArgs e) { //int zoomLevel = sender.Tag; // "object does not [...] read more
c#
.net
wpf
winforms
bing-maps
1vote
1answer

Invalid cast only when function called from timer

im trying to do a program that read a string from a website e send it to another. the process to read string for the first works correctly, and also the function to send a string to the other works, but have problem when this function was called from the [...] read more
c#
webbrowser-control
1vote
1answer

Enter transaction code in SAP with c# GUI test

I have problems with enter transaction code in SAP when I am running c# test. I don't know where I am doing incorrect work. After log in to SAP enviro I am trying to enter transaction but it doesn't enter. It gives me error. I tried many ways. Thanks for [...] read more
c#
testing
automated-tests
sap-gui
1vote
2answers

How to get sync return from ExecuteScriptAsync in WebView2

.NET, WinForms. The calls are triggered from the UI thread (buttons - clicks). The returns from ExecuteScriptAsync should continue to be processed synchronously, i.e. they should be synchronized again with the call context. I fail here. I tried for example: private void buttonTest1_Click(object sender, EventArgs e) { MessageBox.Show(GetMathResult()); } String [...] read more
.net
winforms
async-await
webview2
1vote
1answer

EF Core JET: AccessViolationException when 'updating' changed objects in MS Access

I'm building a .NET Core 3 console app with EF Core 2.2.x and EntityFrameworkCore.Jet to perform some generic reading and writing from/to an access database (mdb). I'm compiling for x86 as the docs say. Goal is to migrate lost and lots of data from a legacy system to a newer [...] read more
ef-core-2.2
jet-ef-provider
1vote
0answers

Failed to convert parameter value from a TextBox to a Int32

With work being slow I have decided to experiment and learn with Visual Basic. I have decided that it would be nice to develop and app to query my SCCM DB for Bitlocker Keys using a Computer Name as search criteria. My SQL Query works if run vis SQL Studio [...] read more
sql
vb.net
1vote
0answers

System.InvalidCastException for identical types?

System.InvalidCastException: '[A]DefaultStockWatchPlugins.Model.EditWatchlistModel cannot be cast to [B]DefaultStockWatchPlugins.Model.EditWatchlistModel. Type A originates from 'DefaultStockWatchPlugins, Version=2020.9.8.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'P:\Code Projects\Codefarts.StockMarket\StockWatchWpfCore\bin\Debug\netcoreapp3.1\Plugins\DefaultStockWatchPlugins\DefaultStockWatchPlugins.dll'. Type B originates from 'DefaultStockWatchPlugins, Version=2020.9.8.0, Culture=neutral, PublicKeyToken=null' in the context 'Default' at location 'P:\Code Projects\Codefarts.StockMarket\StockWatchWpfCore\bin\Debug\netcoreapp3.1\Plugins\DefaultStockWatchPlugins\DefaultStockWatchPlugins.dll'.' Never had this exception show up like this before. I mean [...] read more
c#
wpf
xaml
exception
casting
1vote
0answers

Unable to cast object of type 'LogicalBinaryExpression' to type 'System.Linq.Expressions.Expression`1[System.Func`2[T,System.Boolean]]'.'

TestData is System.Linq.Expressions.LogicalBinaryExpression I have convert to Expression<Func<Experience, bool>> this format its occur error Expression<Func<Experience, bool>> C1 = (Expression<Func<Experience, bool>>)TestData; Error: > System.InvalidCastException HResult=0x80004002 Message=Unable to cast object > of type 'System.Linq.Expressions.LogicalBinaryExpression' to type > 'System.Linq.Expressions.Expression1[System.Func2[CCIP.Shared.ModelsCCIP.Experience,System.Boolean]]'. > Source=CCIP.Data StackTrace: read more
c#
database
linq
1vote
0answers

COM in please, how to make out-of-process COM server work? (fixed)

I have difficult to make an out-of-process COM server work properly. My steps are 1. DEFINE IDL (CLASSIC.IDL) import "objidlbase.idl"; [ uuid(CF86E2E0-B12D-4C6A-9C5A-D7AA65101E91), ] coclass CClassic { [default] interface IClassic; } [ object, uuid(CF86E2E0-B12D-4C6A-9C5A-D7AA65101E90), pointer_default(unique) ] interface IClassic : IUnknown { HRESULT Hello(); } 2. GENERATE THE PROXY/STUB FILES midl /nologo [...] read more
com
atl
1vote
0answers

Reference private assembly in thread, C#

Winforms-application in C#, .net 4.5.2. I wish to handle all communication with a private COM-assembly in a thread. However, I get "This operation failed because the QueryInterface call on the COM component for the interface with IID xxxx-xxx failed due to the following error: No such interface supported (Exception from [...] read more
c#
multithreading
com
private
1vote
2answers

Extracting InDesign CS4 Graphics using C# and COM

I'm trying to get details of the graphics in an InDesign file. For technical reasons I'm using COM. Not my favourite, as (discussed elsewhere in StackOverflow) you have to spend half your life casting. In Theory (!), the code snippet belwo should work. Intellisense shows doc.AllGraphics as returning objects. The [...] read more
c#
com
graphics
adobe-indesign
1vote
10answers

Outlook Interop Exception

Trying to automate Outlook as Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook.NameSpace mapiNameSpace = myApp.GetNamespace("MAPI"); and getting following exception at second line i.e. GetNamespace > 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 [...] read more
c#
com
outlook
office-interop
com-interop
1vote
0answers

Swashbuckle.AspNetCore.Filters throws an exception when trying to use System.Text.Json.Serialization.JsonStringEnumConverter

I've an ASP.NET Core 3.1 project on which I want to generate the API documentation along with queryable examples using Swagger. I want to use the new System.Text.Json namespace instead of the good old Newtonsoft.Json one As stated in the Swagger documentation > If you're using System.Text.Json (STJ), then the [...] read more
asp.net-core
json.net
swagger
swashbuckle
system.text.json
1vote
2answers

The SqlParameterCollection only accepts non-null SqlParameter type objects, not SqlParameter objects in Microsoft.Data.SqlClient

I'm trying to use one of these namespaces //using Microsoft.Data.SqlClient; using System.Data.SqlClient; My model public class Get_Data_Scholar{ [Key] public Int32 ID_Transcript { get; set; } public string Year_Semester { get; set; } public string Period { get; set; } public string Status { get; set; } } My controller public [...] read more
c#
sql-server
azure
asp.net-core-2.2
1vote
0answers

How to play video file from Memory Stream using DirectShowLib in C#

I am working on a project in which the video file has non standard header, it is using H264 algorithm and the file is in .avi format. The problem is that file doesn't contain .avi standard header, the header is custom and i want to do the following 1. Load [...] read more
arrays
byte
memorystream
1vote
2answers

Can I call a stateless service with RPC from outside of a cluster but in the same local network?

On my local machine in Visual Studio 2017, I created solution based on the .NET Core Stateless Service template, and added Microsoft.ServiceFabric.Services.Remoting.Runtime package to accept remote calls through RPC. protected override IEnumerable<ServiceInstanceListener> CreateServiceInstanceListeners() { return this.CreateServiceRemotingInstanceListeners(); } Then I added interface ITestAccUp in a separate project: public interface ITestAccUp : [...] read more
azure-service-fabric
azure-cloud-services
1vote
2answers

Get running instances of Excel with VB.NET

I have the following working code taken from this answer: Option Compare Binary Option Explicit On Option Infer On Option Strict Off Imports Microsoft.Office.Interop Imports System.Collections.Generic Imports System.Runtime.InteropServices Friend Module Module1 Private Declare Function GetDesktopWindow Lib "user32" () As IntPtr Private Declare Function EnumChildWindows Lib "user32.dll" (ByVal WindowHandle As IntPtr, [...] read more
excel
vb.net
exception
com
excel-interop
1vote
2answers

How can I control GuiScrollbar in SAP using SAPFEWSELib?

I used to use VBA to automate SAP, now I use C# with SAPFEWSELib to control SAP. I can control Buttons or TextFields but I am doing something wrong with Scrollbars and don't know what the problem is. My goal is to scroll bar but not in Table or GridView, [...] read more
c#
sap
1vote
1answer

How to typecast 'System.__ComObject' to recordset or dataset?

I have written c# code to call ms access function. Below is the function call “CallModule” written in c# . There is a function called “fReturnRecordset” in ms access. This function returns Recordset. From c# we are able to call function successfully. But we are not able to typecast oRrecordSet [...] read more
c#
ms-access
office-interop
oledbcommand
oledbdataadapter
1vote
1answer

Using wine process within docker without attaching to a shell

I am trying to run a windows command-line program called msconvert inside a docker container. The authors provide a docker image and it works just fine using ´docker run´ or when connecting to the docker machine and running it from the inside. So this works when connected to a bash [...] read more
docker
docker-compose
dockerfile
wine
1vote
1answer

Multiple asynchronous Cosmos DB queries resulting in "InvalidCastExceptions"

I have an Azure function app with multiple functions running within it. If multiple queries end up running at the same time, I get an InvalidCastException from deep inside of the DocumentQuery code. If I disable all but a single function (doesn't matter which), the error does not occur, leading [...] read more
c#
azure
azure-functions
azure-cosmosdb
1vote
1answer

SSIS script task to collect lineage IDs

I have an SSIS script task that collects extended error information. The contents of the script are as follows: /// <summary> /// ScriptMain is the entry point class of the script. Do not change the name, attributes, /// or parent of this class. /// </summary> [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute] public partial class ScriptMain [...] read more
c#
sql-server
ssis
etl
script-task
1vote
0answers

Visual Basic shell32.shell

For more than likely a very obvious reason when I try build or run my program it breaks on this function below: Public Function GetLnkTarget(lnkPath As String) As String Dim shl = New Shell32.Shell() lnkPath = System.IO.Path.GetFullPath(lnkPath) Dim dir = shl.[NameSpace](System.IO.Path.GetDirectoryName(lnkPath)) Dim itm = dir.Items().Item(System.IO.Path.GetFileName(lnkPath)) Dim lnk = DirectCast(itm.GetLink, Shell32.ShellLinkObject) [...] read more
vb.net
shell32
1vote
1answer

Table in Word doc, ConvertToText VB NET

Been searching for an answer to this but everybody seems to want to do the opposite! Using VB.NET code I want to convert all the tables in an open word doc to text but when I run the following code, I get the error > "'Microsoft.Office.Interop.Word.Table'. This operation failed because [...] read more
vb.net
ms-word
0votes
2answers

SQL Server Management Studio connection fails to COM errors

I have an instance of SQL Server 2008 running on a Windows 2008 server. I am able to connect to this SQL server from several machines on my network. However, I cannot connect using SQL Management Studio on the SQL Server itself. When I hit "Connect" I get this error: [...] read more
sql-server
sql-server-2008
ssms
0votes
0answers

0x80004002 Error Editing Folder Tags in Windows 10

I have updated my registry so that I can edit folder comments in the Details pane. Specifically, to Computer\HKEY_CLASSES_ROOT\Directory\PreviewDetails I added prop:System.Comment; Now I can see folder comments in the Details pane. Each folder has a desktop.ini with the bare minimum to at least see Comments if added to columns [...] read more
windows-10
tags
user-folders
0votes
1answer

Wrong type in ListDetailsView DetailsTemplate

I'm working on a UWP app using the Windows Community Toolkit. In some pages, I use the ListDetailsView (FKA MasterDetailsView) like this : <!-- page and stuff... --> <controls:ListDetailsView x:Name="ListViewParameters" ItemsSource="{x:Bind ViewModel.ParametersList, Mode=OneWay}" SelectedItem="{x:Bind ViewModel.Selected, Mode=TwoWay}" CompactModeThresholdWidth="720" BorderBrush="Transparent" NoSelectionContent="Please select a parameter to view" ListPaneBackground="{ThemeResource SystemControlPageBackgroundChromeLowBrush}" ListPaneWidth="350" SelectionChanged="ListViewParameters_SelectionChanged"> <controls:ListDetailsView.ItemTemplate> <DataTemplate [...] read more
c#
xaml
uwp
windows-community-toolkit
0votes
1answer

C# outlook : Unable to cast COM object of type 'System._ComObject' to Interface type 'Microsoft.Office.Interop.Outlook.MailItem.'

I'm new to c#. I have been trying on my own to fix this issue since 1 week until i've got no other alternative than to ask for help here. My goal is to create a console app which would look for Unread Mails on the secondary mailbox[mailboxB@gmail.com]/second outlook account [...] read more
c#
outlook
0votes
0answers

wine fixme wait_for_withdrawn_state window

I am running a Windows execuable (.exe) using wine, in a docker container and I am dumping the graphical interface using xvfb-run. The setup is working but with some fixmes and some errors which I am trying to understand what do they mean. The most common and fixme is: 002c:fixme:event:wait_for_withdrawn_state [...] read more
docker
wine
xvfb
0votes
1answer

How do I open .jpg file in external application

So what I'm trying to do is open some images in Photoshop on the press of a button. I can get PS to launch without an issue but it just sits there waiting and does not open the file I am requesting (regardless of format (.png .jpg. bmp etc)). I [...] read more
vb.net
photoshop
launching-application
0votes
0answers

Creating self-signed certificate programmatically using "CERTENROLLLib" in Windows Server 2012 R2

I am creating a self-signed certificate for converting IIS web-ste from http to https. Essentially, I am using the code suggested here. It works perfectly fine with Windows server 2019. However, when the same code is deployed in Windows Server 2012 R2, i am getting the error around the code [...] read more
c#
com-interop
windows-server-2012-r2
asp.net-core-5.0
self-signed-certificate
0votes
1answer

how to use SymGetSourceFile api for fetching source file in postmortem debugging

I want to use SymGetSourceFile to get a source file from source server using info from a dump file. But the first param is a handle to process but during postmortem we dont have a process, so is it meant to be used only for live debugging tools? How can [...] read more
windows
debugging
windbg
dump
source-server
0votes
3answers

System.InvalidCastException: Unable to cast object of type 'System.String' to type 'System.Int32'

The error is System.InvalidCastException occurred HResult=0x80004002 Message=Unable to cast object of type 'System.String' to type 'System.Int32'. Source=<Cannot evaluate the exception source> StackTrace: at Microsoft.EntityFrameworkCore.ChangeTracking.Internal.SimpleNullableDependentKeyValueFactory 1. TryCreateFromBuffer(ValueBuffer valueBuffer, TKey& key) at Microsoft.EntityFrameworkCore.Query.Internal.WeakReferenceIdentityMap`1.CreateIncludeKeyComparer(INavigation navigation, ValueBuffer valueBuffer) I'm not sure how to troubleshoot/solve this error. Checking-on all Exception Settings doesn't break on the [...] read more
entity-framework
0votes
0answers

I need to connect my ASP.net MVC project via ConnectionString to my Google Cloud SQL/PgAdmin 4

I am new here and this is my first question. I have some issues with connecting databases in general, I've only ever succeeded with local databases in Visual Studio. Background Software used for this project: * Visual Studio Enterprise 2019 * PostgreSQL 12(?) * PgAdmin4 * Google Cloud SQL (PostgreSQL [...] read more
c#
asp.net-mvc
postgresql
visual-studio
pgadmin-4
0votes
0answers

Add Control to ChartSheet in codebehind using c# and Excel Interop

I'm trying to add a ComboBox control to a ChartSheet. I can add one to a normal worksheet, but whenever I run the following code and use a ChartSheet I get the error under it. // Create the original worksheet Worksheet sampleGraphSheet = workbook.Worksheets.Add(After: workbook.Sheets[workbook.Sheets.Count]); // Create the graph ChartObjects [...] read more
c#
vsto
excel-interop
0votes
1answer

Naudio Read throws InvalidCast Exception when reading mp4 but not always. Why?

I am making a windows forms that previews waveforms. I use AudioFileReader.Read in the following: A...When I first load the file and read through to save peak files for zoom preview B...When I calculate FFT for the whole audio C...When I draw the waveform The wav/mp3 works fine, but when [...] read more
c#
naudio
0votes
1answer

Outlook VSTO Custom task pane on Reading Pane & Compose window?

I'm trying to follow and combine 2 example projects from Microsoft: https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-synchronizing-a-custom-task-pane-with-a-ribbon-button?view=vs-2019 and https://docs.microsoft.com/en-us/visualstudio/vsto/walkthrough-displaying-custom-task-panes-with-e-mail-messages-in-outlook?view=vs-2019 I want to have a custom tab on the main outlook window (Reading Pane) (explorer?) which works. And I want to have a taskpane with buttons that modify the current reply / forward email message. I [...] read more
c#
vsto
office-addins
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
1answer

Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.PeachwServer.Application' - Sage SDK 2018 CreateCustomerDemo c#

I'm very new to Sage 50 SDK and when I try to run the sample c# code sample, I get the following error message. 'Save failed: Unable to cast COM object of type 'System.__ComObject' to interface type 'Interop.PeachwServer.Application'. This operation failed because the QueryInterface call on the COM component for [...] read more
c#
api
sdk
sage-erp
sage50
0votes
2answers

Cast is invalid on object

I have this problem, when I try to cast the "batch" object, I am raised exception "Invalid cast". Can you help me out with why? The vault5 object exists and is correct. public void batch(IEdmVault5 vault5) { edmVault11 = (IEdmVault11)vault5; IEdmBatchRefVars batch = default(IEdmBatchRefVars); batch = (IEdmBatchRefVars)edmVault11.CreateUtility(EdmUtility.EdmUtil_BatchRefVars); //some code } [...] read more
c#
solidworksapi
solidworkspdmapi
0votes
0answers

Error instantiating new Microsoft.Office.Interop.Word.Application object (0x80004002)

I am working on a simple C# asp.net Web API that is going to be used to generate Word documents. I am making use of the Microsoft.Office.Interop.Word Nuget package (v 15.0.4797.1003) in this API. I have a very basic method, shown below, which is simply attempting to open an existing [...] read more
c#
asp.net-web-api
office-interop
0votes
0answers

No such interface supported (0x80004002) in .NET Core

I'm trying to port DirectShowLib for .NET Standard. I have no problem while casting Xml2Dex to IXml2Dex interface in .NET Framework 4.6.2. However, I've got InvalidCastException in .NET Core 3.1. COM IMPORT [ComImport, SuppressUnmanagedCodeSecurity, InterfaceType(ComInterfaceType.InterfaceIsDual), Guid("18C628ED-962A-11D2-8D08-00A0C9441E20")] public interface IXml2Dex { // Interface implementation.. } [ComImport, Guid("18C628EE-962A-11D2-8D08-00A0C9441E20")] public class Xml2Dex { [...] read more
c#
.net-core
directshow.net
0votes
1answer

How to get DbSet dynamically in EF Core 3?

Hello I'm trying to do this: I have more classes where user can store the files - path to those files is stored in JSON format in DB and files are stored in folders named as the class (so when class name is Foo then files will be stored in [...] read more
c#
entity-framework-core-3.0
0votes
0answers

How to solve 0x80004002 error on InDesign 2020 COM with C#?

Does anybody knows how to solve the same problem in InDesign 2020 and VS 2019? Extracting InDesign CS4 Graphics using C# and COM I don't have any file tlb or the Scripting Support folder... There is my code: public void IndesignFile(){ try { Type inDesignAppType = Type.GetTypeFromProgID("InDesign.Application.2020"); InDesign.Application myInDesign (InDesign.Application)Activator.CreateInstance(inDesignAppType); [...] read more
c#
com
interop
adobe-indesign
0votes
1answer

Problem / Error with converting M4A Audio File to MP3 using NAudio in C#

I'm in a process of creating a demo for an audio conversion software that I create as a hobby. I wanted converting an M4A (MPEG-4) audio file to an MP3 using a simple GUI for the user to interact. I also implemented a feature that allows the user to play [...] read more
c#
audio
naudio
0votes
0answers

Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'

trying to attach to an IE browser.. it works for awhile then starts throwing this error... --------------------------- --------------------------- Unable to cast COM object of type 'System.__ComObject' to interface type 'mshtml.HTMLDocument'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3050F55F-98B5-11CF-BB82-00AA00BDCE0B}' failed due to [...] read more
c#
internet-explorer
microsoft.mshtml
shdocvw.internetexplorer
0votes
0answers

Making an automated pipeline with Windows .exe and scripts with various languages WITHOUT Wine

I have been working on a workflow to process data in order to be used by machine learning models to make predictions. For that I have a few steps in which the first run a windows .exe (https://github.com/mzdb/pwiz-mzdb) and then the others steps are : to modify the previous output [...] read more
windows
docker
pipeline
wine
0votes
1answer

Error thrown when opening e-mails using outlook api

Question: I get the following error message when opening what appear to be valid .MSG files using Outlook API to open emails: > Unable to cast COM object of type 'System.__ComObject' to interface type > 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the > QueryInterface call on the COM component for the [...] read more
c#
outlook
office-interop
outlook-2007
0votes
1answer

Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to interface type

seeking for help regarding on crystal report. I'm working on a project using asp.net webforms with crystal report... actually the project is working on my local testing but when I deployed it on our test server, results error shows like this "Unable to cast COM object of type 'CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass' to [...] read more
asp.net
webforms
report
crystal-reports-2008
crystal-reports-2010
0votes
1answer

Invalid cast exception Xunit deserialization error

When trying to run a test case that uses the xunit framework through Visual Studio I am currently getting the following error. System.InvalidCastException HResult=0x80004002 Message=Specified cast is not valid. Source=xunit.execution.desktop StackTrace: at Xunit.Serialization.XunitSerializationInfo.GetValue[T](String key) in C:\Dev\xunit\xunit\src\common\XunitSerializationInfo.cs:line 40 at Xunit.Sdk.XunitTestCase.Deserialize(IXunitSerializationInfo data) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\XunitTestCase.cs:line 177 ... I am the only person in [...] read more
c#
deserialization
xunit
xunit.net
xunit2
0votes
0answers

VB.net Unable to cast COM object of type 'System.__ComObject' to interface type 'Shell32.Shell' -Copy And Replace Files-

> System.InvalidCastException: Unable to cast COM object of type > 'System.__ComObject' to interface type 'Shell32.Shell'. This operation failed > because the QueryInterface call on the COM component for the interface with > IID '{34936BA1-67AD-4C41-99B8-8C12DFF1E974}' failed due to the following > error: No such interface supported (Exception from HRESULT: 0x80004002 > [...] read more
vb.net
0votes
1answer

Entity Framework 6 App.config file is not created

I was told that > when adding the EF6 nuget package to a project it creates an appropriate > config file I've added the EF6 NuGet package to a project, but the App.config file is nowhere to be found. What am I doing wrong, and is the error below a [...] read more
c#
entity-framework
entity-framework-6
0votes
1answer

multithreading in VSTO

I have a task to provide a button to stop running process and for that sake I am trying to use multithreading but it gave me exception on a certain point I don't understand how to deal with it please provide some solution. Here its code private void btngenerateNew_Click(object sender, [...] read more
c#
multithreading
vsto
0votes
1answer

VS2015: Unable to cast COM object of type 'System.__ComObject' to interface type 'IFabricTestManagementClient4'

I am using VS2015 for this particular project but also using VS2017 for other projects. Installed: Microsoft Azure Service Fabric SDK - 4.0.466.9590 VS Project Target framework: .NET Framework 4.6.2 VS reference System.Fabric: Runtime Version v4.0.30319 - Version 6.0.0.0 When I try to debug the application in VS2015, it turns [...] read more
visual-studio
azure-service-fabric
0votes
2answers

Getting CLR object property raises Unable to cast COM object of type 'System.__ComObject'

I'm trying to get the value of a property via reflection, but end up getting the following exception: > System.Reflection.TargetInvocationException: 'Exception has been thrown by the > target of an invocation.' > > Inner Exception: InvalidCastException: Unable to cast COM object of type > 'System.__ComObject' to interface type > 'Microsoft.Kinect.Interop.INuiColorCameraSettings'. [...] read more
c#
com
kinect
0votes
1answer

VSTO: Store __ComObject (Microsoft.Office.Interop.Word.Table) in Database

I would like to store a Microsoft.Office.Interop.Word.Table object in a T-SQL Database. And get the object again from the database to paste in a word document. Its mandatory that all the information, like tag, index, format keep consistent. On the database side I created a [Object] (varbinary(max)) byte[] field. Directly [...] read more
sql
ms-word
vsto
comobject
iconvertible
0votes
1answer

Can't connect to Connected Services Authentication with Azure Active Directory

I'm trying to connect to the Connected Service "Authentication with Azure Active Directory" but Visual Studio throws an error when I click it. Connected Services The Connected Services component 'Azure AD Authentication' failed: (HRESULT:0x80004002) Specified cast is not valid. The error seems to be application specific as I can access [...] read more
c#
.net
visual-studio
azure
razor-pages
0votes
3answers

System.InvalidCastExecption error message when a programm with Interop.photoshop.dll after updating Windows10

After updating to Windows 10, C# program on VisualStudio 2017, which processes images and uses Interop.Photoshop.dll and Interop.PhotoshopTypeLibrary.dll, got following issue : "System.InvalidCastException: Unable to cast COM object of type 'Photoshop.ApplicationClass' to interface type 'Photoshop._Application'. This operation failed because the QueryInterface call on the COM component for the interface with [...] read more
c#
windows-10
photoshop
0votes
0answers

How to use 32-bit COM library in C# from non STA thread and/or 64-bit process

I’m trying to consume a legacy COM components (dll library created probably in C++, 32 bit) in my C# application. I need to get it work in the following scenarios: 1. COM component used in x86 STA thread (e.g. main app thread) 2. COM component used in x86 worker thread [...] read more
c#
dll
com
interop
regsvr32
0votes
1answer

How to fix '80070005 Access is denied' when accessing remote com+ object?

When I try to call method of COM+ object from remote PC I get error: System.InvalidCastException HResult=0x80004002 Message=Unable to cast COM object of type 'System.__ComObject' to interface type 'System.EnterpriseServices.IRemoteDispatch'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{6619A740-8154-43BE-A186-0319578E02DB}' failed due to the [...] read more
c#
com
com+
dcom
0votes
1answer

System.InvalidCastException on Select when using custom ValueConverter

PROBLEM I'm trying to introduce a strongly typed ID in one of my entities. To do so, I followed the instructions on https://andrewlock.net/using-strongly-typed-entity-ids-to-avoid-primitive-obsession-part-3/ The only difference to the instructions above is, that I'm trying to persist my ID as a string instead of a Guid. A short summary of the [...] read more
c#
entity-framework-core
0votes
3answers

Call Azure Service Fabric from outside

I'm playing with Azure Service Fabric and a console app. I simply want my console app to connect to the cluster and do some stuff. The console app try to resolve the service address with the following: static void Main(string[] args) { ServicePartitionResolver resolver = null; try { resolver = [...] read more
c#
dns
azure-service-fabric
0votes
1answer

Moved Development to new machine, now it won't compile

My laptop died so I restored my code to my desktop. I use Xamarin for VS 2017. When I compile I get a "java exited with code 1" error, the logs contain the following: Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished Xamarin|Information|0|Xamarin - 4.12.3.83-d15-9+23fa80172 Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter Xamarin.VisualStudio.TastyPackage|Information|0|Initialization [...] read more
xamarin
visual-studio-2017
0votes
1answer

How to implement the authorization through token and roles, in WEB API C #, SOAP architecture, through the use of repositories with stored procedures?

How can I implement the authorization through token and roles, in WEB API C #, SOAP architecture, through the use of repositories with stored procedures and dependency injection? public override void OnAuthorization(HttpActionContext actionContext) { if (actionContext.Request.Headers.Authorization == null) { actionContext.Response = actionContext.Request.CreateResponse(HttpStatusCode.Unauthorized); } else { string autenticationToken = actionContext.Request.Headers.Authorization.Parameter; string [...] read more
c#
asp.net-web-api
0votes
1answer

Getting HTML Table Rows in VB.NET

I am experimenting with ASP.NET WebForms and data. I am able to post data to the page using a small code snipped in the ASPX, but I cannot get the buttons for deleting, editing, and viewing individual records to work. I believe this is because I cannot add runat="server"when I [...] read more
asp.net
vb.net
visual-studio
webforms
0votes
0answers

Visual Studio 2017 (v15.9.14) says "Deploy failed" when attempting to debug sample Xamarin.Forms app

I'm trying to deploy the example app in this tutorial: https://docs.microsoft.com/en-us/xamarin/get-started/first-app/?pivots=win-vs2017 However, I'm unable to get the debugger to work for it. I followed all the steps precisely but nothing seems to work. Here's the log output: > Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter > Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished > Xamarin|Information|0|Xamarin - 4.12.3.83-d15-9+23fa80172 [...] read more
c#
android
visual-studio
xamarin
xamarin.forms
0votes
2answers

Trying to implement a task scheduler COM handler

The prototype of ITaskHandler::Start is the following: HRESULT ( STDMETHODCALLTYPE Start )( __RPC__in ITaskHandler * This, /* [in] */ __RPC__in_opt IUnknown *pHandlerServices, /* [in] */ __RPC__in BSTR data) How come pHandlerServices is optional - and if I get a NULL (as it's my case) - how can I notify the [...] read more
c
winapi
com
taskscheduler
0votes
0answers

What is the best way to run Windows exe file on web

I am working on the existing project. Here is a exe file, when user open it, it get the config from the same directory will auto downloading the latest files(assets) from server to the current directory. I don't know how the exe run, maybe it just run git pull or [...] read more
php
windows
ubuntu
0votes
1answer

Gremlin query on Cosmos DB: Unable to cast object of type StringField to Compose1Field

We have the issue with Gremlin query on Azure Cosmos DB The query works in Gremlin Console on TinkerPop but Cosmos DB is complaining about it. It seems to be an issue with the last group().by(...) step Not sure if this is a bug or there is some workaround specific [...] read more
azure-cosmosdb
azure-cosmosdb-gremlinapi
0votes
1answer

Efficient way to pass Bitmap into registered COM component

I have registered COM Class and interface written in .NET 2.0 . Now i am looking for a way to pass Bitmap object from WindowsForms .Net 4.5 application into COM component. When i try to do this code: Type type = Type.GetTypeFromCLSID(clsid); source = (IBaseFilter) Activator.CreateInstance(type); public void SetBitmap(Bitmap input) [...] read more
c#
.net
com
regasm
0votes
1answer

IConnectionPoint::Advise does not work any more in Windows 10 "1903" from the non-main thread

We have an application that either runs some COM hosting in the main thread or in a different thread (async), and we would like to connect to this (connectable) object by using the standard ConnectionPoint interfaces in order to get its events. Up to Windows 10 SP 1903, it did [...] read more
multithreading
com
iconnectionpoint
0votes
0answers

Getting Unable to cast COM object of type 'System.__ComObject' to interface type while trying to click on a button

I want to call click event of a button from a web page by using my client c# code. I can see the element as after doing F12 on the page as: <button class="btn btn-primary form-control btn-block" type="button" ng-click="tranCtrl.retrieveTransactionsList('Go')" ng-disabled="tranCtrl.isLoading"> Go </button> My code works for all the input type [...] read more
c#
angularjs
com-interop
0votes
1answer

C# and excel automation, how to use the CopyFromRecordset function

I am trying to populate an excel file with some data from a SQL server, my code is as follows, public static void SQLToExcel(Excel.Workbook xlWorkBook, string SQL, string tFORMAT) { string connectionString = ConfigurationManager.ConnectionStrings["ANSICConnection"].ConnectionString; SqlConnection conn; conn = new SqlConnection(connectionString); conn.Open(); using (SqlCommand cmd = new SqlCommand(SQL, conn)) { SqlDataReader [...] read more
c#
.net
excel-automation
0votes
2answers

Windbg - <HRESULT 0x80004002>, invalid cast, alias as vs. aS

Good day, I have a Windbg script that iterates around the frames of a stack using a .do loop. For each frame it uses !for_each_local and $spat ("@#Local","foo") to match for things I'm interested in getting an initial look at. I then use dx @$t2 = to assign and finally [...] read more
casting
alias
windbg
0votes
0answers

Delete Mutiple ListView SelectedItems in code behind with Entity Framework Core

I have a ListView that displays TitleName from Title table\entity. Upon ListView_OnSelectionChanged, I can Linq query and display a TitlesDetails Panel, and make visible another panel for edit and delete. But I can only delete one item. I've google and tried all I could till frustrated and backed off for [...] read more
c#
listview
uwp
entity-framework-core
0votes
0answers

Unable to cast COM object to Interface type

I have a DLL which is consumed by a 3rd party Application. I am trying to run a long running Task as Async which is failing due to error:- > "Unable to cast COM object of type 'System.__ComObject' to interface type > 'IMSRelation.IJAssocRelation'. This operation failed because the > QueryInterface [...] read more
c#
asynchronous
com
-1votes
0answers

Installing Microsoft Office using Wine doesn't work

If I try to install Microsoft Office 365 using Wine 6.9 and Ubuntu 20.10. I downloaded the OfficeSetup.exe on a Windows computer, copied it to my Linux computer and run wine OfficeSetup.exe. After that, a window appeared where it said: > Office > > We are finished in a few [...] read more
linux
ubuntu
ms-office
wine
-1votes
1answer

Why can't I cast List<object> to List<string> in C#?

Code: object obj = new List<object>() { "a", "b" }; List<string> list = (List<string>)obj; Exception: System.InvalidCastException HResult=0x80004002 Message=Unable to cast object of type 'System.Collections.Generic.List`1[System.Object]' to type 'System.Collections.Generic.List`1[System.String]'. Source=ConsoleApp2 StackTrace: at ConsoleApp2.Program.Main(String[] args) in C:\Users\guoswang\source\repos\ConsoleApp2\ConsoleApp2\Program.cs:line 12 I know how to avoid this, but want to understand the root cause. Cast exception read more
c#
-1votes
2answers

Read value from nested Json object

I am trying to read a value from a nested Json object, but I am getting a Parse error: My Json object: { "MessageId": "f6774927-37cf-4608-b985-14a7d86a38f9", "Time": "2017-04-06T16:28:38.0719933+02:00", "Data": { "ID": { "value": "0008044834" }, "Carrier": { "value": 0 }, "Tool": { "value": 0 } } } var myJsonString = File.ReadAllText(_currentDictory.FullName [...] read more
c#
json
parsing
-1votes
1answer

How to iterate through Excel worksheets in C#?

I have a workbook with multiple sheets and I was trying to iterate through them but it's causing me problems. The code below throws the error: > Microsoft.Office.Tools.Excel.Worksheet'. This operation failed because the > QueryInterface call on the COM component for the interface with IID > '{297DC8D9-EABD-45A1-BDEF-68AB67E5C3C3}' failed due to [...] read more
c#
excel
vsto
-1votes
1answer

Could not read key from registry (Exception from HRESULT: 0x80040150 (REGDB_E_READREGDB)) at Interop.QBFC13.IQBSessionManager

During a deployment of an update to our Web Service that QuickBooks Web Connector calls, we are not having a bunch of issues related to the Interop.QBFC13.IQBSessionManager. Note our code all works in development environment and has worked in the past on our production server. We are running on a [...] read more
c#
quickbooks
qbfc
-1votes
2answers

Unable to cast COM object of type 'System.__ComObject'

enter image description here [https://i.stack.imgur.com/Lalss.jpg] enter image description here [https://i.stack.imgur.com/Njsop.jpg]When I am a casting below code then i got an error Code : string subject = ((Microsoft.Office.Interop.Outlook.MailItem)myInbox.Items[temp]) .Subject.ToString(); > Unable to cast COM object of type 'System.__ComObject' to interface type > 'Microsoft.Office.Interop.Outlook.MailItem'. This operation failed because the > QueryInterface call [...] read more
c#
outlook
-3votes
1answer

SAP: Unable to cast COM object of type 'System.__ComObject' to interface type 'sapfewse.GuiTextField'

I am trying to interface with a SAP gui window using c#. Using this solution here: solution, I have successfully connected to my open GUI window. I can send the command frame.Maximize(); which will maximize the window, as expected. Trouble comes when I attempt to put some text into a [...] read more
c#
-10votes
1answer

vb.net late bindings issue even after setting the variable

Hey all I have the following code thats throwing Late bindings. enter image description here [https://i.stack.imgur.com/oNhTR.png] I thought putting: Dim excelWS As Worksheet excelWS = New Worksheet Before using the variable corrected the late binding issue? UPDATE 1 Would it be something like this? Dim excelRange As Range Dim excelApp [...] read more
excel
vb.net
binding
office-interop
late-binding

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