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

Использование компонент из DLL   Найти похожие ветки 

 
TVV   (2006-02-13 19:16) [0]

У меня есть компонент TCustomPanel мне надо создаь его из DLL
Код d DLL выглядит так:
procedure CreatePanel(Parent:TWinControl); stdcall;
var Panel:TCustomPanel;
.......
procedure CreatePanel(Parent:TWinControl);
begin
Panel:=TCustomPanel.Create(nil);
......
Panel.Parent:=Parent;
end;
Но при обращении к ней из приложения
procedure CreatePanel(Parent:TWinControl);stdcall; external "MyDll.DLL";
.....
CreatePanel(Self);
возникает ошибка Cannot access TFont to TFont
можете помочь узнать в чем ошибка


 
Vlad ©   (2006-02-13 19:35) [1]


> TVV   (13.02.06 19:16)  

попробуй скомпилировать с рантайм пакетами (и библиотеку и вызывающее приложение)
Project - Options - Packages
установить галку Build with runtime packages


 
xayam ©   (2006-02-13 23:07) [2]


> procedure CreatePanel(Parent:TWinControl);
> begin
> Panel:=TCustomPanel.Create(nil);
> ......
> Panel.Parent:=Parent;
> end;
> Но при обращении к ней из приложения
> procedure CreatePanel(Parent:TWinControl);stdcall; external
> "MyDll.DLL";
> .....
> CreatePanel(Self);


Это вроде не так пишут
----------------------------------------------------------------------
procedure CreatePanel(Parent:TWinControl);
begin
       Panel:=TCustomPanel.Create(Parent); //!!!
       ......
       Panel.Parent:= Parent;
end;
//Но при обращении к ней из приложения
procedure CreatePanel(Parent:TWinControl);stdcall; external "MyDll.DLL";
.....
CreatePanel(Self);
----------------------------------------------------------------

Или я не прав?



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

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



Память: 0.45 MB
Время: 0.033 c
10-1123447573
r4dx
2005-08-08 00:46
2006.09.24
TWebBrowser и AutoSize


2-1157505236
Viacheslav
2006-09-06 05:13
2006.09.24
Как мне прокрутить TListView


15-1156681887
Desdechado
2006-08-27 16:31
2006.09.24
Дружба


2-1157571270
redlord
2006-09-06 23:34
2006.09.24
моргание Timage при refresh


2-1157509511
031178
2006-09-06 06:25
2006.09.24
Работа с деревом




   Наверх