Autor Beitrag
MydroF
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Do 20.08.09 14:19 
Ja, hab vorhin Delphi 7 mit Andorra 2D ausgerüstet, das grundgerüst einer application laut dem tutorial auf

andorra.sourceforge....dex.php?bb=tutot1ger

übernommen, und alles genauso befolgt bis zu der Stelle, wo man den Code
ausblenden Delphi-Quelltext
1:
AdDraw.DllName := 'AndorraDX93D.dll';					
einfügen muss.
Steht der Code noch nicht da, kann man die Anwendung über den Startbutton starten, ist der DLL Text enthalten, kommt die Fehlermeldung bei Start:
Zitat:
"Project Project1.exe raised exception class EAccessViolation with message 'Access violation at adress 00405134 on module 'Project1.exe'. Write of address 00000010'. Use Step or Run to continue."

Besitze Delphi 7, habs bereits mit der OGL.DLL versucht, alle DLLs befinden sich im Speicherordner, auf meinem laptop bin ich admin, hab vista und die dateien sind nicht mit schreibschutz versehen.

Wie beseitige ich das Problem?

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Do 20.08.09 14:21 
Das sieht nach einem nicht erstellten Objekt aus, zeig mal deinen Code.
Ich vermute dass bei dir das AdDraw.DllName vor dem AdDraw := TAdDraw.Create(self); kommt.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
MydroF Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 25



BeitragVerfasst: Do 20.08.09 14:25 
Moderiert von user profile iconNarses: Komplett-Zitat des letzten Beitrags entfernt.

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, AdDraws, AdClasses, AdTypes;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
  AdDraw:TAdDraw;
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
AdDraw := TAdDraw.Create(self);
AdDraw.Free;
AdDraw.DllName := 'AndorraDX93D.dll';
end;

end.


Moderiert von user profile iconNarses: I-/COLOR-Tags durch Delphi-Tags ersetzt.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Do 20.08.09 14:29 
Bitte nicht nur den Code kopieren, sondern auch lesen was er macht und wohin er soll:
Zitat:

Außerdem muss die nun erzeugte Instanz von TAdDraw am Ende des Programms wieder freigegeben werden (d.h. der Speicher den Sie belegt wieder für andere Objekte zur Verfügung stellen). Fügen Sie deshalb in das "OnDestroy" Ereignis des Objekts Form1 folgenden Code ein:
Delphi-Code:
AdDraw.Free;

Damit wird der Speicher, den die Engine verwendet, frei gegeben und die Engine selbst finalisiert.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.