| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- library DataProvider;
- { 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,
- Windows,
- System.SysUtils,
- System.Classes,
- Vcl.Forms,
- BaseDataModule in 'BaseDataModule.pas' {BaseDataModel: TDataModule},
- InterfaceDataProvider in 'InterfaceDataProvider.pas',
- AppNoticeProvicer in 'AppNoticeProvicer.pas',
- AppIcon in 'AppIcon.pas',
- BaseDataProvider in 'BaseDataProvider.pas',
- DataProviderImport in 'DataProviderImport.pas',
- MapTeamUsers in 'Team\MapTeamUsers.pas',
- TeamDBProvider in 'Team\TeamDBProvider.pas',
- DataModel in 'DataModel.pas',
- UsersDBProvider in 'Users\UsersDBProvider.pas',
- HashDBProvider in 'HashDBProvider.pas',
- UsersHashProvider in 'Users\UsersHashProvider.pas',
- DataModule in 'DataModule.pas',
- Config in 'Config.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---------------------DataProvider');
- // DLL_PROCESS_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_PROCESS_ATTACH---------------------DataProvider');
- // DLL_THREAD_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_THREAD_ATTACH---------------------DataProvider');
- // DLL_THREAD_DETACH:OutputDebugString('---------------------DLL_THREAD_DETACH---------------------DataProvider');
- // end;
- if Reason = DLL_THREAD_ATTACH then
- IsMultiThread := True;
- if Assigned(OldDllProc) then
- // begin
- OldDllProc(Reason);
- // OutputDebugString('ÓÐOldDllProc');
- // end
- // else
- // OutputDebugString('ÎÞOldDllProc');
- end;
- begin
- OldDllProc := DllProc;
- DllProc := ThisDllProc;
- ThisDllProc(DLL_PROCESS_ATTACH);
- BeanFactory.RegisterBean('DataModule', TDataModule, True);
- BeanFactory.RegisterBean('AppIconProvider', TAppIconProvider, True);
- BeanFactory.RegisterBean('UsersHashProvider', TUsersHashProvider, True);
- BeanFactory.RegisterBean('MapTeamUsersProvider', TMapTeamUsersProvider, True);
- BeanFactory.RegisterBean('ConfigProvider', TConfigProvider, True);
- end.
|