I have developed a COM library in Delphi. When I try to "add reference" in a Visual Studio project, VS crashes. I tried to build Interop assembly by tlbimp.exe and it failed with:
TlbImp : error TI1000 : The type library importer encountered an unexpected exception: System.AccessViolationException - Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Interestingly when I "add reference" to a Web Application (or a Web Site) project, it successfully generates Interop dll and adds the reference.
It is important to me to know how tlbimp.exe is employed by Web Application project because I want to customize Interop generation.