为什么我的程序有报错:Invalid point operation(64分)

  • 主题发起人 主题发起人 hksoobe
  • 开始时间 开始时间
H

hksoobe

Unregistered / Unconfirmed
GUEST, unregistred user!
我怎么也找不到原因就一个很简单的程序,网上的一个MD5加密单元我把他做成了DLL再用EXE调用他就报错:Invalid point operation我已经把它上传到网上,有哪位朋友可以帮我看看啊!
下载地址:http://haoad.rmb178.com/test/md5.rar
不好意思我已经没有分了全给你们了就64分。
 
你把ShareMem加入到你的Dll工程和Exe工程里面, 问题解决。 如:
library md5dll;

uses
ShareMem,//必须要加的
SysUtils,
Classes,
MD5Real in 'MD5Real.pas';

exports
RivestStr,
RivestFile;
end.

program md5exe;

uses
ShareMem,//....
Forms,
Unit1 in 'Unit1.pas' {Form1};

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
 
MD5加密单元我把他做成了DLL
吃饱了没事干。
 
我就是随便弄弄然后就出问题了嘛!我不这样乱弄我还不会有问这问题的机会呢!遇到问题不好吗?解决了下次就不会有同样的问题了嘛!
 
cking331我加了ShareMem是在按按钮的时候不会报错了,可是我把程序关了就又报错了!
 
把所有传入的string 全部改成pchar
 
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.
 
还是不行啊!
 
谢谢!已经解决了!
 
后退
顶部