I have a set of libraries written in Delphi.NET (.NET 1.1) which I want to use in my Win32 (Delphi) application. For performance related issues, I've decided to follow the COM route.
Sometimes, after rebuilding the DLL, when I try to instantiate the objects exposed through COM the win32 application hangs at the CreateComObject call--how can I solve this problem?
To expose the Delphi.NET libraries through COM, I add the following attributes above each class deceleration:
[Comvisible(true)] [Guid('some guid')] [ClassInterface(ClassInterfaceType.AutoDual)]
After compiling the DLL, I generate a *TLB.pas file, this file contains definition for all public and COM visible classes and interfaces in DLL, this file allows me to more easily use the COM objects in my Delphi Win32 application. Finally, I register the dll and the .tlb flie using regasm.
I've tried unregistering and running the win32 app. which references the DLLS; I expected to receive a run-time error but the application once again hung at the CreateComObject call.
I've also tried unregistering and registering the dll without any luck.
Thanks.
p.s. I am using BDS2006