Bob Swart Training Consultancy Reseller www e Bob
Bob Swart Training & Consultancy (& Reseller) www. e. Bob 42. com – Bob@e. Bob 42. com Samenwerking Win 32 en. NET met Delphi en Hydra 3
Agenda • • Win 32 COM in. NET Win 32 DLLs in. NET (unsafe) Assemblies in Win 32 Hydra 3 – Modular client and server applications – Plugin framework – Win 32 host with (un)managed modules
Win 32 COM in. NET • Import COM / Active. X / TLB in. NET – Add Reference – COM Imports • Interop Assembly – Manually using tlbimp • See http: //www. drbob 42. com/examines/examin 37. htm • Don’t use COM (anymore) – Lino Tadros: COM is like smoking…
Win 32 DLLs in. NET • Win 32 library project – Example: ZLib • Win 32 PWide. Char ==. NET String (Unicode!) • . NET import of Win 32 DLL – stdcall; external ‘Win 32. dll’ – [Dll. Import(DLL, Char. Set=…, Calling. Convention=…)] – Virtual Library Interfaces
. NET Assemblies in Win 32 • 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. drbob 42. com/examines/examin 36. htm
Hydra 3 • Rem. Objects Software – Rem. Objects SDK – Data Abstract – Any. DAC – Chrome – Hydra 3 • “Expand your projects to the. NET platform without discarding your existing investment in native Delphi/Win 32 code. ”
Hydra 3 • Host Executable – Module Manager • Hydra Module – Module Controller • visual / non-visual or service plug-ins DEMO
Summary • Win 32 in. NET is easy –. NET is Unicode (Delphi 2008 for Win 32 also) • . NET in Win 32 is not easy (unless unsafe) • Hydra 3 allows to extend Win 32 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. e. Bob 42. com/courseware • stores. lulu. com/drbob 42 • Hydra 3 – Rem. Objects Software • www. Rem. Objects. com
More… • Free Delphi / RAD Studio Seminar – Vrijdag 6 juni 2008 in Helmond Brandevoort • www. e. Bob 42. com/blog for agenda and details • UNICODE coverage • Delphi 2007 / RAD Studio Training – 4 voor 3 – www. e. Bob 42. com/training • • 4 april: VCL Database Development (DBX 4) 11 april: VCL for the Web / Intra. Web 18 april: ASP. NET 2. 0 (master/content, membership/roles, AJAX) 25 april: XML, SOAP & Web Services
- Slides: 10