程序为:
library rundll;uses
Windows,
forms,
Messages,
SysUtils;
{$R *.res}procedure showmess; stdcall; export;
begin
application.messagebox('哈哈,可以用了!','提示',64);
end;exports
showmess ;
beginend.用RUNDLL32.exe rundll.dll,showmess执行,可正常运行,点“确定”后就出现RUNDLL32错误
出错的信息:RUNDLL32 在 00de:00000005 的模块
<未知> 中导致无效页错误。
Registers:
EAX=00000000 CS=018f EIP=00000005 EFLGS=00010287
EBX=81dff6f6 SS=0197 ESP=0063fde0 EBP=00000001
ECX=30b472ef DS=0197 ESI=00400000 FS=6fd7
EDX=bffc9a90 ES=0197 EDI=00000f28 GS=0000
Bytes at CS:EIP:
10 00 00 71 01 00 00 65 04 70 00 65 04 70 00 54
Stack dump:
00400000 00000000 81dff6f6 00000001 81e01c4c 00000044 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
library rundll;uses
Windows,
forms,
Messages,
SysUtils;
{$R *.res}procedure showmess; stdcall; export;
begin
application.messagebox('哈哈,可以用了!','提示',64);
end;exports
showmess ;
beginend.用RUNDLL32.exe rundll.dll,showmess执行,可正常运行,点“确定”后就出现RUNDLL32错误
出错的信息:RUNDLL32 在 00de:00000005 的模块
<未知> 中导致无效页错误。
Registers:
EAX=00000000 CS=018f EIP=00000005 EFLGS=00010287
EBX=81dff6f6 SS=0197 ESP=0063fde0 EBP=00000001
ECX=30b472ef DS=0197 ESI=00400000 FS=6fd7
EDX=bffc9a90 ES=0197 EDI=00000f28 GS=0000
Bytes at CS:EIP:
10 00 00 71 01 00 00 65 04 70 00 65 04 70 00 54
Stack dump:
00400000 00000000 81dff6f6 00000001 81e01c4c 00000044 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
解决方案 »
- 关于数据表的存放
- 速结~~~
- access violation问题
- 谁有TreeView控件属性方法的介绍?怎样动态加载节点?
- 请问:一个Ttable中的数据,怎么按某个字段生成连续的 报表?比如按名字,
- 请问InstallShield 6.3中怎样做卸载的快捷?高手指点!
- Delphi7 MapX4 实现对MapX4加载的图层进行查询
- 怎么样使运行的程序最小话后在系统托盘区,就是和输入法在一起的系统托盘区
- [Mircosoft][ODBC SQL Server Dirver]超时已过期!错误代码:-2147217871
- Delphi中如何调用Matlab的函数?
- 我又有问题了,关于进程的问题呀,大家快来帮忙。很感谢大家,在这里我学到很多!
- 有关进程的问题,大虾请进。。。。。
改為 ShowMessage('XXX');
呢??uses Dialogs;
可正常运行,点“确定”后就还是出现RUNDLL32错误XXSingle(水连天) 我加了还是出错了
export
...
begin
Application.Initialize;
end.
或者,按naughtyboy的建议,应该也可以。简单一点,可以这么写:
MessageBox(nil, '哈哈,可以用了!','提示',MBxxx);
试过了,不行的
2000 用RUNDLL32.exe rundll.dll,showmess执行 出错,
出现“rundll32.exe-应用程序错误”
提示“"0x00000000"指令引用的"0x00000000"内存。该内存不能为"read"。”
98 用RUNDLL32.exe rundll.dll,showmess执行 出错,
出现rundll出错
提示“装载rundll.dll时出错,找不到运行此应用程序所需的某个库文件。”
library mydll;{ 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
SysUtils,Dialogs,
Classes;
procedure showmess; stdcall; export;
begin
MessageDlg('哈哈,可以用了!', mtInformation,[mbOk], 0);
end;
{$R *.res}
exports
showmess ;
beginend.
你那样的,在98一定和我一样的错误,
你的程序在2000不会错,我的也一样
application.handle := handle; 此句可选加入,这样就会使它门处于同一个进程中。
ShowMessage("js;lf");绝对不会报错。
library mydll;{ 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
SysUtils,Dialogs,
Classes;
procedure showmess;
begin
MessageDlg('哈哈,可以用了!', mtInformation,[mbOk], 0);
end;
{$R *.res}
exports
showmess ;
beginend.在98下还是会出错的。
不信你试一下。真搞不明白3721 是怎么搞出来,不会出错的。
郁闷中
DLL连FORM都能SHOW,何况是个消息呢。