dll錯誤訊息--invalid pointer opertion |
尚未結案
|
Ivy_chen
一般會員 ![]() ![]() 發表:3 回覆:5 積分:1 註冊:2003-01-15 發送簡訊給我 |
請問各位高手 為何呼叫dll後會出現invalid pointer opertion 訊息?我所寫的DLL如下: library telcond;
uses
SysUtils,
Classes,
telcon in 'telcon.pas'; {$R *.RES} exports
tranchn; begin
end. --------------------------------------------------------------------
unit Unit1; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls; type
TForm1 = class(TForm)
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; procedure tranchn(var v: string; var C1:STRING; var C:STRING); external 'telcond.DLL'; implementation {$R *.dfm}
.............. 請幫幫忙! 謝謝!
|
william
版主 ![]() ![]() ![]() ![]() ![]() 發表:66 回覆:2535 積分:3048 註冊:2002-07-11 發送簡訊給我 |
If you want to use string in your dll, you should uses ShareMem in both your dll and your main application and it should be the very first unit to be used. However I would recommend using PChar instead of string since it could be used with other development tools. 發表人 - william 於 2003/05/20 11:11:19
|
Ivy_chen
一般會員 ![]() ![]() 發表:3 回覆:5 積分:1 註冊:2003-01-15 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |