AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Programmieren allgemein Compiliertes Programm läuft nicht auf XP
Thema durchsuchen
Ansicht
Themen-Optionen

Compiliertes Programm läuft nicht auf XP

Ein Thema von Natcree · begonnen am 4. Feb 2014 · letzter Beitrag vom 8. Feb 2014
 
Medium

Registriert seit: 23. Jan 2008
3.688 Beiträge
 
Delphi 2007 Enterprise
 
#20

AW: Compiliertes Programm läuft nicht auf XP

  Alt 5. Feb 2014, 22:21
Also in dieser Anwendung wird doch nur ein video abgespielt
Das sehe ich aber mal deutlich anders.
Zitat:
ich kann ja mal den kompletten Code einstellen.
Das wird auch Zeit!

Aber:
Delphi-Quellcode:
uses
  [...],midaslib;
Ich sehe nirgends in dem Code, dass du diese benutzt. Die DLL kann man sich daher schon mal sparen, und evtl. macht die ja sogar Probleme.

Delphi-Quellcode:
function TForm2.SetWndRegionFromImg(Bmp: TBitmap; TransparentColor: TColor): Boolean;
type
...
...
          if count < 4096 then
          begin
            nrgn := CreateRectRgn(line, y, x, y + 1);
            {$IFDEF DEBUGMODE}
              bmp.Canvas.Brush.Color := clGreen;
              bmp.Canvas.FillRect(RECT(line, y, x, y + 1));
              sleep(25);
              application.ProcessMessages;
            {$ENDIF DEBUGMODE}
            CombineRgn(Rgn, Rgn, nRgn, RGN_OR);
            inc(Count);
          end else
          begin
            ShowMessage('Debuginfo: To many Regions. Count of Rgn: '#9 + IntToStr(Count));
            Application.Terminate;
          end;
HOLY FUCK! 4096 Regions!! Das MSDN sagt nichts darüber, dass die Original-Regions bei CombineRgn() deleted werden. Das heisst, dass du da vermutlich wirklich das System um massig Handles und GDI Ressourcen betrügst. Eventuell mosert XP auch deswegen.

Delphi-Quellcode:
  @_SetLayeredWindowAttributes := GetProcAddress(hLib, 'SetLayeredWindowAttributes');
  if @_SetLayeredWindowAttributes <> nil then
  begin
    SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
    _SetLayeredWindowAttributes(Self.Handle, COLORREF(clblack), 200, LWA_COLORKEY or LWA_ALPHA);

  end
  else
  begin
    // alternative, im falle das es SetLayeredWindowAttributes nicht gibt
    SetWndRegionFromImg(Image1.Picture.Bitmap, clblack);

  end;
  FreeLibrary(hLib);
Ich meine, dass WinXP keine Layered Windows kennt. Hier fehlt aber jegliche Bearbeitung von Rückgabewerten und GetLastError(), so dass potenziell auch hier ein Problem bestehen könnte.

Delphi-Quellcode:
if Label2.Caption='0 %then label1.caption:='Lade Programmbibliotheken ...';
if Label2.Caption='0 %then timer1.Interval:= 200;
if Label2.Caption='11 %then label1.caption:='Lade Umgebungsvariablen ...';
if Label2.Caption='11 %then timer1.interval:= 110;
if Label2.Caption='27 %then label1.caption:='Lade Laufzeitumgebungen ...';
if Label2.Caption='27 %then timer1.Interval:= 150;
if Label2.Caption='50 %then label1.caption:='Lade Umgebungsmatrix ...';
if Label2.Caption='50 %then timer1.Interval:=300;
if Label2.Caption='78 %then label1.caption:='Lade Datenbanksystem ...';
if Label2.Caption='78 %then timer1.Interval:=50;
if Label2.Caption='92 %then label1.caption:='Lade Vereine ...';
if Label2.Caption='92 %then timer1.Interval:=20;
if Label2.Caption='100 %then timer1.Enabled:=false;
if Label2.Caption='100 %then timer2.enabled:=true;

[...]

if Label2.Caption='21 %then Label1.Caption:='Spielerdaten werden gelesen ...';
if Label2.Caption='21 %then timer2.Interval:=20;
if Label2.Caption='50 %then Label1.Caption:='Spielresourcen werden freigegeben ...';
if Label2.Caption='50 %then timer2.interval:=100;
if Label2.Caption='76 %then Label1.Caption:='SpielDatenbank wird geoeffnet ...';
if Label2.Caption='76 %then timer2.interval:=35;
if Label2.Caption='86 %then label1.Caption:='Viel Glueck und Gut Holz !!!';
if Label2.Caption='86 %then timer2.Interval:=1000;
if Label2.Caption='97 %then label1.caption:= 'Programm wird gestartet !!!';
if Label2.Caption='100 %then timer2.Enabled:=false;
if Label2.Caption='100 %then Label2.visible:=false;
if Label2.Caption='100 %then label1.Visible:=false;
if Label2.Caption='100 %then image1.Visible:=false;
if Label2.Caption='100 %then
Was... zur... HÖLLE!? Mit sowas holt man sich moralische Fingerkloppe, aber das tut man nicht in Programme!
"When one person suffers from a delusion, it is called insanity. When a million people suffer from a delusion, it is called religion." (Richard Dawkins)
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:07 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz