Вниз
Скачать: 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.03 c
2-1157370098
Серый
2006-09-04 15:41
2006.09.24
Создание кнопки


2-1157613110
VitV
2006-09-07 11:11
2006.09.24
Документация по Fast Report


1-1155638942
ак
2006-08-15 14:49
2006.09.24
непонятная ошибочка


2-1157350865
vegarulez
2006-09-04 10:21
2006.09.24
По поводу фискальных регистраторов.


15-1157515336
DeStranger
2006-09-06 08:02
2006.09.24
TheBat!




   Наверх