Issues with COM between a .NET 8+ project and a .NET Framework one #102747
Unanswered
kikaragyozov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried making a .NET 8+ COM Host whose interface has an
IEnumerable<string>
that under the hood is aniterator
method utilizingyield
statements, to be used from a .NET Framework v4.8 project.My interface is the following:
I somehow got to the point where my .NET Framework program made an instance of
IDemoReader
, but the return type I had wasstring[]
, as I had to manually create a.tlb
file from C++, and then used another tool calledtlbimp
that generated me a.dll
out of my.tlb
which I could reference in the .NET Framework application.That
.dll
for some reason changed the return type to be astring[]
instead ofIEnumerable<string>
. I'm guessing generics are a no-no?The moment the method was called, the .NET Framework process terminated with the following error:
I registered my COM Host with
regsvr32
, as dealing with manifests in Reg-Free fashion got to nowhere - It kept crying about side-by-side manifest being incorrect, and I could not understand what I was missing. At this point, I'd like to get an answer to the more pressing matter, mainly - is what I'm trying to do possible, and if so - where did I go wrong?Beta Was this translation helpful? Give feedback.
All reactions