This sample uses 2 DLLs - which illustrate usage of simple functions and forms in DLLs with EurekaLog.
Both DLLs are compiled with "Standalone DLL" application type, which means EurekaLog code will be injected in each DLL.
Therefore, such DLL are autonomous and can be used in both EurekaLog-enabled host and non EurekaLog-enabled host.
DLL with forms is the same "Standalone DLL", but with additional "Forms" hook installed: see Advanced/Code/Hooks for various options.
Note: "Standalone DLL" with "VCL Forms" hook is essentially the same as "VCL Forms Application".
An important consideration when creating standalone DLL: never let exception leave your DLL.
Always place try/except block around each exported functions and any other published code (such as callback functions).
Note: try/except block may be implicit - for example, you can use compiler's magic provided for the safecall keyword.
You should handle each exception within DLL and report "failure" state to the caller (the host).
There are many different ways to do this. This sample illustrates 3 common approaches:
1. Simple Success/Failure flag ("Flag" button).
2. Win32 error codes ("Win32" button).
3. HRESULT (3 "HRESULT" buttons and "Interface" button).
Note: please note that HRESULT does not require COM. You don't need to initialize COM to work with HRESULT.
This sample uses ComObj unit only for convenience, as it provides EOleSysError exception class with additional features for automatic safecall handling.
You can write your code without ComObj unit, if you want to.
HRESULT may be implemented in the following ways (all ways are illustrated in this sample):
1. Uncontrolled HRESULT (managed by RTL's safecall, 1st "HRESULT" button).
2. Customized HRESULT for routines (explicit try/except block, 2nd "HRESULT" button).
3. Customized HRESULT for methods (overriding SafeCallException method, "Interface" button).
For each combination of the above mentioned method, you have to decide how you want to handle bug report for DLL exception.
There are many possibilities. This sample illustrates the following:
1. Do not show bug report dialog, save bug report file. This is most common solution, it is used by "Flag", "Win32", 1st and 2nd "HRESULT" buttons.
2. Do not show bug report dialog, pass call stack to the caller. This solution is used by 3rd "HRESULT" button and "Interfaces" button (but the two buttons implement a slightly different variation).
3. Show bug report dialog AND return failure to the host. This may be a bad idea, as error will be reported twice - by DLL and by host, but this solution may work well in some specific situations. This solution is illustrated by forms DLL (use "Raise Error" button to see it in action).
For more detailed information:
- See source code of this sample;
- See EurekaLog's help: "Advanced topics" / "Using EurekaLog in DLL" ( http://www.eurekalog.com/help/eurekalog/dll_using_eurekalog.php )
没有合适的资源?快使用搜索试试~ 我知道了~
EurekaLog-v7.10.1.0,for delphi xe
共2000个文件
dcu:789个
pas:624个
res:116个
需积分: 5 2 下载量 20 浏览量
2023-08-30
14:12:22
上传
评论 1
收藏 204.42MB RAR 举报
温馨提示
EurekaLog_v7.10.1.0,for delphi xe
资源推荐
资源详情
资源评论
收起资源包目录
EurekaLog-v7.10.1.0,for delphi xe (2000个子文件)
FixPaths.bat 1KB
FixPaths.bat 763B
FixPaths.bat 611B
FixPaths.bat 609B
EurekaLogGroup.bdsgroup 900B
EurekaLogGroup.bdsgroup 897B
ecc32Debug.bdsproj 9KB
ecc32.bdsproj 9KB
EurekaLogExpert.bdsproj 9KB
EurekaLogExpertDebug.bdsproj 9KB
EurekaLogComponentDebug.bdsproj 9KB
ecc32Debug.bdsproj 9KB
EurekaLogCoreDebug.bdsproj 9KB
EurekaLogComponent.bdsproj 9KB
ecc32.bdsproj 9KB
EurekaLogCore.bdsproj 9KB
EurekaLogComponentDebug.bdsproj 8KB
EurekaLogExpertDebug.bdsproj 8KB
EurekaLogCoreDebug.bdsproj 8KB
EurekaLogComponent.bdsproj 8KB
EurekaLogExpert.bdsproj 8KB
EurekaLogCore.bdsproj 8KB
default5.bmk 6KB
default6.bmk 6KB
EurekaLogGroup.bpg 991B
EurekaLogGroup.bpg 977B
EurekaLogGroup.bpg 977B
EurekaLogCore230.bpl 5.75MB
EurekaLogCore270.bpl 5.51MB
EurekaLogCore270.bpl 4.02MB
EurekaLogCore230.bpl 4.02MB
EurekaLogCore110.bpl 3.12MB
EurekaLogExpert230.bpl 1.97MB
EurekaLogExpert270.bpl 1.96MB
EurekaLogExpert110.bpl 1.79MB
EurekaLogComponent230.bpl 46KB
EurekaLogComponent270.bpl 45KB
EurekaLogComponent110.bpl 33KB
ecc32.cfg 1KB
ecc32.cfg 1KB
ecc32.cfg 1KB
ecc32.cfg 1KB
ecc32.cfg 1KB
EurekaLog.chm 14.78MB
Reference.chm 1.46MB
IDE.chm 1.32MB
EurekaLogViewer.chm 907KB
EMemLeaksBCB.cpp 27KB
EMemLeaksBCB.cpp 27KB
CCmdMainW.cpp 420B
CCmdMain.cpp 398B
ELCursor.cur 326B
ELCursor.cur 326B
EurekaLogCore.dcp 7.42MB
EurekaLogCore.dcp 7.41MB
EurekaLogCore.dcp 5.78MB
EurekaLogCore.dcp 5.76MB
EurekaLogCore.dcp 5.16MB
EurekaLogExpert.dcp 799KB
EurekaLogExpert.dcp 794KB
EurekaLogExpert.dcp 698KB
EurekaLogComponent.dcp 16KB
EurekaLogComponent.dcp 15KB
EurekaLogComponent.dcp 8KB
EClasses.dcu 1017KB
EClasses.dcu 1008KB
EClasses.dcu 636KB
EClasses.dcu 633KB
EOption.dcu 581KB
EOption.dcu 580KB
EClasses.dcu 552KB
EMantisConnectStub.dcu 499KB
EOption.dcu 474KB
ELogging.dcu 440KB
ELogging.dcu 433KB
EWinCrypt.dcu 420KB
EWinCrypt.dcu 394KB
EWinCrypt.dcu 393KB
ESysInfo.dcu 376KB
ESysInfo.dcu 370KB
EMantisConnectStub.dcu 330KB
EMantisConnectStub.dcu 328KB
EMemLeaks.dcu 324KB
EMemLeaks.dcu 323KB
EMantisConnectStub.dcu 286KB
ELogging.dcu 280KB
ELogging.dcu 277KB
ECallStack.dcu 266KB
EWinCrypt.dcu 264KB
EBaseClasses.dcu 262KB
ECallStack.dcu 259KB
EBaseClasses.dcu 258KB
ESysInfo.dcu 256KB
ESysInfo.dcu 253KB
EDialog.dcu 240KB
EMemLeaks.dcu 230KB
EExceptionManager.dcu 228KB
EMemLeaks.dcu 227KB
EExceptionManager.dcu 223KB
ESysInfo.dcu 212KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
依星net188.com
- 粉丝: 7598
- 资源: 1410
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功