100 likes | 105 Views
Learn how to integrate Win32 and .NET technologies using Delphi and Hydra 3. Explore topics such as Win32 COM in .NET, Win32 DLLs in .NET, and modular client and server applications. Discover how to import COM/ActiveX/TLB in .NET, use Win32 DLLs in .NET, and utilize the Hydra 3 plugin framework. Expand your projects to the .NET platform without discarding your existing investment in native Delphi/Win32 code.
E N D
Samenwerking Win32 en .NET met Delphi en Hydra 3 Bob Swart Bob Swart Training & Consultancy (& Reseller) www.eBob42.com – Bob@eBob42.com
Agenda • Win32 COM in .NET • Win32 DLLs in .NET • .NET (unsafe) Assemblies in Win32 • Hydra 3 • Modular client and server applications • Plugin framework • Win32 host with (un)managed modules
Win32 COM in .NET • Import COM / ActiveX / TLB in .NET • Add Reference – COM Imports • Interop Assembly • Manually using tlbimp • See http://www.drbob42.com/examines/examin37.htm • Don’t use COM (anymore) • Lino Tadros: COM is like smoking…
Win32 DLLs in .NET • Win32 library project • Example: ZLib • Win32 PWideChar == .NET String (Unicode!) • .NET import of Win32 DLL • stdcall; external ‘Win32.dll’ • [DllImport(DLL, CharSet=…, CallingConvention=…)] • Virtual Library Interfaces
.NET Assemblies in Win32 • Inverse P/Invoke • Only for “unsafe” assemblies • Delphi for .NET library projects • Regasm /tlb • Generate Type Library for .NET Assembly • For .NET class with public interface defined • See http://www.drbob42.com/examines/examin36.htm
Hydra 3 • RemObjects Software • RemObjects SDK • Data Abstract • AnyDAC • Chrome • Hydra 3 • “Expand your projects to the .NET platform without discarding your existing investment in native Delphi/Win32 code.”
Hydra 3 • Host Executable • Module Manager • Hydra Module • Module Controller • visual / non-visual or service plug-ins DEMO
Summary • Win32 in .NET is easy • .NET is Unicode (Delphi 2008 for Win32 also) • .NET in Win32 is not easy (unless unsafe) • Hydra 3 allows to extend Win32 with .NET • Visual plug-in modules • Non-visual plug-in modules • Service plug-in modules
References • Delphi 2006 Development Essentials • PDF courseware manual, chapter 10 • www.eBob42.com/courseware • stores.lulu.com/drbob42 • Hydra 3 • RemObjects Software • www.RemObjects.com
More… • Free Delphi / RAD Studio Seminar • Vrijdag 6 juni 2008 in Helmond Brandevoort • www.eBob42.com/blog for agenda and details • UNICODE coverage • Delphi 2007 / RAD Studio Training – 4 voor 3 • www.eBob42.com/training • 4 april: VCL Database Development (DBX4) • 11 april: VCL for the Web / IntraWeb • 18 april: ASP.NET 2.0(master/content, membership/roles, AJAX) • 25 april: XML, SOAP & Web Services