在EXE里定义输出函数
DLL里一个tchickbox改变 则调用EXE里函数 改变值!
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1};
{$R *.res}
Exports
ChangeChick;
begin
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
////////////////////////////////
Unit Unit1;
{$I SetOption.INC}
Interface
Uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, shellapi,
Controls, Forms, Dialogs, StdCtrls, ComCtrls;
Type
TForm1 = Class(TForm)
Edit1: TEdit;
Private
{ Private declarations }
Public
{ Public declarations }
End;
Procedure ChangeChick(ChickBool:Boolean); //Stdcall; Export;
Var
Form1: TForm1;
CB: Boolean;
Implementation
{$R *.dfm}
Procedure ChangeChick(ChickBool:Boolean);
begin
CB:=ChickBool;
end;
End.