Delphi Package ¾Ç²ßµ§°O¡]§t°Q½×«H¥óºëµØ¡^

§@ªÌ: ½²·ØÅï (huanlin_tsai@yahoo.com)
¤é´Á: Mar-29-2000, Sep-3-2001

¦b¹ê§@ package ®É¡A§Ú¹J¨ì¤F¤@¨Ç°ÝÃD¡A©Ó»XDelphiChat¦h¦ì¼ö¤ßªB¤ÍªºÀ°¦£¸Ñ¨M¤p§Ì³\¦hºÃ´b¡A¦]¦¹·í³Å¥S(James Fu)´£Ä³±N°Q½×«H¥ó¾ã²z¥X¨Ó¨Ã°t¦X½d¨Ò¨Ñ¤j®a°Ñ¦Ò®É¡A§Ú¤]«ÜÃÙ¦P¡A¨Ã¥B±N¥­±`ªºµ§°O¤Î½d¨Òµ{¦¡µy§@¾ã²z¤@µf¡A©ó¬O¦³¤F³o¥÷¤å¥ó¡C

¦pªG§A¥¿¦b¦Ò¼{­n¤£­n±N package ¹ê»Ú¹BÀ³¥Î¦b±M®×¸Ì­±¡A§A¥i¥H¥ý¬Ý¬Ý package ªºÀuÂI¤Î¯ÊÂI¡C·Q­n¶i¤@¨B¤F¸Ñpackage ¦p¦ó¨Ï¥Î¡A«Øij±z¥ý¾\Ū°Ñ¦Ò¸ê®Æ¸Ì­±ªº¤@¨Ç¤å³¹¡AµM«á¤U¸ü½d¨Ò¦Û¤v°Ê¤â°µ¬Ý¬Ý¡C

°Ñ¦Ò¸ê®Æ

¥«­±¤W¤w¸g¦³«Ü¦h²{¦¨ªº¸ê·½¡A¥]¬A®ÑÄy¡AÂø»x¡Aºô»Úºô¸ô¤W­±³£¦³¤¶²Ð package ªº°ò¦ª¾ÃÑ¡A©Ò¥H§Ú¨Ã¤£·Q¦b³o¸Ì­«½Æ³o¨ÇªF¦è¡A§Ú±N³o¨Ç¸ê·½¦C¥X¨Ó¨Ñ»Ý­nªº¤H°Ñ¦Ò¡G

¥H¤W©Ò¦Cªº¸ê·½À³¸Ó¬Û·í°÷¤F¡A¥t¥~§Ú¤]¥Î Delphi 5 ¼g¤F¤T­Ó½d¨Ò¡A¤À§O¬O¡G

¥]§t¤@­Ó¥Dµ{¦¡¤Î¨â­Ó package ¡AÀ£ÁYÀɤº§t¤l¥Ø¿ý¡A­Y¥H Pkunzip ¸ÑÀ£ÁY®É½Ð¥[ -d °Ñ¼Æ¡C¨ä¤¤ProjectGroup1.bpg ¥i¥H«Ø¥ß©Ò¦³ªº¼Ò²Õ¡C

PkgDemo1 ªº§ï¶iª©¥»¡AÀ£ÁYÀɤº§t¤l¥Ø¿ý¡A­Y¥H Pkunzip ¸ÑÀ£ÁY®É½Ð¥[ -d °Ñ¼Æ¡A¸Ñ¶}«á½Ð¥ý¾\Ū¨ä¤¤ªº Readme.txt¡A¸ÌÀY¦³Â²³æªº»¡©ú¡C
±q³o­Ó½d¨ÒÀ³¸Ó¥i¥H­l¥Í¥X§ó½ÆÂøªº¹ê»ÚÀ³¥Î¡A¦pªG¦³¤£¤F¸Ñ¤§³B¡A §Ú«Øij±z¥ý¬Ý¬Ý James Heyworth ªº¨º½g¤å³¹¡]¨£¤W¤è°Ñ¦Ò¤åÄm¡^¤Î¨ä½d¨Ò¡C

¦¹½d¨Ò±N DataModule ¤]°µ¦¨¤@­Ó¿W¥ßªº package¡A½Ð°Ñ¦Ò _readme.txt ªº»¡©ú¡C

¥H¤U¬Oºô¤Í´£¨Ñªº½d¨Ò¡G

¥Ü½d¦p¦ó±N DataModule ©ñ¦b package ¤¤Åý¨ä¥Lµ{¦¡¦@¥Î¡C

¥H¤U¬O§Úªºµ§°O¡A¤ñ¸û¤ù¬q¦Ó¯Ê¥F§¹¾ã©Ê¡A¶È¨Ñ°Ñ¦Ò:)

¨Ï¥Î Package ªºÀuÂI

¨Ï¥Î Package ªº¯ÊÂI

¦b±N¼Ò²Õ¿W¥ß¥X¨Óªº¹Lµ{¤¤·|¹J¨ì¦@¨É¥þ°ìÅܼƤΪ«¥óµ¥°ÝÃD¡A»Ý­nªá¤ñ¸û¦hªº¤ß«ä¦b¼Ò²Õ¤Æªº³]­p¤W­±¡AÃö©ó³o¨Ç°ÝÃD¡A¥i¥H°Ñ¦Ò DelphiChat °Q½×«H¥óºëµØ ©Î³\¯à±o¨ì¨Ç½u¯Á¡C

¦b¼¶¼g´X­Ó package ªº´ú¸Õµ{¦¡¤§«á¡A§ÚÁÙ¬O¨S¦³±N package À³¥Î¦b¹ê»Úªº±M®×¶}µo¤¤¡A¦Ó¤´µM¨Ï¥Î DLL¡A¨ä³Ì¥D­nªº­ì¦]¡A¥¿¬O package Àu©ó DLL ¤§³B¡Ð¡Ð¥i¥H¦@¨ÉÅܼơC³o¶µ¥\¯àªº¥ß·N«Ü¦n¡A¦ý¤]±a¨Ó¤F¥t¤@¨Ç­­¨î¡A¥D­n¬O¦WºÙ½Ä¬ðªº°ÝÃD¡A¨Ï±o¦@¥Îªº unit ¤@©w­n©ñ¦b package ¸Ì­±¡A§_«h·í¨â­Ó package ¥]§t¤F¬Û¦Pªº unit¡A¨ä¤¤¤@­Ó´NµLªk¸ü¤J¡A§Ú­Ìı±o³o·|³y¦¨³Â·Ð¡C¥t¥~¡A¥Ñ©ó¨ä¥Lªº¤p²Õ¦¨­û¹ï©ó package ªº¨Ï¥Î¤£¼ô¡A®e©ö¥X trouble¡]¨Ò¦p¡Gproject ­n¥[¤J .dcp ¤§Ãþªº¡^¡A³o¤]¬O¦Ò¶q¤§¤@¡C

°ÊºA¸ü¤J package ªº¨ç¦¡¡]SysUtils.pas)

¸ü¤J package ¦ÜÀ³¥Îµ{¦¡ªº°õ¦æªÅ¶¡¡C
¨ç¦¡­ì«¬¡Gfunction LoadPackage(const Name: string): HMODULE;

°Ñ¼Æ Name ¬°±ý¸ü¤Jªº package ªº§¹¾ã¸ô®|¤ÎÀɮצWºÙ¡C
¶Ç¦^­È¬°¸ü¤Jªº package ªº Handle¡A¦¹ Handle ¦bÄÀ©ñ package ®É·|¥Î¨ì¡A©Ò¥H¥²¶·¦n¦n«O¦s¡C

¦¹¨ç¦¡·|¥ýÀˬd±ý¸ü¤Jªº package ©Ò¥]§tªº units ¬O§_¤w¦b¥Ø«e¸ü¤Jªº package ¤¤­«½Æ¥X²{¡A­Yµ{¦¡³æ¤¸­«½Æ´N¤£¸ü¤J¥BÅã¥Ü¿ù»~°T®§¡A§_«h·|±N¦¹ package ¤¤©Ò¥]§tªº¦U³æ¤¸ªº Initialization °Ï¬qªºµ{¦¡½X°õ¦æ¤@¹M¡C½Ðª`·N¡ALoadPackage ·|¥ýÀˬd¸Ó¼Ò²Õ¬O§_¤w¸g¸ü¤J¤F¡A¦pªG¬O¡A´Nª½±µ¶Ç¦^¸Ó¼Ò²ÕªºHandle¡A¨Ã¥B±N¼Ò²Õªº¸ü¤J­p¼Æ¥[¤@¡]increase reference count¡^¡A¼Ò²Õ¤¤¦U³æ¤¸ªºInitialization °Ï¬q¤£·|³Q°õ¦æ¡C©Ò¥H§Y¨Ï­«½Æªº©I¥s¦¹¨ç¦¡¡A§Ú­Ì¨Ã¤£·|¦bµ{¦¡ªº°õ¦æªÅ¶¡¤¤¾Ö¦³¦h­Ó¬Û¦Pªº¼Ò²Õ¡C

¨ç¦¡­ì«¬¡Gprocedure UnloadPackage(Module: HMODULE);

¦¹¨ç¦¡·|¥ý±N«ü©wªº package ¼Ò²Õ©Ò¥]§tªº¦U³æ¤¸ªº Finalization °Ï¬qªºµ{¦¡½X°õ¦æ¤@¹M¡AµM«á¨ø¸ü¸Ó¼Ò²Õ¡C
±q VCL ªº­ì©l½X SysUtils.pas ¤¤«õ±¸¡A¥i¥Hµo²{¥¦¦¹¨ç¦¡¨Ì§Ç©I¥s¤F FinalizePackage ¤Î FreeLibrary¡A¨ä¤¤ FinalizePackage ·|¥h°õ¦æ Finalization °Ï¬qªºµ{¦¡½X¡A¦Ó FreeLibrary ¬O WinAPI¡A¥¦·|¥ý»¼´î¼Ò²Õªº°Ñ¦Ò­p¼Æ¡A¦pªG°Ñ¦Ò­p¼Æ¬°¹s¤~·|±N¼Ò²ÕÄÀ©ñ±¼¡C

VCL Ãþ§Oµù¥U¨ç¦¡ (Classes.pas)

procedure RegisterClass(AClass: TPersistentClass);
procedure RegisterClasses(AClasses: array of TPersistentClass);

³z¹L¦ê¬y¨t²Î(stream system)µù¥UÃþ§O¡A¤wµù¥U¹LªºÃþ§O¤£·|­«½Æµù¥U¡A¦ý¦pªG¬O¤£¦P package ¦³¬Û¦PªºÃþ§O¦WºÙ¡A«h©I¥s¦¹¨ç¦¡·|¥X²{ EFilerError ªº¿ù»~°T®§¡C¦¹¨ç¦¡³q±`©ñ¦bµ{¦¡ªº initialization °Ï¬q¡C

³z¹L RegisterClass µù¥UªºÃþ§O¥i¥H¥Î¦¹¨ç¦¡¨ú±oÃþ§Oªº MetaClass¡A¨ú±o MetaClass ¤§«á´N¥i¥H¥H¦¹¨Ó«Ø¥ß¸ÓÃþ§Oªºª«¥ó¡C°Ñ¦Ò¤U­±ªº½d¨Ò¡]¥H¤U®i¥Üªº¤è¦¡¤£¥u¥i¥H«Ø¥ß Form ª«¥ó¡Aµy§@­×§ï´N¥i¥H«Ø¥ß¨ä¥Lª«¥ó¡^¡G

function CreateFormByClassName(ClassName: string): integer;
var
  AClass: TPersistentClass;
  AForm: TCustomForm;
begin
  Result := mrNone;
  { Note that TApplication "owns" this form and thus it must
    be freed prior to unloading the package }
  AClass := GetClass(ClassName);
  if AClass <> nil then
  begin
    AForm := TComponentClass(AClass).Create(Application) as TCustomForm;
    Result := AForm.ShowModal;
  end;
end;

·í¨ø¸ü package ®É¡AÃþ§O¥i¥H©ú¥Õ¦a¦b finalization °Ï¬q¤¤µù¾P¡]Unregister¡^¡A¤]¥i¥HÁô§t¦a¨Ï¥Î UnRegisterModuleClasses ¨ç¦¡¡C

1. ¸ü¤J¨Ãªì©l¤Æ package¡C
2. ¨Ï¥Î package¡C
3. ¸ê·½¦^¦¬¡]ÄÀ©ñ§A±q package ¤¤«Ø¥ßªºª«¥ó¡^¡C
4. µù¾PÃþ§O¡C
5. ¨ø¸ü package ¡C

ª`·N¨Æ¶µ¤Î«Øij


Delphi Chat °Q½×«H¥óºëµØ

°Q½×¥DÃD¡GÀ³¥Îµ{¦¡¼Ò²Õ¤Á³Î°ÝÃD
°Ñ»P¤H­û¡GFang Lin, Hippy, James Fu, MR7, Maxwell Lin, Michael Tsai, Scott

³o¨Ç°Q½×«H¥ó¬O¨Ì·Ó¤é´Áªº¥ý«á¶¶§Ç±Æ¦C¡A¥Ñ©ó«H¥ó¤¤¤Þ¨¥©Ò¦ûªº¤ñ¨ÒÆZ¤jªº¡A©Ò¥H§Ú°µ¤F¨Ç§R§ï¡A¥Øªº¬O¬°¤F§ó©ö©ó¾\Ū¡A­Y¦³¤£·í¤§³B©|½Ð¨£½Ì¡C

3-10-2000, Michael Tsai:

Dear all:
§Ú³Ìªñ¹Á¸Õ±N¤@­Ó¸ê®Æ®wÀ³¥Îµ{¦¡ªº±M®×¤Á³Î¦¨³\¦h¿W¥ßªº package ¼Ò²Õ¡A¨Ò¦p¡G«È¤á¼Ò²Õ¡A¼t°Ó¼Ò²Õ¡A¶i³f¼Ò²Õ...µ¥¡C
§Ú¨Ï¥Î¤F°ÊºA¸ü¤J package ªº¤è¦¡¡A¨Ã¥B¼g¤F´X­Ó½m²ß¥Îªº´ú¸Õµ{¦¡¡A¹B§@±oÁÙºâ¦n¡A¥u¬O¦³­Ó°ÝÃD¡G¦b¹ê»Úªº±M®×·í¤¤¡A¬°¤F¨D¾Þ§@¤¶­±ªº²Î¤@¡A§Ú¤j¶qªº¨Ï¥Î¤Fµøı¤ÆÄ~©Óªº Form (aka VFI, Visual Form Inheritance)¡A¨C¤@­Ó¸ê®ÆºûÅ@§@·~ªºµøµ¡³£Ä~©Ó¦Û¤@­Ó°ò¦ªºÃþ§O¡A¨Ò¦p¡GTBaseDataForm¡A¦ý¬O Delphi package ¤£¤¹³\¨â­Ó package ¸Ì­±¥]§t¬Û¦Pªº unit¡A³oºØ­­¨îÅý§ÚµLªk¦b¦U­Ó package ¤¤¨Ï¥Î VFI¡A´¿·Q¹L§ï¥Î DLL¡A¥i¬O DLL ¦b¥þ°ìÅܼƤW¦P¼Ë±oªáµf¥\¤Ò¡A¥B¦U¼Ò²Õ¤§¶¡ªº°Ñ¼Æ¶Ç»¼¤]¨S¦³ package ¨Ó±o¤è«K¡A¤£ª¾¦U¦ì¦³¨S¦³¤°»ò«Øij? ±z«Øij±N¥¦­Ì¼¶¼g¦¨ COM ª«¥ó¶Ü?
ÁÂÁÂ!

Michael Tsai

3-10-2000, Fang Lin:

Hi:
§Ú¤]¬O±Ä¥Î³oºØ°µªk. ¤]¸I¨ì¬Û¦Pªº¨Æ±¡.

BasePackage ªí¥Ü TBASEDATAFORM©Ò¥]¦¨ªºpackage¦pªG­nµøı¤ÆÄ~©ÓForm, ¥²¶·¦bProject Group¤¤±NBasePackage ¥[¤J,§_«h·|¥X²{ TBaseDataForm not foundªº¿ù»~°T®§.
¦b·s«Ø¥ß¤@­ÓÄ~©Ó¦ÛTDataBaseFormªºForm®É, ¥²¶·±NActive Project(¥i¯à¬Odpk, or dpr) ³]¦¨ BasePackage, µM«á¦b¿ï¾Ü Main Menu /File/New ¤Á´«¦ÛBasePackage ªº TabSheet, ¦A¿ï¾Ü­nÄ~©Óªº Form§Y¥i, ¥u¬O·s¼WªºForm·|¦Û°Ê¥[¨ìBasePackage¤¤, ÆZ°Q¹½ªº.

¤£ª¾¹D¦³¨S¦³§ó¦nªº¤èªk?

Fang Lin

3-11-2000, Michael Tsai:

Hello, Fang:
§Ú«á¨Ó§â BasePackage ¥Ñ Runtime package §ï¬° Designtime and runtime package, µM«á install ³o­Ó package, ¤§«á«K¥i¥H¥ô¦ó®É­Ô¤â°Ê§ó§ï Form ªº¤÷Ãþ§O¡A°µªk¦p¤U¡G

1. New ¤@­Ó¼Ð·Çªº Form¡A°²³]Ãþ§O¦WºÙ¬° TForm1¡C
2. §â TForm1 = class(TForm) §ï¬° TForm1 = class(TMyForm)¡C
3. «ö Alt+F12 (View as text), §â²Ä¤@¦æªº Object TForm1 ...§ï¦¨ Inherited TForm1 ...¡C¦A«ö¤@¦¸ Alt+F12¡C

ÁöµM¤£§¹¬ü¡A¦ýÁ`ºâ¦³ªk¤l¸Ñ¨M¦b package ¤¤µøı¤ÆÄ~©Ó Form ªº°ÝÃD¤F¡C¦pªG­n¦³­Ó¤ñ¸û"°®²b"ªº¸Ñ¨M¤è®×¡A©Î³\¼¶¼g¤@­ÓForm Expert ¬O³Ì¦nªº¸Ñ¨M¤è¦¡¡AÃö©ó³o¤è­±¡ARay Lischner ¦³¤@¥»µÛ§@: Hidden Path Of Delphi 3¡A¤¤Ä¶¥»¥Ñ§õºû¥ý¥Í½Ķ¡A¤å»í¥Xª©¡A¸Ì­±¦³²{¦¨ªº½d¨Ò»Pµ{¦¡½X¡AÀ³¸Óµy·L­×§ï´N¯à¨Ï¥Î¡C¤£¹L§ÚÁÙ¬O§Æ±æ¦³¨ä¥L¤ñ¸û²³æ¤Sº}«Gªº¸Ñ¨M¤è®× ...

Michael Tsai

3-15-2000, Maxwell Lin:

TO Dear Michael:
±z³o¼Ëªº°ÝÃD¦³ÂIÃø»¡³á¡C¦]¬°¯à¹³±z³o¼Ë¬[ºcµ{¦¡ªº¤H¤£¦h¡A§óªP½×µûªR³oºØ°µªkªºÀu¦H¡C
§Ú¦b¤½¥q¾D¹Jªº§xÃø¬O¤H¤O¤£¨¬¡A°£¤F¤@¨Ç¦³µ{¦¡ªººûÅ@¤u§@¤§¥~¡F¤j³¡¤À¤u§@³£¸¨¦b¤¶­±¤Wªº½Õ¾ã¡C¯u¥¿»P¸ê®Æ¦³ÃöªºBUSINESS RULE·sµ{¦¡¨ä¹ê¤ñ¸û¤Ö¡C¦]¦¹¤ñ¸û¶É¦V¿W¥ßbusiness rule¬°¦@¥Î¤¸¥ó¡A¥Ø«e¥¿´ÂµÛCOM+¤è¦V¡C

¦Ü©óµe­±³¡¤À¡A´N¨Ì¾Úclient¨Ó¿ï¡C¤ñ¦p¦blan¤W´N¥Îdelphi°µ¡A¦bwww¤W´N¥ÎASP + VBScript©ÎASP + JScript¡C

§Ú¸gÅ礤¡Gµe­±¦@¥Î©Ê¨ä¹ê«Ü§Cªº¡A¦ý³o¤]¥u¬O§Úªº·Qªk°Õ¡A¤£¤@©w¬O¹ïªº¡C

Maxwell Lin arus@tpts1.seed.net.tw

3-15-2000, Michael Tsai:

Hello, Maxwell:
Ãö©óµe­±ªº¦@¥Î©Ê¡A§Úªº·Qªk¬O§â±`¥Îªº¸ê®Æ¾Þ§@¥\¯à¤Îµe­±¦w±Æ³]­p¦¨°ò¦Ãþ§O¡A³o¼Ë¦h¤H¶}µo®É¡A´N¬Ù±o¼gµe­±ªº spec¡A¥u­n¨C¦ìµ{¦¡­ûÄ~©Ó¦Û°ò¦µøµ¡Ãþ§O´N¦n¤F¡C§Úªº Form Ãþ§O¤j¬ù¦³¥H¤U´XºØ:

  • TBaseDataForm
    ©Ò¦³ Form ªº¤÷¿Ë, ¦³¤@­Ó¥[±j«¬ªº DBNavigator¡C
  • TBrowseEditForm
    ¦³¤@­Ó PageControl¡A¤º¦³¨â­Ó TabSheet, ¤À§O´£¨ÑDBGrid ¥i¨ÑÂsÄý¤Î½s¿èÄæ¦ì¸ê®Æ¡C
  • TMasterDetailFormA, TMasterDetailFormB...
    ¤÷¤lÃöÁpµøµ¡

¦pªG­n»¡©ú§Úªº¾ã­Ó³]­p¡A®£©È±oªá¤W¦n¨Ç½g´T¡A®e§Ú·§­z¤@¤G¡G
¦b TBaseDataForm ¤¤©Ò©ñ¸mªº¼W±j«¬ªº DBNavigator, ¼W¥[¤@¨Ç¯S®íªº«ö¶s¡A¦p: ¬d¸ß¡A´M§ä¡A½Æ»s¡A¦C¦L..µ¥¡A§ÚÅý TBaseDataForm ¤º«Ø¤F¹w³]ªº¸ê®Æ¾Þ§@ªº¥\¯à¡A¨Ã¥B±N³o¨Ç¥\¯à«Å§i¬°µêÀÀ¨ç¦¡¡AÅýÄ~©ÓªÌ¥iµø»Ý¨D§ó§ï­ì¦³ªº¥\¯à¡C
¥Ñ©ó§Ú³Ì­ì©lªº¥Øªº¬O§Æ±æ·í¸ê®Æ®wªºªí®æ¤ÀªR³]­p¦n¤§«á¡AÅý coding ªº³t«×¥[§Ö¡A¦Ó¦b¾ú¸g®É¶¡¦ÒÅç«á¡A¥Ø«eªº³]­p¤]ªº½TÅý§Úı±o¬Ù¨Æ«Ü¦h......ª½¨ì§Ú·Q­n¼¶¼g¿W¥ßªº¼Ò²Õ¡C
§Ú·Q¡A¦b¼¶¼g¼Ò²Õ®É¡A¨Ï¥Î¼ËªO¡]or ¤¸¥ó¡^­n¤ñÄ~©Ó¾A¦X±o¦h¤F¡A¤×¨ä¬O¤@¼h¤S¤@¼hªºÄ~©Ó¤]¬OÆZ­n©Rªº¡AÁÙ¬O¾¨¶qÁקK±o¦n¡C
Ãö©óµe­±¤Î¾Þ§@ªº¤@­P©Ê¡A§Ú·Q¥i¯à·|¦]¬°³nÅ骺©Ê½è¤£¦P¦Ó·|¦³¤£¦Pªº¦Ò¶q§a¡A
§Ú²q·Q±zªºµ{¦¡¬Oµ¹¤½¥q¤º³¡¤H­û¨Ï¥Îªº?

Regards,
Michael Tsai

3-16-2000, Hippy:

Hello,
´£¨Ñ±z¤@­Ó¤p«Øij¡G
¦]¬°¥»¤½¥q¤]¬O¥Îpackage¨Ó°µªº¡C¦Ó¥B°µªº¤@¤Á³£Áٺ⮼¶¶§Q¡]¨ì²{¦b¬°¤î¡^¡C¥u¬O¡A¶}µoªº¶¶§Ç©M§A¦³¤@¨Ç¤£¦P¡I
§Ú­Ì¥ý±N¤£¦Pªº¼Ò²Õ¦U¦Û¶}µo¡]EXE§Î¦¡¡^§¹¦¨«á¡A¦A§â¥¦ compile ¦¨ Package¡C¦Ó¥B¡A§Ú­Ì¦b¦U­Ó¼Ò²Õ¸Ì¡A¤]¬O¦³¦@¥Îªºform¤Î¨Ï¥ÎÄ~©Óªº§Þ¥©¡C
©Ò¥H¡A²³æªº»¡¡A¤]´N¬O¦b¶}µoªº®É­Ô¡A¥ý uses ³QÄ~©Óªº form¡AµM«á¡A·sªºform ¦A±q¨ºÃäÄ~©Ó¤U¨Ó¡I³Ì«á¡A¦A±N¦@¥Îªº¯ª¥ý compile ¦¨ .dcp ¡AµM«á¦A¦U¦Û compile ¨ä¥Lªº¼Ò²Õ¡A³o¼Ë¡AÀ³¸Ó¥i¥H¡C«Øij±z¤£§«¸Õ¸Õ...

Hippy

3-21-2000, MR7:

> ³o´X¤Ñ½ Delphi ¤â¥U®Éµo²{¤F¤@­Ó½sĶ«ü¥Ü¦ü¥G¸òPackage¦³Ãö¡A¦ý¬O§Ú¨S¸Õ¹L
> ¡A¤£ª¾¹D {$WEAKPACKAGEUNIT ON} ¬O¤£¬O§óª½±µªº¤èªk ?

3-22-2000, James Fu:

Dear Friend :

>±z³o¼Ëªº°ÝÃD¦³ÂIÃø»¡³á¡C¦]¬°¯à¹³±z³o¼Ë¬[ºcµ{¦¡ªº¤H¤£¦h¡A
>§óªP½×µûªR³oºØ°µªkªºÀu¦H¡C
>§Ú¸gÅ礤¡Gµe­±¦@¥Î©Ê¨ä¹ê«Ü§Cªº¡A¦ý³o¤]¥u¬O§Úªº·Qªk°Õ¡A¤£
>¤@©w¬O¹ïªº¡C

´¡­Óªá¤@¤U¡A§Ú·Q¤Á³Î¦¨¦n´X­Ó¼Ò²Õ³o¼Ëªº¬[ºcÀ³¸Ó¤£¤Ö¡A­Ó¤H»{¬°¡A¦³®É¬°¤FºûÅ@¤Wªº¤è«K¡A¤ñ¤è»¡±z¤µ¤Ñ¶}µo¤@­ÓÀ³¥Î¨t²Îµ¹±zªº«È¤á¡A¥Î¤F´X¤Ñ¤§«áµoı¦³¤@­ÓForm¤W­±¥´¤F¤@­Ó¿ù¦r©Î¬O¤@­Ó³B²z¼g¿ù¤F¡A¤]³\±z¥i¥H§â©Ò¦³ªºµ{¦¡­«·sComplier¦¨¤@­Ó·sªºexeÀɶǵ¹«È¤á¡A§Y¨Ï±z¨Ï¥Î¤F D4 or D5 ªº RunTime Package ªº¤è¦¡¡A§Ú·Q¤@­Ó¨t²Î¥i¯àÁÙ¬O»Ý­n¦n´XMB¡C
¦pªG¦¹®É±z±Ä¥Î¤À³Î¼Ò²Õªº¤è¦¡ªº¸Ü¡A¤]³\±z¥u»Ý­n±N¦³°ÝÃDªºµ{¦¡³¡¤À­«·s½sĶ¡A¥u»Ý­nµ¹¹ï¤è³o­×§ï¹Lªº¡C
·íµM¡AÁÙ¦³³\¦h±¡ªp¥i¥H¨Ï¥Î¨ì¤Á³Î¼Ò²Õªº¦n³B¡A¤×¨ä¬O±z»Ý­n¶}µo¨ì°Ó·~®M¸Ë³nÅé®É¡A¨º´N§óÅã±o­«­n¤F¡C¦Ü©ó­n§Q¥Î¤°»ò¼Ëªº§Þ³N¨Ó¤Á³Î¡A¦bºô¸ô¤W¦³¤£¤Ö¤¶²Ð§Q¥Î dll ªº°ÊºA¸ü¤Jªº¤è¦¡¡A¥i¥H°Ñ¦Ò QuickReport ªººô¦û¦³­Ó¤£¿ùªº Sample¡A©Î¬O¼e¹F¥Sªº²`«×¾úÀI¤¤¤]¦³¤£¤Öªº½d¨Ò¡A³o¨Ç©Ò¨Ï¥Îªº¤èªk³£¤j¦P¤p²§¡A±z¥i¥H¿ï¤@­Ó¸û¬°¸Ô²Óªº°Ñ¦Ò¬Ý¬Ý¡A³o¥u¬O¤èªk¤§¤@¡C¦Ü©ó¨ä¥Lªº¹³¬OPackage ªº¤è¦¡¡A©Î¬O¸ü¤J DFM Àɪº¤è¦¡¤]³£¥i¦æ¡C

¦Ü©óµe­±¦@¥Î©Ê§Ú­Ó¤H­Ë¬Oı±o¦b¨t²Î¤¤À³¸Ó·|«Ü°ª¡A¤ñ¤è»¡±zªº¨t²Î¤¤¦³ 10 °¦¥ª¥kªº¿é¤J¸ê®Æ§@·~¡A±z¤£¤j¥i¯à³o´X¤ä§@·~·s¼W¡B§R°£¡B­×§ï¤§Ãþªº«ö¶s³£³]­pªº¤£¦P¤j¤p¡B¦ì¸m§a¡C·íµM°Õ¡A³o¼Ëªº±¡ªp¤U¥i¯à·|Åýµe­±¦³¨Ç§bªO¡A¦ý¹ï¨Ï¥ÎªÌ¨Ó»¡©Î³\·|¤ñ¸û®e©ö¤@ÂI¾Ç²ß©O¡H

¤p§Ì¤~²¨¾Ç²L¡A±N¤@¨Ç­Ó¤Hªº²L¨£Ä@»P¤j®a¤À¨É¡AÁÙ±æ¤j®a¤£§[«ü±Ð¡C

James Fu

3-23-2000, Michael Tsai:

¸g¹L´X¦¸ªº°Q½×¡A§Ú­Ìª¾¹D¼¶¼g¿W¥ßªº¼Ò²Õªº½T¦³³\¦hÀuÂI¡A¯÷¾ã²z¦p¤U¡G
- À³¥Îµ{¦¡¥i¥H³Q°ª«×ªº¼Ò²Õ¤Æ¡A¦Ó¥B¥i¥H³vº¥¥æ¥I§¹¦¨ªº¥\¯àµ¹«È¤á¡C
- ºûÅ@¤ñ¸û¤è«K¡C
- ®e©ö¥]¸Ë¦¨¦hºØª©¥»¥H¦]À³¤£¦Pªº¥«³õµ¦²¤¡C
- ¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@µ{¦¡¸ü¤Jªº³t«×¡C

...¦ü¥G¨S¦³¯ÊÂI:)

¦pªG¥Î Delphi ¤Î BCB ¶}µoªº¸Ü¡A­Ó¤Hı±oÁÙ¬O¥Î Package ªº¤è¦¡¤Á³Î·|¤ñ¸û»´ÃP¡A¥D­n¬O¦]¬°¦b¥Dµ{¦¡»P¦U¼Ò²Õ¤§¶¡«Ü¦³¥i¯à»Ý­n¶Ç»¼°Ñ¼Æ¡A¦Ó³o¨Ç°Ñ¼Æ¥i¯à¬O VCL ª«¥ó¡A¨Ï¥Î DLL ªº¸Ü·|¤ñ¸û³Â·Ð¡C¥t¥~¡ADLL µLªk¦@¥ÎÅܼơA¦Ó¥²¶·±Ä¥Î¦p memory-mapped file ©Î¨ä¥L¤è¦¡¨Ó¸Ñ¨M¡A¤]¬O­n¦Ò¼{ªº¡C

¦Ü©óµe­±¦@¥Î¡A§ÚÃÙ¦P±zªº¬Ýªk¡A¨Æ¹ê¤W¡A§Úªºµ{¦¡¤j¶q¨Ï¥Îµøı¤ÆªºFormÄ~©ÓÃö«Y¡A¥H½T«O¾Þ§@¤¶­±ªº¤@­P©Ê¡C
¶¶«K¤@´£¡AKylix ·|¹ê°µ Linux Shared Object, ¤]´N¬O¹³ DLL ªºªF¦è¡A·Q½Ð±Ð¼ô Linux ªºªB¤Í .so ¬O§_¥i¥H¹³ package ¤@¼Ë¦@¨É¥þ°ìÅܼÆ?

Regards,
Michael Tsai

3-23-2000, James Fu:

Dear Friend :
> - ¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@µ{¦¡¸ü¤Jªº³t«×¡C
¹ï©ó³o¤@ÂI­Ó¤H¦³¨Ç¤£¦Pªº¬Ýªk¡A¤ñ¤è»¡¦b¨Ï¥Î¤Á³Îªº¤è¦¡¡A·íµ{¦¡¦b°õ¦æ®É¦pªG¬O±Ä¥Î°ÊºA¸ü¤Jªº¤è¦¡ªº¸Ü¡A¨º³t«×·|¤ñ Complier ¦b¤@°_ºC¤£¤Ö¡A°O¾ÐÅé¤è­±¡AComplier ¦b¤@°_ªº®É­Ô¤]³\­è°õ¦æªº®É­Ô·|¦ûªº¤ñ¸û¦h¡A¦ý·í±Ä¥Î°ÊºA¸ü¤J®É¦pªG±N©Ò¦³ªº³£¸ü¤J®É¡A¤£¨£±o¦ûªº°O¾ÐÅ餣¨£±o·|¤ñ¸û¤Ö¡C
¦ý¦pªG¾ã­Ó¨t²Î¦³¤W¦Ê°¦µ{¦¡¡A¦Ó¨C¦¸°õ¦æ®É¥i¯à¥u·|¥Î¨ì³¡¤Àªºµ{¦¡®É¡A¦b³o¼Ëªº±¡ªp¤U¤]³\·|¤ñ¸û¬Ù°O¾ÐÅé¡C

>...¦ü¥G¨S¦³¯ÊÂI:)
À³¸ÓÁÙ¬O¦³¡A¤ñ¤è»¡¬[ºc´N·|¤ñ¸û½ÆÂø¡A¤½¥ÎÅܼƪº³B²z¡A¤j¶q°Ñ¼Æ¶Ç»¼¡Aª«¥óªº¦@¥Î¡AMDI ¸û¤£®e©ö°µµ¥¡C³o¨ÇÀ³¸Ó¥i¥Hºâ¬O¯ÊÂI§a : P

>¦pªG¥Î Delphi ¤Î BCB ¶}µoªº¸Ü¡A­Ó¤Hı±oÁÙ¬O¥Î Package
>ªº¤è¦¡¤Á³Î·|¤ñ¸û»´ÃP¡A¥D­n¬O¦]¬°¦b¥Dµ{¦¡»P¦U¼Ò²Õ¤§
>¶¡«Ü¦³¥i¯à»Ý­n¶Ç»¼°Ñ¼Æ¡A¦Ó³o¨Ç°Ñ¼Æ¥i¯à¬O VCL ª«¥ó¡A
>¨Ï¥Î DLL ªº¸Ü·|¤ñ¸û³Â·Ð¡C¥t¥~¡ADLL µLªk¦@¥ÎÅܼơA¦Ó
>¥²¶·±Ä¥Î¦p memory-mapped file ©Î¨ä¥L¤è¦¡¨Ó¸Ñ¨M¡A¤]¬O­n
>¦Ò¼{ªº¡C
§Ú­Ó¤H­Ë¬O¤ñ¸û°¾¦V¨Ï¥Î DLL ªº¤è¦¡¡A¨Ï¥Î Package ªº¸Ü¡A¨º¥u¯à°µ¨ì¤Á³Îµ{¦¡®É©Ò¦³µ{¦¡³£¬O¨Ï¥Î¦P¤@®M¶}µo³nÅé¡A¦ý¨Ï¥Î DLL ´N¤ñ¸û¨S¦³³o¼Ëªº­­¨î¡A´N¹³ WinAMP ¥i¥H´£¨Ñ¤@¨Ç¤¶­±¥~±¾¨ä¥L¤H©Ò¼gªºªF¦è¤@¼Ë¡C
§Ú¤£¼ô Linux¡A¦ý¦pªG­n°µ¨ì³B²z¦@¥ÎÅܼơA¨ä¹ê DLL ¤£¨£±o­n¥Î¨ì¹³ memory-mapped file ¨º»ò½ÆÂøªº¤è¦¡¤~¦³¿ìªk°µ¨ì¡A¥i¥H§Q¥Î¹³ RTTI ©Î¬O¤@¨ÇÄ~©Óªº§Þ¥©¡A¤]¬O¥i¥H«Ü®e©öªº°µ¨ìªº¡C
­Ó¤H¤@ÂI²L¨£¡AÁÙ±æ¤j®a¦h¦hµ¹¤©«ü±Ð....

James Fu

3-25-2000, Michael Tsai:

Hello, James:

> > - ¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@µ{¦¡¸ü¤Jªº³t«×¡C
> ¹ï©ó³o¤@ÂI­Ó¤H¦³¨Ç¤£¦Pªº¬Ýªk¡A¤ñ¤è»¡¦b¨Ï¥Î¤Á³Îªº¤è¦¡¡A·íµ{¦¡
> ¦b°õ¦æ®É¦pªG¬O±Ä¥Î°ÊºA¸ü¤Jªº¤è¦¡ªº¸Ü¡A¨º³t«×·|¤ñ Complier ¦b¤@°_ºC¤£¤Ö
> ¡A°O¾ÐÅé¤è­±¡AComplier ¦b¤@°_ªº®É­Ô¤]³\­è°õ¦æªº®É­Ô·|¦ûªº¤ñ¸û¦h¡A¦ý·í
> ±Ä¥Î°ÊºA¸ü¤J®É¦pªG±N©Ò¦³ªº³£¸ü¤J®É¡A¤£¨£±o¦ûªº°O¾ÐÅ餣¨£±o·|¤ñ¸û¤Ö¡C
> ¦ý¦pªG¾ã­Ó¨t²Î¦³¤W¦Ê°¦µ{¦¡¡A¦Ó¨C¦¸°õ¦æ®É¥i¯à¥u·|¥Î¨ì³¡¤Àªºµ{¦¡®É¡A¦b³o
> ¼Ëªº±¡ªp¤U¤]³\·|¤ñ¸û¬Ù°O¾ÐÅé¡C

¶â¡Aªº½T¦³³oºØ±¡ªp¡C¤£¹L¡A§Ú­Ì¥ý´N°Ê¾÷¨Ó¬Ý¬Ý¡A·í§Ú·Q­n±Nµ{¦¡¤Á³Î¦¨¼Æ­Ó¿W¥ß¼Ò²Õ®É¡A¥D­nªº­ì¦]¬O¾ã­Ó±M®×¤Ó¹LÃe¤j¤F¡A¦pªG¥þ³¡ªºµ{¦¡½sĶ¦¨¤@¤ä°õ¦æÀÉ¡A¤£¦ý¸ü¤J®É¶¡ªø¡A¦Ó¥BÁÙ¨S¥Î¨ìªº¥\¯à´N¤w¸g¸ü¤J°O¾ÐÅé¸Ì­±¡A§Î¦¨®ö¶O¡A¹ï§Ú¨Ó»¡¡A¨Ï¥Î package ªº°Ê¾÷¤§¤@´N¬O­n§ïµ½¤W­zªº¯ÊÂI¡A©Ò¥H¤@©w¤£·|¦bµ{¦¡¸ü¤J®É´N§â©Ò¦³¼Ò²Õ³£¸ü¶i¨Ó¡]¤£µM°®¯Ü¥ÎÀRºA³sµ²¦¨¤@¤ä°õ¦æÀÉ¡^¡A§_«h¡A¨S¨É¨ü¨ì°ÊºA¸ü¤J¼Ò²Õªº¦n³B¡A¤Ï¦ÓÁÙ±o³B²z¤@°ï¦@¨ÉÅܼƤΨ禡¶Ç°Ñ¼Æµ¥°ÝÃD¡Aµ¥©ó¦Û¤v§ä³Â·Ð¡C
¦]¦¹¦b³o­Ó«e´£¤U¡A±z©Ò´y­zªº±¡ªp¤£¨£±o·|µo¥Í¡A¦p¦P¦³¤H°Ý¹L¡A±M®×¦ó®ÉÀ³¸Ó³sµ² runtime package¡Aµª®×µø±¡ªp¦Ó©w¡A¦pªG§Aªºµøµ¡¨t²Î¤¤¥u¦³¤@¤ä Delphi 5 ªº°õ¦æÀÉ¡A¨º»ò±z¤]³\·|¥ÎÀRºA³sµ²¡A§_«h§â©Ò¦³¥Î¨ìªº package ¥[¥[°_¨Ó©Ò¦ûªººÏºÐªÅ¶¡¤@©w¤j©ó¤@¤ä°õ¦æÀɪº size¡A¦û¥Îªº°O¾ÐÅé¥i¯à¤]¸û¦h¡A¬Û¤Ï¦a¡A·í¨t²Î¤¤¦w¸Ë¦h­Ó Delphi AP ®É¡A°ÊºA³sµ²À³¸Ó·|¬Oµª®×¡C¦Ó¦b§Ú¹ê»Ú¼¶¼gªº±M®×¤¤¡A¤]´X¥G¥þ³¡³£¬O¨Ï¥Î runtime package¡C

§Ú¬Û«H Package ªº³]­pªº½T¯à°÷Åýµ{¦¡®v¶}µo¥X¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@¸ü¤J³t«×ªºµ{¦¡¡A¦ý¦nªº¤u¨ã¤£¤@©w¯à³y´N¥X¦nªº²£«~¡A¤u¨ãªº¹B¥Î¬O§_±o©y¡A¦s¥G¤@¤ß¡C
¨º»ò¡A§Ú·QÀ³¸Ó±N¤W­±¨º¥y¥[¤W¦ý®Ñ¡A§ï¦¨³o¼Ë¡G

- ¦pªG¹B¥Î±o©y¡A¥i¥H¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@µ{¦¡¸ü¤Jªº³t«×¡C

> >...¦ü¥G¨S¦³¯ÊÂI:)
> À³¸ÓÁÙ¬O¦³¡A¤ñ¤è»¡¬[ºc´N·|¤ñ¸û½ÆÂø¡A¤½¥ÎÅܼƪº³B²z¡A¤j¶q°Ñ¼Æ
> ¶Ç»¼¡Aª«¥óªº¦@¥Î¡AMDI ¸û¤£®e©ö°µµ¥¡C³o¨ÇÀ³¸Ó¥i¥Hºâ¬O¯ÊÂI§a : P

ºâ :)
¯uªº¬O¦³±o¥²¦³¥¢¡C

> §Ú­Ó¤H­Ë¬O¤ñ¸û°¾¦V¨Ï¥Î DLL ªº¤è¦¡¡A¨Ï¥Î Package ªº¸Ü¡A¨º
> ¥u¯à°µ¨ì¤Á³Îµ{¦¡®É©Ò¦³µ{¦¡³£¬O¨Ï¥Î¦P¤@®M¶}µo³nÅé¡A¦ý¨Ï¥Î DLL ´N¤ñ
> ¸û¨S¦³³o¼Ëªº­­¨î¡A´N¹³ WinAMP ¥i¥H´£¨Ñ¤@¨Ç¤¶­±¥~±¾¨ä¥L¤H©Ò¼gªºªF¦è
> ¤@¼Ë¡C

ªº½T¡A¦ý¥Ñ©ó§Ú©Ò¼¶¼gªº¤j³£¬O¸ê®Æ®wÀ³¥Îµ{¦¡¡Aµ{¦¡­n¤Á¦¨¼Ò²Õ®É¤´·|¦³¤@©wªº¡]¤ñ¤u¨ã¨ç¦¡®w°ªªº¡^¬Û¨Ì©Ê¡A©Ò¥H¦b¤£©ö¬°¨ä¥Lµ{¦¡»y¨¥¨Ï¥Îªº±¡ªp¤U¡A¶É¦V¨Ï¥Î package ¦ü¥G¬O¥²µMªºµ²ªG?

> §Ú¤£¼ô Linux¡A¦ý¦pªG­n°µ¨ì³B²z¦@¥ÎÅܼơA¨ä¹ê DLL
> ¤£¨£±o­n¥Î¨ì¹³ memory-mapped file ¨º»ò½ÆÂøªº¤è¦¡¤~¦³¿ìªk°µ¨ì¡A
> ¥i¥H§Q¥Î¹³ RTTI ©Î¬O¤@¨ÇÄ~©Óªº§Þ¥©¡A¤]¬O¥i¥H«Ü®e©öªº°µ¨ìªº¡C
> ­Ó¤H¤@ÂI²L¨£¡AÁÙ±æ¤j®a¦h¦hµ¹¤©«ü±Ð....
>
§Ú­Ë§â RTTI µ¹§Ñ¤F¡A«Ý·|¸Õ¸Õ¯à§_¥Î RTTI ¸Ñ¨M±¼¤âÃ䪺¤@¨Ç°ÝÃD :)

Regards,
Michael Tsai

3-27-2000, James Fu:

Dear Michael :
> - ¦pªG¹B¥Î±o©y¡A¥i¥H¸`¬Ù°O¾ÐÅé¡A¨Ã¥B´£ª@µ{¦¡¸ü¤Jªº³t«×¡C

¦n¤[¨S¦³¤@«Ê«H¥´¨º»ò¦h¦r¤F¡A¸ò±z°Q½×¯uªº«Ü´r§Ö¡A¤]³\§Ú­Ì¥i¥H¦Ò¼{§â§Ú­Ì©Ò½Íªº³o³¡¤À¦A¥[¤W¤@¨Ç Sampe Code ©Î¬O Demo µ{¦¡¤§Ãþªº¡A¤½¶}¦bºô¸ô¤W¡C

> ªº½T¡A¦ý¥Ñ©ó§Ú©Ò¼¶¼gªº¤j³£¬O¸ê®Æ®wÀ³¥Îµ{¦¡¡Aµ{¦¡­n¤Á¦¨¼Ò²Õ®É¤´·|¦³
> ¤@©wªº¡]¤ñ¤u¨ã¨ç¦¡®w°ªªº¡^¬Û¨Ì©Ê¡A©Ò¥H¦b¤£©ö¬°¨ä¥Lµ{¦¡»y¨¥¨Ï¥Îªº±¡
> ªp¤U¡A¶É¦V¨Ï¥Î package ¦ü¥G¬O¥²µMªºµ²ªG?

§Ú­Ó¤H¤]´X¥G³£¬O¼g¸ê®Æ®wÀ³¥Îµ{¦¡(¬Ý¨Ó§Ú­Ì·d¤£¦n¬O¦P¦æ : P )¡A
¦]¬°³oÃþªºµ{¦¡¦³®É·|¦]¤£¦Pªº«È¤á¥[´î¤@¨Çµ{¦¡©Î¬O«È¤á­n¦Û¦æ¼¶¼g¤@¨Ç¯S®íªº¦U®×µ{¦¡¡A¬°¤F©È¦³¨Ç«È¤á¤£·|¥Î Delphi ¡A©Î¬O¥L­Ì·Q­n¥Î C++ ¤§Ãþªº¡A©Ò¥H·íªì§Ú­Ó¤H¦b¨M©w®É¡A´N·|¤ñ¸û°¾¦V DLL¡C¦ý¬O¼g¤F¤£¤Öµ{¦¡¤U¨Ó¡A¥Ñ©ó­Ó®×µ{¦¡³q±`©M¨t²Îªº¬Û¨Ì©Ê«Ü°ª( ¤ñ¤è»¡­n¦@¥Î Database ªº Session ¤§Ãþªº)¡A©Ò¥H´X¥G³£¬O¨Ï¥Î¦Pª©¥»ªº Delphi ¨Ó¶}µo¡A¦b³o¼Ëªº±¡ªp¤U¦ü¥G©M¨Ï¥Î Package ¨S¤°»ò¤j¤£¤F¤F¡A©Ò¥H¥Ø«eÁÙ¬O¨Ï¥Î DLL ªº­ì¦]¥u¬O "§Æ±æ"´£¨ÑÅý¨ä¥Lªº Language ¼gªºµ{¦¡¤@¨Ö¥i¥H±¾¶i¨Ó¡C

James Fu

3-27-2000, Maxwell Lin »P Scott:

Maxwell:
¬Q¤Ñ¬Ý¤F¤j®aªº¹ï¸Ü¡A¤~ª¾¹D¦Û¤v¤å¤£¹ïÃD¡C«¢«¢¡A¤H³£¬O·|¦³¥ý¤J¬°¥Dªº·Qªkªº¡C
ÁÙ¬O°µ¤@¨Ç¸É¥R¡GÃö©ó¬Q¤Ñ©Ò´£¨ìªº¨º¨Ç¤èªk»P¹ê§@¡A¨ä¹ê¬OOO pascalªºª½±µ¹B¥Î¡C
¤ñ¦p»¡

¦bTBaseForm¤¤¡A§Ú­Ì©w¸q°ò¥»ªºform¡AµM«áµ¹TBrowserEditForm¡ATMasterDetailFormµ¥¨ÓÄ~©Ó¡A©ó¬O·íTBaseForm¦³©Ò§ó°Ê®É¡ATBrowserEditFormµ{¦¡½X­«½sĶ§Y¥i§¹¦¨¬ÛÃöªº­×§ï¡C

¤£¹L¡A¼g³o¨Çµ{¦¡½X®É¦³¨Ç¦³½ìªº¤u§@­n°µ¡G¥Ñ©óDelphi¦n¹³¨S¦³ª½±µªº¾Þ§@¤¶­±Åý±z¿ï¾ÜTBaseForm¡A©Ò¥H»Ý­n¤@¨Ç¤â¤ucoding¡C¥H«e§Ú¤]¥Î¦P¼Ëªº¤è¦¡¹B§@¡A¦ý¬O«á¨Óı±o¹ï¤½¥q¨Ã¨S¦³ª½±µ©úÅ㪺À°§U¡A´N¨S¦³°í«ù³oºØ§@ªk¡C(¦ý¹ï©ó¤@¨Ç¤£¥i¨£¤¸¥óªº³]­p»P¨Ï¥Î¡A§Ú´N¥ÎÆZ¦hÄ~©Óªº¥\¯à¡C)

Scott:
¨Æ¹ê¤W¡A¥i¨Ï¥ÎRepositoryªº¤è¦¡¡A´N¥i¥H±NTBaseForm¦s¤J¤@¥¹­n¨Ï¥Î®É¡Aª½±µ¥ÎFile->New§Y¥iª½±µÄ~©Ó¨ú¥Î¡A°w¹ï³o­Ó°ÝÃD¡A¨Æ¹ê¤W¡A§@­ÓExpert¥i¯à¬O­Ó¤ñ¸û¤è«Kªº°µªk¡C

Maxwell:
¥ÎDLL»PPackage¨ä¹ê¬O¥t¥~¤@­Ó­«­nªºÄ³ÃD¡A°ò¥»¤W¥L²o¯A¨ì§@·~¨t²Î¦p¦óºÞ²zµ{¦¡¡A¦Ó¤£¬O³æ¯Âªºµ{¦¡½X¡C§Úı±o¦pªG³sDLL³£­n¦³Ä~©Óªº¥\¯à¡A¥i¯à¬O«Ü¤[¥H«áªº¨Æ¡C§Ú°¾¦Vcom+¤¸¥ó + MTSªº¹B§@¼Ò¦¡¡C§Q¥ÎMTSºÞ²zcom+¤¸¥ó¡A¹ï¤½¥q¤é±`ªº¸ê°T¤u§@¤À¤u¦³©úÅ㪺À°§U¡C

Scott:
°w¹ï³o­Ó°ÝÃD¨Ó»¡¡A³Ì¥D­nªº°ÝÃD¦b©ó¼Ð·Ç³W®æªº¤£½T©w©Ê¡A ¤§«eCORBA¥sªº¾_¤Ñ»ùÅT¡A «á¨ÓCOM¥X¨Ó¤§«á¡A¥sªº¤H´N¤Ö¤F¡A¦ÓDCOM²{¦b¤S¥sªº³Ì¤jÁn¡A¤@¦¸¤S¤@¦¸ªº³W®æÅܤÆ(©ÎEnhance)¡AÅý°l·s§Þ³NÅܦ¨¬O¥ó­·ÀI«Ü¤jªº¨Æ¡C

Maxwell:
¹ï©ó¤½¥q¹B§@¨ä¹ê¬O¦³³o¼Ëªº¬yµ{¡y¤ÀªR->¬[ºc->¹ê§@->ºÞ²z¡z¡A¤ÀªR¤u§@¦p¦óÂà¤Æ¦¨¹ê§@¡H¡I¤å¥ó¦p¦ó¼¶¼g¡H¡Iµ{¦¡½X¤S¦p¦ó§Q¥ÎÄ~©Ó¨ÓºÞ²z¡H³o¨Ç¤u§@³Ì¦n³£¯à°÷¼Ð·Ç¤Æ¡C³o¼Ë¹ï©ó¤é±`¤u§@¤~¯à¥iªø¥i¤[¡C

Scott:
²`¦³¦P·P¡A¦pªG¬O¸ê®Æ®wÀ³¥Îµ{¦¡¡ATableªº³W®æ¡A¬Û¤¬ªº¤Ä½]µ¥µ¥ªºªF¦è¡A¦pDFD¡AData Dictionary¤§ÃþªºªF¦è¥i¯à¤ñµ{¦¡§ó­«­n¡C

´N§Ú­Ó¤Hªº·Qªk¨Ó»¡¬O¤ñ¸û°¾¦V¨Ï¥ÎDLL¥H¤Îµ{¦¡¤¤ªºÄ~©Ó¨Ó°t¦X¡A­ì¦]¦b©óPackage¥i¯à¦]Delphiªº§ïª©¦ÓÅÜ°Ê(Delphi3¬O*.dpl¡A4,5¬O*.bpl)¦]¦Ó»Ý­n­«Build¡A­·ÀI©Ê¤Ó¤j¡A¤×¨ä¬O¦b¸ê°T¤H­û¬y°Ê©Ê¦p¦¹°ªªº²{¹êª¬ªp¤U¡A§ïª©´X¥Gµ¥©ó­«¼g¡A¦ÓDLLÁöµM¼g§@¤W¤ñ¸û³Â·Ð¡A¦ý¥H«áºûÅ@¤Wµ´¹ï¬O¤ñ¸û¤è«K¡A¥Ñ©óDLL´X¥G¬O­Ó¼Ð·Ç¡A¥u­n¿í¦u¤@©wªº·Ç«h¡A¨Ã¤£·|¦]¬°Delphi§ïª©´N¤£¯à¥Î¦Ó­n­«·sBuild¡C

°t¦XDLLªº¨Ï¥Î¡ARTTI¦ü¥G¤]¬O­Ó¸Ñ¨M¤è¦¡¡A¦ý¦b¨C¥»°÷¥÷¶qªºDelphi®Ñ¤¤³£¦A¤T´£¿ôRTTIÅܰʪº¥i¯à©Ê¡A¤£¹L¡A¥]¶iDLLÀ³¸Ó¨S¦³³o­Ó°ÝÃD¡C

¦Ü©ó¦@¥ÎDLLªº°ÝÃD¡A¨Æ¹ê¤W¡A®Ú¾Ú¤j¦h¼Æ¤Hªº¸gÅç¬O¤£¤Ó¥i¯àªº¡C­ì¦]¬O¦Û¤v¨S¿ìªk±±¨î¡A­ì¦]¦b©óDLL¤º³¡¨ç¦¡³B²zªº°Ê§@¨ÃµLªk³z©ú¤Æ¡AÁöµM¦bOO ±j½Õ«Ê¸Ë¡A¦ý¤@¥¹§@¨ì¤ñ¸û²Ó¶µªº±±¨î®É¡Aµ{¦¡ªº¥i±±¨î©Ê¬O¤Q¤À­«­nªº¡C

­Ó¤Hªº¸gÅç¬O¦b¦Û¤vDebug¥b¤Ñ¤§«áµo²{¦Û¤vªºµ{¦¡¨S¦³°ÝÃD¡A¦Óµo²{°ÝÃD¥i¯à¥X¦b¨ä¥Lªº°ÝÃD(¦pAPI¡AProgram¡ADriver......) µ¥µ¥¡A¬°¤Fí©w©Ê¡A¦ü¥G°£¤F¦Û¤v­«¼g¨Ó±±¨î¸ê®Æ¥H¥~¡A¤]¨S¦³¥t¥~ªº¸Ñ¡C

¼gµ{¦¡¼g¨ì«á¨Ó¡A§Ú´X¥G¤£¤Ó´±¨Ï¥Î§O¤H¼gªº¤¸¥ó©Î¬O«D¼Ð·Ç¤¸¥ó¡A·íµM³o¤w¸g¬OÃD¥~¸Ü¤F......¡C

http://geocities.datacellar.net/huanlin_tsai/

1