| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- library AppCentre;
- { Important note about DLL memory management: ShareMem must be the
- first unit in your library's USES clause AND your project's (select
- Project-View Source) USES clause if your DLL exports any procedures or
- functions that pass strings as parameters or function results. This
- applies to all strings passed to and from your DLL--even those that
- are nested in records and classes. ShareMem is the interface unit to
- the BORLNDMM.DLL shared memory manager, which must be deployed along
- with your DLL. To avoid using BORLNDMM.DLL, pass string information
- using PChar or ShortString parameters. }
- uses
- FastMM4,
- SysUtils,
- Classes,
- Windows,
- mybean.core.beanFactory,
- AppCentreForm in 'AppCentreForm.pas' {AppCentreFrm},
- UAppCentre in 'UAppCentre.pas',
- XXTEA in 'XXTEA.pas',
- AppsLayout in 'AppsLayout.pas',
- IdHttpEx in 'IdHttpEx.pas',
- FlatForm in 'FlatForm.pas',
- UIHandler in '..\Interfaces\UIHandler.pas',
- IconRequest in 'IconRequest.pas',
- MessageCentre in 'MessageCentre.pas' {MessageCentreForm},
- ChromeDebug in 'ChromeDebug.pas' {ChromeDebugForm},
- UApp in 'UApp.pas',
- AppCentreImport in '..\Interfaces\AppCentreImport.pas',
- InterfaceAppCentre in '..\Interfaces\InterfaceAppCentre.pas';
- {$R *.res}
- const
- DLL_PROCESS_DETACH = 0;
- DLL_PROCESS_ATTACH = 1;
- DLL_THREAD_ATTACH = 2;
- DLL_THREAD_DETACH = 3;
- var
- OldDllProc: TDLLProc;
- procedure ThisDllProc(Reason: Integer);
- begin
- case Reason of
- DLL_PROCESS_DETACH:OutputDebugString('---------------------DLL_PROCESS_DETACH---------------------AppCentre');
- DLL_PROCESS_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_PROCESS_ATTACH---------------------AppCentre');
- DLL_THREAD_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_THREAD_ATTACH---------------------AppCentre');
- DLL_THREAD_DETACH:OutputDebugString('---------------------DLL_THREAD_DETACH---------------------AppCentre');
- end;
- if Reason = DLL_THREAD_ATTACH then
- IsMultiThread := True;
- if Assigned(OldDllProc) then
- OldDllProc(Reason);
- end;
- begin
- OldDllProc := DllProc;
- DllProc := ThisDllProc;
- ThisDllProc(DLL_PROCESS_ATTACH);
-
- BeanFactory.RegisterBean(APPCENTRE_BEANNAME, TAppCentre);
- BeanFactory.RegisterBean(APPCENTRE_UIHANDLER, TUIHandler);
- end.
|