| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- library Config;
- { 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,
- mybean.core.beanFactory,
- SysUtils,
- Classes,
- Windows,
- UIViewConfig in 'UIViewConfig.pas',
- BaseConfig in 'BaseConfig.pas',
- TestConfig in 'TestConfig.pas',
- InterfaceConfig in '..\Interfaces\InterfaceConfig.pas',
- ConfigImport in '..\Interfaces\ConfigImport.pas',
- HotKeyConfig in 'HotKeyConfig.pas',
- FaceConfig in 'FaceConfig.pas',
- FontConfig in 'FontConfig.pas',
- NetConfig in 'NetConfig.pas',
- ClientConfig in 'ClientConfig.pas',
- GroupConfig in 'GroupConfig.pas',
- GroupShareConfig in 'GroupShareConfig.pas',
- OfflineFileConfig in 'OfflineFileConfig.pas',
- AppCentreConfig in 'AppCentreConfig.pas',
- CaConfig in 'CaConfig.pas',
- BehaviorConfig in 'BehaviorConfig.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---------------------Config');
- DLL_PROCESS_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_PROCESS_ATTACH---------------------Config');
- DLL_THREAD_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_THREAD_ATTACH---------------------Config');
- DLL_THREAD_DETACH:OutputDebugString('---------------------DLL_THREAD_DETACH---------------------Config');
- 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(CONFIG_APPCENTRE, TAppCentreConfig, True);
- BeanFactory.RegisterBean(CONFIG_CLIENT, TClientConfig, True);
- BeanFactory.RegisterBean(CONFIG_FONT, TFontConfig, True);
- BeanFactory.RegisterBean(CONFIG_GROUP, TGroupConfig, True);
- BeanFactory.RegisterBean(CONFIG_GROUPSHARE, TGroupShareConfig, True);
- BeanFactory.RegisterBean(CONFIG_HOTKEY, THotkeyConfig, True);
- BeanFactory.RegisterBean(CONFIG_FACE, TFaceConfig, True);
- BeanFactory.RegisterBean(CONFIG_OFFLINEFILE, TOfflineFileConfig, True);
- BeanFactory.RegisterBean(CONFIG_NET, TNetConfig, True);
- BeanFactory.RegisterBean(CONFIG_UIVIEW, TUIViewConfig, True);
- BeanFactory.RegisterBean(CONFIG_CA, TCaConfig, True);
- BeanFactory.RegisterBean(CONFIG_BEHAVIOR, TBehaviorConfig, True);
- BeanFactory.RegisterBean(CONFIG_TEST, TTestConfig, True);
- end.
|