I have a 3rd party COM object(32 bit) that I need to call from my c# application (64 bit). I know I have to run the COM object in a separate process. This COM object has many classes implemented in it, so I'm trying to avoid writing my own remoting [...] read more
Similar to this question Visual Studio 2013 High DPI on 4k Screen to which I had posted an answer but have now removed since uncovering the issue below. I too have just bought a new 4K laptop and have been having problems with high DPI with the display of the [...] read more
I have an existing COM Exe Server, and VBA or .NET code calling it. We'd like to make it work w/o needing to install or modify the registry so that other users that are not admins on their machines can use it. Let's assume changing/modifying the COM Exe Server is [...] read more
I'm having an issue with a very simple piece of C# .NET code which should (for now) simply retrieve the version number of Office installed on the computer running a WinForms application: var oApp = new Outlook.ApplicationClass(); var outlookVersionString = oApp.Version; It instantiates the object correct, however when I try [...] read more
I'm trying to marshal an interface to another thread. Windows provides the convenient CoMarshalInterThreadInterfaceInStream helper function to take care of the boilerplate code associated with using CoMarshalInterface directly. const Guid CLSID_Widget = "{F8383852-FCD3-11d1-A6B9-006097DF5BD4}"; const Guid IID_IWidget = "{EBBC7C04-315E-11D2-B62F-006097DF5BD4}"; //Create our widget HRESULT hr = CoCreateInstance(CLSID_Widget, null, CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER, IID_IWidget, [...] read more
I have Visual Studio 2015 and my application is for .NET Framework 4.0. I installed Microsoft Office Home&Buissness 2016 and trying tocreate an instance using this code: Microsoft.Office.Interop.Excel.Application excelAppTemplate = new Microsoft.Office.Interop.Excel.Application(); but I get this error: > Unable to cast COM object of type 'System.__ComObject' to interface type > [...] read more
I would like to create an app that will deploy a website. Basically, I just want this app to copy the publish files to the webserver in a new folder, change the website to that folder, then recycle the app pool. I found out that I should be able to [...] read more
I'm posting this mostly for anyone else that hits this weird issue, and if anyone can shed a light on why IIS/Cassini is being a devil. For the most part, we can successfully cast a Dispatch object defined in ODL as [ uuid(GUID_FOO) ] dispinterface IFooDisp { ... properties & [...] read more
I'm making a synchronous cross-process COM call that executes successfully, but when I check the HRESULT returned it's the aforementioned 0x80040155, or "Interface not Registered" and the out parameter doesn't contain any data. Is there a way to re-register COM executibles? I'm not even sure that this would fix it, [...] read more
We recently switched our automated unit tests from MSTest to VStest. After the switch several of the unit tests started failing giving the following error message, > Test method > Domain.Model.IntegrationTests.Documents.DocumentFilesRepositoryTest.Delete_file_Page_not_shared_can_delete > threw exception: > > System.InvalidCastException: Unable to cast COM object of type > 'System.__ComObject' to interface type > [...] read more
I get this message after I click "Finish" on new Form Region wizard > An error occurred while processing file [file path].ofs > > Error: Unable to cast COM object of type System._ComObject to interface type > Microsoft.Vbe.Forms.UserForm. This operation failed because the QueryInterface > call on the COM component [...] read more
I have developed Win32 app based heavily on the MF_ProtectedPlayback sample here. I'm using 4 cplayer objects at a time. It works for what I need it to do. However, I am trying to group the sessions, so that they are controlled by one volume control in control panel, as [...] read more
I have a XAML C++/WinRT application based on the BlankApp template. As I built up the app, I realized that my application is throwing a lot of exceptions behind the scenes in my output window. The exception I'm trying to understand is the following: Exception thrown at 0x00007FFA9EFA9149 (KernelBase.dll) in [...] read more
Attempting to start up Docker Toolbox 1.12.0 on Windows 10 and getting the following error Running pre-create checks... Creating machine... (default) Copying C:\Users\abc\.docker\machine\cache\boot2docker.iso to C:\Users\abc\.docker\machine\machines\default\boot2docker.iso... (default) Creating VirtualBox VM... (default) Creating SSH key... Error creating machine: Error in driver during machine creation: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe createvm --basefolder C:\Users\abc\.docker\machine\machines\default --name default --register [...] read more
I tried creating a new SSIS package and when I tried Doping a Data Flow Source (say OLEDB Source). I get the error The Component cannot be added to the Data Flow task. With the following Additional information ADDITIONAL INFORMATION: Interface not registered (Exception from HRESULT: 0x80040155) (Microsoft.SqlServer.DTSPipelineWrap) read more
This is the code which i was using before the Office 2016 installation. var excelApp = new Excel.Application(); excelApp.Visible = true; Excel.Workbook excelWorkbook = excelApp.Workbooks.Open(finfo.FullName, 0, true, 5, "", "", true, Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, false, false); Excel.Sheets excelSheets = excelWorkbook.Worksheets; Excel.Worksheet excelWorksheet = (Excel.Worksheet)excelSheets.get_Item(currentSheet); var cellValue =(excelWorksheet.Cells[a, [...] read more
I am tring to send a email from my C#(winform) app to an adress outlook but I am getteing an error on the line below : Outlook.MailItem mail =(Outlook.MailItem)_app.CreateItem(Outlook.OlItemType.olMailItem); I got the following error : > Unable to cast COM object of type > ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type > ‘Microsoft.Office.Interop.Outlook._Application’. [...] read more
I'm using CameraPreviewImageSource.PreviewFrameAvailable event to determine flashes by calculating average luminosity of each frame. For my purposes I don't need big frames, but with default settings StartPreviewAsync() method generates frames with size 1280*720px. I tried to use StartPreviewAsync(videoEncodingProperties) but every time I get an exception HRESULT:0x80040155 Interface not registered. I [...] read more
I've been using Nuget up until today and suddenly been hit with the following error: Interface not registered (Exception from HRESULT: 0x80040155) No more details are provided. It happens if I open the "Manage Nuget Packages" window or I open the Nuget console. It happens on VS2010, 2012 and 2013. [...] read more
This article says: > The ID3D11DeviceContext methods (except for those that exist on > ID3D11DeviceChild) are not free-threaded, that is, they require single > threading. Only one thread may safely be calling any of its methods (Draw, > Copy, Map, etc.) at a time. I was wondering if I can [...] read more
Where I work we have a proprietary C++ wrapper around IE which we pull into a JScript script as a COM object. There are a few events of this object that we wire to some JScript callbacks. The webpage "DocumentLoad" event in particular has 4 callback functions wired to it. [...] read more
We run various jobs using a Windows 2003 server. Some of these jobs send app pool commands to web servers running IIS 6 (recycle, start, stop). Now we have a Windows 2008 web server running IIS 7, and we want to send the same commands. This is all done using [...] read more
Some of our clients downgraded from Office 2013 to Office 2010. After doing that if you call the Application property ComAddins you get the following exception: System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Excepción de HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) at Microsoft.Office.Interop.Word.ApplicationClass.get_COMAddIns() at our own code We have tried to reinstall Office doing different [...] read more
I have Office 365 installed on my machine. Particularly MS Word version is 2012. I have created C# project (VS 2019) and referenced microsoft word 16.0 object. It appeared as C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Office.Interop.Word\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Word.dll. at that following code Application application = new Application(); var document = application.Documents.Open(args[0]) throws System.InvalidCastException: 'Unable to cast COM [...] read more
In attempting to print from a UWP app (in C++/winrt) using CanvasVirtualControl as a source the print UI appears fine but with a blank preview. The printrequest seems to work and the events for Paginate, etc. are called. For this test I have stored the CanvasVirtualControl in which the drawing [...] read more
On all four of my Windows 7 x64 Pro computers with Visio Pro 2010 installed, I have had the following problem for the past several months: When I edit a Visio document that uses the UML stencil, as soon as I try to edit any object information, for example, define [...] read more
I am attempting to spy elements of a web page in Blue Prism however I am getting the below error message. > System.ApplicationException: Interface not registered (Exception from HRESULT: > 0x80040155) at BluePrism.AMI.clsAMI.Spy(clsElementTypeInfo& elementType, > List`1& identifiers) at > Automate.frmIntegrationAssistant.HandleSpyOrLaunchClick(Object sender, > EventArgs e) please can someone assist? * application [...] read more
I am using VS 2017 to write C# code that uses the DTE API to generate a Visual Studio solution with a set of cpp (vcxproj) projects. I can create the sln and vcxproj files ok, using a vcxproj template (from the VS 2017 samples). But when I try to [...] read more
I am working with MS Dynamics 365 CRM and Unified Service Desk (v2.2.2.815). Our organization uses Skype for Business 2016 (v. 16.0.7726.1049). I have been tasked with integrating SfB and Unified Service Desk. In other words if a Skype incoming call is detected perform X action in USD. My understanding [...] read more
DCOM client is situated under WIN server 2012, DCOM server is located under WIN XP. When I call CoCreateInstanceEx it returns 0x80040155 "Interface not registered". Actions that were already performed: * Register COM classes on the serverside via MyApp.exe /regserver * Checked the registry (on server side) if the appropriate [...] read more
> 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 IID > '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: > Interface not registered (Exception from HRESULT: 0x80040155). The error [...] read more
We have a c#-4.0 Click Once WinForm application with a DataGrid that displays a list of .msg files that have been saved on our file server, and when the user double clicks on a row in the grid, it opens the corresponding .msg file. This app is deployed to over [...] read more
Working from Visual Studio 2013 to create a new program involving excel. Done this before in earliere excel versions, but cannot get it to work now. Trying to create the excel application object throws an error (however an excel process is started when I look in the task manager). We're [...] read more
I am trying to serialise an object using json.Net but I am getting the following exception. Newtonsoft.Json.JsonSerializationException: Error getting value from 'Parent' on 'System.Windows.Forms.Label+LabelAccessibleObject'. ---> System.Runtime.InteropServices.COMException: Interface not registered (Exception from HRESULT: 0x80040155) at Accessibility.IAccessible.get_accParent() at System.Windows.Forms.AccessibleObject.get_Parent() at System.Windows.Forms.Control.ControlAccessibleObject.get_Parent() at GetParent(Object ) at Newtonsoft.Json.Serialization.DynamicValueProvider.GetValue(Object target) Here is the code I [...] read more
I've made out-of-process WR/WP8 component with own background thread. It handles SIP stack internally and runs in background thread. It is modified code from ChatterBox MSDN example. https://code.msdn.microsoft.com/windowsapps/ChatterBox-VoIP-sample-app-b1e63b8b Last days I add delegates to raise events from component. In C++/CX it is: public delegate void OnLogMessage(Platform::String^ msg); public ref class [...] read more
so, our IT department upgraded everybody from Office 2007 to Office 2013, and many of my hard work has to be redone. (VS 2013 Express, framework 4.5) The error I am getting is: "Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.Excel.Range'. This operation failed because the [...] read more
I've spent almost 4 hours trying to figure out a solution for this issue. Basically, I am writing an application in C# using DirectShowNet that shows video from a webcam, allows you to take snapshots, and change resolution of the webcam. I have a device manager that detects when a [...] read more
I am currently developing a C# application that opens, reads and updates an Excel Macro-Enabled Workbook file (xlsm). I was able to read and update cells but I was not able to read/update an ActiveX Control, specifically a Combobox. > using Excel = Microsoft.Office.Interop.Excel; > > using MSForm = Microsoft.Vbe.Interop.Forms; [...] read more
I am trying to use a COM Object from a different thread and I am getting this error. The same error does not happen in Single threaded model. What could be the possible reason? I tried implementing the interfaces with CComMultiThreadModel. Still no luck. read more
PEX 0.94.0.0 RELEASE VISUAL STUDIO 10.0.40219.1 BUG REPORT How to reproduce: 1. Open a class library project 2. Create an empty method 3. Right Click->Run Pex I run without problem on another machine (In Office, VS2010 Utimate) But I got this exception on my home computer(VS2010 Professtional) -------------------------------------------------------------------------------- exception details: [...] read more
How do I set Task or Thread privileges ? I ask because I use Task Scheduler Managed Wrapper and when I call it in another thread (that apparently has lower privileges) I get exception. I saw this SO question, but didn't manage to use it successfully (Thread.CurrentPrincipal.Identity as WindowsIdentity is [...] read more