Delphi.NET Using Delphi for Microsoft.NET Framework Development
Delphi.NET Delphi.NET Delphi.NET Hello, World! Delphi.NET
MS Internet Explorer 6.0 SP1 MS.NET Framework v1.1 MS.NET Framework SDK v1.1 MS VJ# v1.1 Redistributable MS Internet Infomation Server (IIS) MS Cassini Web Server
HTML (Tidy) Web Services (Team) UML & MDA Internet DBExperss (ITE)
Hello, World!.NET Hello, World!
//.Net Hello, World program Hello; {$APPTYPE CONSOLE} var Str : String = 'Hello, World!'; begin Writeln(Str); Readln; end.
Delphi.NET.NET SDK DbgCLR.EXE Octane
Console Application Windows Forms Application VCL Forms Application Data Providers Database Application ASP.NET Web Application ASP.NET Web Services Application Web Control Library Class Component & Package
Windows Forms Application Forms.NET Windows Forms Web Services Client ADO.NET Windows Forms App.
VCL Forms Application Delphi VCL.NET FCL Borland Delphi.NET.NET Delphi for.net
Data Providers Database Application BDP Windows Forms App. ASP.NET App. Web Services BDP.NET
BDP.NET
ASP.NET Web Application HTML Server Windows Forms ASP.NET Web App. Windows Forms ASP.NET Web App.
Windows Forms ASP.NET Web App.
ASP.NET Web Services Application Web Servers App. Client COM ASP.NET Web Services.
ASP.NET Application VCL.NET Application FCL.NET Application Borland Data Providers ASP.NET Web Services Web Services Delphi.NET
Client Internet Web Servers Client Web Servers Delphi.NET Client Delphi.NET Client
Class Component & Package Class (Windows Forms & ASP.NET User Control) Package (Assembly) (Package)
Delphi.NET Win32 (Managed) (Unmanaged) DLL InterOp
(Managed) (Unmanaged) CLR DLL COM ( )
DLL program CurrentDir; {$APPTYPE CONSOLE} uses System.Text, // StringBuilder System.Runtime.InteropServices; // DllImport() [DllImport('kernel32.dll', CharSet = CharSet.Auto, SetLastError = True, EntryPoint = 'GetCurrentDirectory')] function GetCurrentDirectory(nBufferLength: LongWord; lpbuffer: StringBuilder): LongWord; external; var Str : StringBuilder; begin Str := StringBuilder.Create(256); Str.Length := GetCurrentDirectory(256, Str); Writeln(Str.ToString); end.
COM COM Delphi RCW CCW CLR COM InterOp RCW CCW COM
InterOp (.NET Microsoft Web Browser ) CLR Delphi
GetMem() FreeMem() ReallocMem() PChar Pointer Object Type & Class Type Types CTS VCL FCL RTL.NET Pascal
GetMem() FreeMem() & ReallocMem() CLR Delphi.NET Memory Manager Dynamic Array New() & Dispose()
PChar Pointer ( ) @ API PChar String StringBuilder PChar IntPtr (TBytes) API Marshal class GC(garbage collector) Marshal class
type TAnimateWindowProc = function(...): BOOL; stdcall; var AnimateWindowProc: TAnimateWindowProc = nil; begin @AnimateWindowProc := GetProcAddress(aHandle, 'AnimateWindow'); if AnimateWindowProc <> nil then AnimateWindowProc(Handle, 100, AW_BLEND or AW_SLIDE); (Unsafe Procedure) [DllImport('user32.dll',..., EntryPoint = 'AnimateWindow')] function AnimateWindow(... ): BOOL; external; var UserHandle: HMODULE; CanAnimate: Boolean; begin CanAnimate := GetProcAddress(UserHandle, 'AnimateWindow') <> nil if CanAnimate then AnimateWindow(Handle, 100, AW_BLEND or AW_SLIDE);
Turbo Pascal Delphi Object Type & Class Type (Object Type) TMyObject = Object... TP5.5 Delphi 7.0 KOL (Class Type) TMyClass = Class... Delphi 1.0 7.0 (Interface) IInterface = interface...
Delphi.NET Object Type & Class Type Turbo Pascal (Object Type) Delphi.NET CLR TObject (Class Type) TObject = System.Object; TClass = class of TObject; TMyClass = TClass... System.ValueType ( ) Interface
Types CTS
VCL FCL TObject = System.Object Exception = System.Exception TComponent = System.ComponentModel.Component
CLR Interface TSomething = class(tinterfacedobject, IDescendant, IDesc) procedure P1; procedure P2;... end;
RTL Borland.Delphi.System Borland.VCL RTL = Data Type Support(Base & Interface & Object) CTS Language.NET Pascal Thread System.Threading, STA/MTA Thread Model MemMgr New() & Dispose() Exception System.Exception Other OS Resource System.xxxxx Debug Support System.Diagnostics
.NET Pascal $(BDS)\Source $(BDS)\Help Danny Thorpe
Strings & Arrays Records Classes & Interfaces Exceptions Properties & Events Sets Text files Local Procedures Variants Components Streams New, Dispose Readln, Writeln Format Component Streaming Random Virtual Constructors
@, Addr(), Absolute directive Real48 six-byte floats File of <type> GetMem, FreeMem, ReallocMem Use arrays or New() & Dispose() ExitProcs Old Object syntax (type foo = object) TVarData, Variant internals
CLR Delphi syntax for: Virtual constructors Named constructors Virtual calls from class methods Unsafe types PChars Variant records
TObject.ValueType (record type) (Boxing) TObject(12).ToString()
( ) (Multicast Events) Delphi Java C++ Delphi.NET ( ) Y Y Y Y Y Y(CLR) Y Y Y Y(CLR) Y