Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
82 views

I am currently using a COM Interop DLL, generated with tlbimp, to access a proprietary COM library from C# (net8), so no source code available (TLB embedded in DLL). It works, but stops me from using ...
boennhoff's user avatar
2 votes
1 answer
103 views

I am getting the following exception when using another assembly from a ComInterop assembly: System.IO.FileNotFoundException: Could not load file or assembly 'Wpf.Tools.CSharp (...)'. The system ...
Étienne Laneville's user avatar
0 votes
0 answers
26 views

I've created a simple counter class using .NET 8 and C#: SimpleCounter.cs using System.Runtime.InteropServices; namespace Counters { [ComVisible(true)] [Guid("01FB5599-3CD1-462E-98AA-...
Étienne Laneville's user avatar
1 vote
1 answer
119 views

I need to use a Windows API function in my VB.NET application. I need to pass an ASCII string of text to that function. This string is stored as a zero-terminated byte array. What I currently do is I ...
and his dog's user avatar
1 vote
1 answer
55 views

I have an ASP.NET web application to export an Excel file with multiple sheets. Each sheet contains multiple tables on it created using Microsoft.Excel.Interop.Services package. The export ...
Mohan Raj B's user avatar
0 votes
1 answer
67 views

Yes, you read the title correctly - this is an issue that only occurs when UAC is off (for example, with the built-in Administrator account on Windows Server systems). Repro steps: Create a COM-...
Heinzi's user avatar
  • 173k
5 votes
1 answer
179 views

Working on creating a .NET 8 library which will be called from Excel VBA via COM interop. I've had some success setting this up using regsvr32, but having gone down that path on earlier projects, I'm ...
Keith Stein's user avatar
  • 6,937
2 votes
1 answer
95 views

Having a very strange problem here. I'm attempting to make a .NET 8 library which will be called from Excel VBA via COM interop. I've been following these two pieces of guidance: Expose .NET Core ...
Keith Stein's user avatar
  • 6,937
1 vote
1 answer
86 views

I've written a Windows Explorer clone, and while it's been an adventure, most of the stuff is now working fine. But, I have this problem: when I right-click an item and the Windows 11-style Explorer ...
miss programmer's user avatar
3 votes
1 answer
106 views

I'm starting on a project which will involve calling .NET 8 code from Excel VBA. I've been following these two pieces of guidance: Expose .NET Core components to COM How to correctly create COM ...
Keith Stein's user avatar
  • 6,937
1 vote
1 answer
181 views

I defined the following IDispatch-only interface in my C# project: [ComVisible(true)] [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] [Guid("3532C4E8-D320-487C-8BD4-...
Gabboxl's user avatar
  • 151
2 votes
1 answer
249 views

There is a test project that shows the contents of a notepad, in perspective the contents of other window elements: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> &...
Shift's user avatar
  • 23
0 votes
0 answers
54 views

I have an application built with WPF using .Net framework 4.8 and windows APIs which runs as a windows application and opens an excel app (separate excel process) and from the excel app opens up a ...
Ganpat Gutte's user avatar
2 votes
1 answer
153 views

I am automating the creation of Excel workbook with PowerShell scripts. I can create an Excel instance with either add-type -assembly Microsoft.Office.Interop.Excel $xls = new-object Microsoft.Office....
René Nyffenegger's user avatar
0 votes
1 answer
256 views

In C# .NET 8 given a pointer (IntPtr) to a native object implementing a COM-compatible interface and a C# interface definition, how do I convert the pointer to an object implementing such interface ...
Palo's user avatar
  • 1,121
0 votes
0 answers
52 views

I'm creating a Windows Explorer-like application and I've also implemented search folders and everything works fine, except I can not save the search from the right-click IContextMenu. It gives me (...
miss programmer's user avatar
1 vote
1 answer
127 views

I am trying to use a C# DLL in VBA with events using the [ComSourceInterfaces] attribute, but I am encountering issues. Here's what I have so far: C# Code ITaskRunnerEvents.cs using System; using ...
Adrijano Toys Shop's user avatar
1 vote
1 answer
99 views

Problem Description: I'm working on using COM interop to call a C# asynchronous method from VBA. The class (NewAsyncTaskRunner) is recognized and works fine, but the interface (INewCallback) is not ...
Adrijano Toys Shop's user avatar
1 vote
1 answer
104 views

I have a C# .netFramework4.8 COM INTEROP library that takes data and puts it into a .pdf file to be saved somewhere. This involves PDFSharp, as I need to take pages out of existing .pdf files and ...
TheKDude's user avatar
2 votes
0 answers
98 views

In my application, I'm showing an IContextMenu when a user right-clicks an item. Just like Windows Explorer. The problem is that all OneDrive items are added twice, some with slightly different names. ...
miss programmer's user avatar
0 votes
0 answers
55 views

I'm implementing drag and drop and clipboard copy/paste with CFSTR_FILEDESCRIPTOR and CFSTR_FILECONTENTS with IStream. So I implemented my own IStream where basically I map the stream to a .NET ...
miss programmer's user avatar
0 votes
0 answers
103 views

I am currently working on a small C# project to save the names of the desktop icons in a text file. I have used these two articles to help me get started: Desktop Icon manipulation - how to get a ...
Jolanda Berger's user avatar
1 vote
1 answer
113 views

Excel RTD is a COM based technology and all examples I found have the following characteristics: They are based on .NET Framework (not .NET core or modern .NET) They are 32 bits They are in process ...
Franco Tiveron's user avatar
1 vote
0 answers
69 views

I have two projects, Server and ServerCOMInterop. I have defined some classes in the Server project and I have imported them in ServerCOMInterop. Now I want to create a COMInterface for the ...
Lynn's user avatar
  • 199
1 vote
1 answer
208 views

I have a C# console application and Dll. I registered the dll as COM via interop. I used the COM Visible property, GUID etc Set Assembly Information, Build information to register it to COM I ...
Dee's user avatar
  • 11
0 votes
0 answers
523 views

I have a .Net 4.72 DLL, exposed to COM using ComVisible(true) and the rest. I'll put example in a sec. I have been modernizing this DLL to .Net 8. This DLL consumes some registered ocx files via ...
Matt's user avatar
  • 1
1 vote
2 answers
159 views

I have an assembly containing the following classes that should be exposed to COM: using Microsoft.VisualStudio.TestPlatform.ObjectModel; namespace Interop { [ComVisible(true)] [...
MakePeaceGreatAgain's user avatar
0 votes
0 answers
234 views

I tried making a .NET 8+ COM Host whose interface has an IEnumerable that under the hood is an iterator method utilizing yield statements, to be used from a .NET Framework v4.8 project. My interface ...
SpiritBob's user avatar
  • 2,762
2 votes
0 answers
255 views

I have an application in VB6 and need to create an object of a class that is part of another .dll (written in VB.NET). Now I am using the CreateObject() method (I am following the same logic used in ...
Kristina Tamaro's user avatar
4 votes
1 answer
937 views

Following the Source generation for ComWrappers article from Microsoft, I've created a simple .NET 8 Class Library project in Visual Studio 2022 using the GeneratedComInterfaceAttribute attribute, ...
Étienne Laneville's user avatar
0 votes
1 answer
628 views

I am familiar with the process of how to register a COM Interop. Eg: As long as I am running Visual Studio using Administrator elevation this C# COM DLL will compile and register for interop. The TLB ...
Andrew Truckle's user avatar
3 votes
4 answers
6k views

I need to create a COM class in .NET8 that needs to be accessible to Excel. After watching this video, I implemented the following test bed class: namespace COMTestBedCS { [Guid("26a0aa6d-...
Paulo Santos's user avatar
  • 11.7k
0 votes
0 answers
95 views

I want to subscribe to the Workbook.SheetActivate event of my excel Application which I use as a dynamic object so that I am not dependent on the specific version. Instantiation and EventHandler: ...
fikewek832's user avatar
1 vote
0 answers
114 views

I created an app (in visual studio 2015 and .net) that writes to Word 2013 (it creates the word document, fills in paragraphs of text, tables, numbers, etc... through bookmarks) it's been working ...
F L's user avatar
  • 11
0 votes
0 answers
78 views

Aim: Using reflection and generics pass in a VBA array of custom objects and return the same custom VBA COM object back after processing. Eg in the example removing duplicates from a VBA of any type ...
M. Johnstone's user avatar
-1 votes
1 answer
157 views

I don’t wish to contribute to the mysticism of this subject further than it already seems to be on internet. I’ve many articles talking about this subject, some say never Marshal.ReleaseComObject ...
Finch's user avatar
  • 83
0 votes
0 answers
71 views

I am using a software package that offers an "extension" package, largely undocumented, that allows for creation of extensions that allow automation within the program. It's a COM interface ...
GisMofx's user avatar
  • 1,034
0 votes
1 answer
1k views

I am migrating a managed 32-bit COM component from .NET Framework 4.8 to .NET 6. Regsvr32 will register its xxx.comhost.dll on the development machine, but not on a non-development machine: it fails ...
R.J. Dunnill's user avatar
  • 2,099
0 votes
1 answer
107 views

I've spent the last three hours trying to resolve this issue to no avail, so I'm coming here for some assistance. I have previously scaffolded a subset of this database, but prior that was prior to ...
RFBomb's user avatar
  • 111
0 votes
1 answer
93 views

When I'm using the Microsoft Office VB Editor, looking in the Object Browser I can see a section that lists a set of classes and methods that can be invoked without qualifying with a class name or ...
S Bullen's user avatar
2 votes
1 answer
666 views

I want to use Microsoft UIAutomation, from C#. I collected some finds I made on the internet and ended up with the following code (using the Nuget package "Interop.UIAutomationClient" ...
manuell's user avatar
  • 7,650
1 vote
1 answer
87 views

I have a VSTO Excel addin as well as a VSTO PowerPoint addin. I am calling one of the PowerPoint addin functions from my Excel addin with the below code: Application pptApp = null; try { ...
chriscode's user avatar
  • 151
0 votes
1 answer
126 views

I am doing COM automation with a 3rd party library. When trying to access certain properties I need to use obj.get_Property() instead of obj.Property. This seems to be happening only for properties of ...
JBL's user avatar
  • 96
0 votes
1 answer
92 views

We are developing an Outlook 365 plugin that retrieves various parts of the email to create a file. When the mail in the inbox is sent with exchange we are not able to retrieve the sender. We copied a ...
velteyn's user avatar
  • 313
1 vote
2 answers
594 views

I have a vendor specific COM interface. Intellisense shows properties while writing; thus I write something like App.Element.Car.seats which is somehow known to Visual Studio. In the autocomplete ...
Lemonbonbon's user avatar
0 votes
0 answers
137 views

I have the below code in a COM interop project(interacts with the parent window) that first creates a WPF dialog in a STA thread. The dialog is displayed properly from the parent window and is ...
sandy's user avatar
  • 756
0 votes
0 answers
78 views

I have a C++ non-managed program calling into a C# DLL using COM interop to access a sharepoint server using SharePoint CSOM. Calling from C++ returns hr == ERROR_FILE_NOT_FOUND. Calling the same DLL ...
user1961169's user avatar
1 vote
1 answer
470 views

I am working in C# .NET 7 where I can create a COM object of a type that is unknown at compile time. var comTypeName = "Word.Application";//Assume this is passed in by the user and is ...
Feem's user avatar
  • 396
1 vote
0 answers
77 views

I am creating a OneNote add-in using OneNote interop in C#. I want to create a page with a specific name, but I'm not able to do so. I used Application.GetHierarchy to get the XML for my notebooks, ...
Adel M.'s user avatar
  • 500
2 votes
1 answer
137 views

Can you programmatically determine if modern comments are enabled in Word? If it is not possible to check this directly [I don't think it is], is there any property of a comment that you can check ...
Peter Dongan's user avatar
  • 2,308

1
2 3 4 5
38