Reputation: 595
After searching and applying all solutions for below problem, are not working. What I have done- 1. I created a .dll in C#, made its com visible ture. 2. I creadted the .tlb using regasm. 3. Created a Delphi 7 project where I imported this type library (.tlb) and calling the function of this dll. 4. All is running fine on my PC.
Now when I copied these all files (including .dll, even .dcu too) to another PC (.Net framework 4.5 installed) and tried to run the .exe, it gives me error "Class not registered", when I tried registering it with RegSvr32 then it shows error -"Entry point not found".
What else am I missing? Is there any other prerequisite to run Delphi 7 exe with dll on another PC?
Upvotes: 4
Views: 1191
Reputation: 613562
To register a .net assembly you must use regasm
and not regsvr32
.
Making the entire assembly COM visible is probably a mistake. Do you really want to make all public type COM visible? It would be more usual to apply the ComVisible
attribute to specific types.
You don't need to copy dcu files. These are used as intermediate files for the Delphi compiler. Assuming you aren't using runtime packages, just the executable, and the registered assembly should suffice.
Upvotes: 9