Вниз
Скачать: 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.45 MB
Время: 0.011 c
4-56392
Mazenrat
2002-08-31 16:51
2002.10.17
Как зарегистрировать гарячие клавиши в приложении???


3-55946
Stas_Tuz
2002-09-25 10:22
2002.10.17
Проблема с транзакциями.


1-56101
tenzor
2002-10-08 23:25
2002.10.17
Русский текст в консольных приложения


1-56047
^Sanya
2002-10-07 23:49
2002.10.17
DLLs: Invalid Pointer Operation


3-55933
SOFTMASTER
2002-09-18 10:09
2002.10.17
ПОМОГИТЕ!!!!




   Наверх