1,882 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
86
views
How to replace a COM Interop with the ComWrapper Source Generator?
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 ...
2
votes
1
answer
113
views
System.IO.FileNotFoundException using another assembly in ComInterop project
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 ...
0
votes
0
answers
26
views
"Object required" error with.NET 8 ComVisible object created with CreateObject() [duplicate]
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-...
1
vote
1
answer
120
views
How to pass a string as a pointer to byte array from a managed code to an unmanaged function
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 ...
1
vote
1
answer
55
views
ASP.NET web application : Dcom configuration interop exception
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 ...
0
votes
1
answer
70
views
CreateObject on .NET-Framework-based COM object fails if (a) the COM object is registered in HKCU instead of HKLM and (b) UAC is off [sic]
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-...
5
votes
1
answer
185
views
RegFree COM in VBA - ClassFactory cannot supply requested class
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 ...
2
votes
1
answer
95
views
One COM object works but the other does not
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 ...
1
vote
1
answer
86
views
What makes Notepad (and others) open behind my program when invoked through an IExplorerCommand?
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 ...
3
votes
1
answer
106
views
Changing the name of assembly as exposed to COM
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 ...
1
vote
1
answer
188
views
Implement IDispatch-only interface easily in C++
I defined the following IDispatch-only interface in my C# project:
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("3532C4E8-D320-487C-8BD4-...
2
votes
1
answer
257
views
How to create and register an object via ComWrappers in native AOT
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>
&...
0
votes
0
answers
55
views
My WPF application crashes intermittently when working with multiple windows
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 ...
2
votes
1
answer
160
views
Are there significant differences between using COM directly or using an interop in PowerShell?
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....
0
votes
1
answer
269
views
How to not use builtin com interop to make trimming work in .NET
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 ...