A
A
Andrey Krytsky2014-09-05 02:48:24
.NET
Andrey Krytsky, 2014-09-05 02:48:24

How to create a PIA for COM .NET?

There is a COM written in .NET. For example: Library.dll. You need to create a PIA (primary interop assembly), for example Library.Interop.dll
Why: to test written COM from another .NET application, as if COM was called from applications written in Delphi, C ++, etc., but using " early-binding" (early-binding), rather than "late-binding" (late-binding) using "InvokeMember"
Complexities:
1. If you add the assembly directly to the application's .NET dependency, then it feels like the marshaller is not used. The calls are made as .NET <-> .NET. And you need to check exactly marshaller
2. You can write your own interfaces in the application under test using ComImport, but this is copy-paste, but I would like automation.
Question: who solved a similar problem, share your experience. How was the distribution of written COM .NET to third-party developers handled?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2014-09-05
@Z10yTap0k

tlbimp Library.dll /out:Library.Interop.dll

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question