Вниз
Скачать: CL | DM;

Форма в DLL.   Найти похожие ветки 

← →
Осирис ©   (2002-10-07 10:55) [0]

Пытаюсь поместить в DLL форму и вызывать эту форму из своей программы. Делаю так:

DLL:

library frmdll;

uses
SysUtils,
Classes,
one in "one.pas" {Form1};

function CreateTheForm: Pointer; Export;
begin
Result := TForm1.Create(nil);
end;

{$R *.res}
Exports
CreateTheForm INDEX 1;

begin
end.


Программа,вызывающая форму:


unit FormDLL;

interface
function FormMe : Pointer; external "frmdll.dll" index 1;
implementation

end.

unit two;

interface

uses
ShareMem, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FormDLL;

type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
FormMe;
end;

end.

При запуске программы выскакиевает Access Violation и окошко CPU. Что я делаю не так ?


← →
Осирис ©   (2002-10-07 11:39) [1]

Разобрался. Невнимательность - dll не туда положил.



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.44 MB
Время: 0.015 c
3-56019
saxon
2002-09-25 18:30
2002.10.17
TTable.Refresh


1-56051
DeMoN-777
2002-10-07 18:06
2002.10.17
TStringList


3-55966
Bishop
2002-09-25 11:56
2002.10.17
Можно ли отменить выполнение запроса в InterBase?


14-56328
DaruDe
2002-09-23 14:43
2002.10.17
Измена


1-56213
ksan
2002-10-07 20:12
2002.10.17
завершение программы




   Наверх