Autor Beitrag
rizla
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 417
Erhaltene Danke: 2

XP
FPC mit Lazarus
BeitragVerfasst: Mi 25.05.05 20:44 
Hi,
ich habe versucht, innerhalb einer function in einer dll eine grafik (TBitmap) zu erzeugen.
Jedenfalls bekomme ich 'ne Debugger Exception mit folgendem Text:
"Fataler Fehler: Ein Anwendungsobject kann nicht in einem Shared Object oder einer Bibliothek erzeugt werden."
Warum zur Hölle geht das nicht?
Jede beliebige Import-DLL eines Imageviewers kann das doch auch oder etwa nicht?
Hier ist ein snippet aus dem code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
function fctcreimg: TBitmap;
var img: TBitmap;
begin
 img := TBitmap.Create;
 img.width := 32;
 img.Height := 32;
 img.Canvas.Brush.Style := bsSolid;
 img.Canvas.Font.Color := clBlack;
 ..
 result := img;
end;


Gruß rizla

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt und BBCodes aktiviert.
Marc Walter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 40

Win98, WinXP
D2 Pers, D7 Pers
BeitragVerfasst: Fr 27.05.05 13:20 
dlls liefern doch nur befehle für programme, oder seh ich das falsch?
kann man in denen überhaupt direkt was ausführen?

_________________
möp