| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- library CA;
- { 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,
- JITAuth in 'jitProtocol\JITAuth.pas',
- CAConfig in 'CAConfig.pas',
- InterfaceCA in 'InterfaceCA.pas',
- CAImport in 'CAImport.pas',
- JITComVCTKLib_TLB in 'jitProtocol\JITComVCTKLib_TLB.pas',
- TestAuth in 'TestAuth.pas',
- SCZTCA in 'SCZTCA.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---------------------CA');
- DLL_PROCESS_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_PROCESS_ATTACH---------------------CA');
- DLL_THREAD_ATTACH:OutputDebugString('+++++++++++++++++++++DLL_THREAD_ATTACH---------------------CA');
- DLL_THREAD_DETACH:OutputDebugString('---------------------DLL_THREAD_DETACH---------------------CA');
- 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(CACONFIG_BEANNAME, TCAConfig);
- BeanFactory.RegisterBean('JITCAClient', TJITAuth);
- BeanFactory.RegisterBean('TestCAClient', TTestAuth);
- BeanFactory.RegisterBean('STCAClient', TSTCAClient);
- end.
|