AW: Compiliertes Programm läuft nicht auf XP
Ja wie wäre es denn damit, das du auf hörst uns Rätsel raten zu lassen und mal ein paar Details und\oder mal eine vernünftige Fehlerbeschreibung ablieferst.
|
AW: Compiliertes Programm läuft nicht auf XP
2.exe hat ein Problem festgestellt und muss beendet werden.
AppName: 2.exe AppVer: 0.0.0.0 ModName: kernel32.dll ModVer: 5.1.2600.6293 Offset: 00012fd3 Fehleberichterstattung erstellt eine TXT.datei hier der inhalt: <?xml version="1.0" encoding="UTF-16"?> <DATABASE> <EXE NAME="2.exe" FILTER="GRABMI_FILTER_PRIVACY"> <MATCHING_FILE NAME="2.exe" SIZE="4175872" CHECKSUM="0xE9F706B8" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="06/19/1992 22:22:17" UPTO_LINK_DATE="06/19/1992 22:22:17" /> <MATCHING_FILE NAME="billiard.exe" SIZE="22546944" CHECKSUM="0xFE4361F3" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="06/19/1992 22:22:17" UPTO_LINK_DATE="06/19/1992 22:22:17" /> <MATCHING_FILE NAME="midas.dll" SIZE="296448" CHECKSUM="0x5B401120" BIN_FILE_VERSION="7.0.4.453" BIN_PRODUCT_VERSION="7.0.0.0" PRODUCT_VERSION="7.0" FILE_DESCRIPTION="Borland MIDAS Component Package" COMPANY_NAME="Borland Software Corporation" PRODUCT_NAME="Midas support DLL " FILE_VERSION="7.0.4.453" ORIGINAL_FILENAME="MIDAS.DLL" INTERNAL_NAME="MIDAS70" LEGAL_COPYRIGHT="Copyright © 1997-2002 Borland Software Corporation" VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x4" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" UPTO_BIN_FILE_VERSION="7.0.4.453" UPTO_BIN_PRODUCT_VERSION="7.0.0.0" LINK_DATE="08/09/2002 21:44:33" UPTO_LINK_DATE="08/09/2002 21:44:33" VER_LANGUAGE="Englisch (USA) [0x409]" /> </EXE> <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"> <MATCHING_FILE NAME="kernel32.dll" SIZE="1063936" CHECKSUM="0xE83A657" BIN_FILE_VERSION="5.1.2600.6293" BIN_PRODUCT_VERSION="5.1.2600.6293" PRODUCT_VERSION="5.1.2600.6293" FILE_DESCRIPTION="Client-DLL für Windows NT-Basis-API" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Betriebssystem Microsoft® Windows®" FILE_VERSION="5.1.2600.6293 (xpsp_sp3_gdr.121001-1622)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. Alle Rechte vorbehalten." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x1044D0" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.6293" UPTO_BIN_PRODUCT_VERSION="5.1.2600.6293" LINK_DATE="10/03/2012 04:58:00" UPTO_LINK_DATE="10/03/2012 04:58:00" VER_LANGUAGE="Deutsch (Deutschland) [0x407]" /> </EXE> <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"> <MATCHING_FILE NAME="kernel32.dll" SIZE="1063936" CHECKSUM="0xE83A657" BIN_FILE_VERSION="5.1.2600.6293" BIN_PRODUCT_VERSION="5.1.2600.6293" PRODUCT_VERSION="5.1.2600.6293" FILE_DESCRIPTION="Client-DLL für Windows NT-Basis-API" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Betriebssystem Microsoft® Windows®" FILE_VERSION="5.1.2600.6293 (xpsp_sp3_gdr.121001-1622)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. Alle Rechte vorbehalten." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0x1044D0" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.6293" UPTO_BIN_PRODUCT_VERSION="5.1.2600.6293" LINK_DATE="10/03/2012 04:58:00" UPTO_LINK_DATE="10/03/2012 04:58:00" VER_LANGUAGE="Deutsch (Deutschland) [0x407]" /> </EXE> </DATABASE> |
AW: Compiliertes Programm läuft nicht auf XP
Da fehlt wohl ein wenig Fehlerbehandlung, denn das bedeutet, dass eine Exception nicht abgefangen wird. Als ersten Schritt kannst du einmal versuchen TApplicationEvents zu benutzen und dort OnException zuweisen. Vielleicht kommt da ja etwas an.
Alternative wäre z.B. madExcept. |
AW: Compiliertes Programm läuft nicht auf XP
XP ist im April tot...wozu der Aufwand?
Sherlock |
AW: Compiliertes Programm läuft nicht auf XP
Zitat:
Es gibt durchaus Anwendungsbereiche abseits des Internets, in sich geschlossene Systeme die weder Virenscanner noch regelmäßige Updates kennen. Wir hatten noch vor ca. 4 Jahren durchaus Probleme Windows 2000 als Mindestvoraussetzung bei unseren Kunden durchzusetzen und davon gibt es heute noch viele Installationen. |
AW: Compiliertes Programm läuft nicht auf XP
Meine Kunden sind Krankenhäuser. Die haben in der Regel auch abgeschottete Systeme, allein schon aus Datenschutzgründen und dann noch hunderte von Rechnern. Dennoch lasse ich mich nicht mit solchen Scheinargumenten erpressen. Es geht nicht nur um Viren, es geht um die darunter liegende SWA an sich (die Probleme mit diversen DLLs zB). Die Handstände, die ich machen müsste, um vier teilweise grundverschiedene Windowsversionen zu supporten zahlt mir keiner. Die Kunden sehen das dann auch ein und modernisieren endlich auch mal ihre Hardware, was noch ein Bonus ist, weil in der Regel mindestens mehr RAM für mein System zur Verfügung steht. Wer moderne Software nutzen möchte, muss ein moderne OS verwenden. :warn:
Sherlock |
AW: Compiliertes Programm läuft nicht auf XP
Zitat:
Das muss dann der Kunde entscheiden. Neue Hardware und neues Betriebssystem oder keine Updates. Dass Windows 2000 herausgeflogen ist, liegt aber schlicht daran, dass die Kompilate von aktuellen Delphiversionen dort nicht mehr laufen. |
AW: Compiliertes Programm läuft nicht auf XP
Was machst du, oder besser, was macht die Anwendung wenn der Fehler auftritt?
|
AW: Compiliertes Programm läuft nicht auf XP
es er scheint ein Fenster wie oben schon genannt. Also in dieser Anwendung wird doch nur ein video abgespielt ich kann ja mal den kompletten Code einstellen. Habe das XP system auch schon mit dem aktuellen Codecs versorgt....
Hier mal der Code
Delphi-Quellcode:
unit Unit1;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,gifimage, ExtCtrls,shellapi, MPlayer, StdCtrls, colorbutton, LMDPNGImage,midaslib; type TForm1 = class(TForm) Panel1: TPanel; MediaPlayer1: TMediaPlayer; Timer1: TTimer; procedure FormCreate(Sender: TObject); procedure MediaPlayer1Notify(Sender: TObject); procedure Timer1Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation uses Unit2; {$R *.dfm} procedure Delay(Milliseconds: Integer); var Tick: DWord; Event: THandle; begin Event := CreateEvent(nil, False, False, nil); try Tick := GetTickCount + DWord(Milliseconds); while (Milliseconds > 0) and (MsgWaitForMultipleObjects(1, Event, False, Milliseconds, QS_ALLINPUT) <> WAIT_TIMEOUT) do begin Application.ProcessMessages; if Application.Terminated then Exit; Milliseconds := Tick - GetTickcount; end; finally CloseHandle(Event); end; end; procedure TForm1.FormCreate(Sender: TObject); begin form1.DoubleBuffered:=true; mediaplayer1.Play; panel1.Align:=alclient; borderstyle:=bsnone; end; procedure TForm1.MediaPlayer1Notify(Sender: TObject); begin if mediaplayer1.NotifyValue = nvSuccessful then begin mediaplayer1.Play; end; end; procedure TForm1.Timer1Timer(Sender: TObject); begin form2.Show; timer1.Enabled:=false; end; end. Und hier die unit 2
Delphi-Quellcode:
unit Unit2;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, LMDPNGImage, ExtCtrls, StdCtrls, colorbutton,shellapi; type TForm2 = class(TForm) Label1: TLabel; Image1: TImage; Timer1: TTimer; Timer2: TTimer; Label2: TLabel; Timer3: TTimer; function SetWndRegionFromImg(Bmp: TBitmap; TransparentColor: TColor): Boolean; procedure Timer1Timer(Sender: TObject); procedure Timer2Timer(Sender: TObject); procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); procedure Timer3Timer(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation uses Unit1; {$R *.dfm} function TForm2.SetWndRegionFromImg(Bmp: TBitmap; TransparentColor: TColor): Boolean; type TTransColState = (trsOn, trsOff); TRGBQuadArray = array[WORD] of Cardinal; pRGBQuadArray = ^TRGBQuadArray; var TransColState: TTransColState; x, y: Integer; line: Integer; count: Integer; rgn, nrgn: THandle; pPixelArray: pRGBQuadArray; begin Result := TRUE; if Bmp.PixelFormat <> pf32Bit then Bmp.PixelFormat := pf32Bit; count := 0; line := 0; rgn := CreateRectRGN(0, 0, 0, 0); // First Init Region nrgn := rgn; for y := 0 to Bmp.Height - 1 do begin pPixelArray := Bmp.Scanline[y]; TransColState := trsOff; for x := 0 to Bmp.Width - 1 do begin if pPixelArray[x] <> COLORREF(TransparentColor) then begin if TransColState = trsOff then begin TransColState := trsOn; line := x - 1; inc(line); end; end else begin if TransColState = trsOn then begin TransColState := trsOff; 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; end; end; {$IFDEF DEBUGMODE} pPixelArray[x] := RGB(random(256), random(256), random(256)); {$ENDIF DEBUGMODE} end; end; SetWindowRgn(Handle, Rgn, TRUE); DeleteObject(Rgn); DeleteObject(nRgn); end; procedure TForm2.FormCreate(Sender: TObject); const LWA_COLORKEY = 1; // Use crKey as the transparency color. LWA_ALPHA = 2; // Use bAlpha to determine the opacity of the layered window.. WS_EX_LAYERED = $80000; USER32DLL = 'user32.dll'; var _SetLayeredWindowAttributes: function(hWnd: THandle; TRansparentColor: COLORREF; AlphaValue: Byte; Flags: Cardinal): BOOL; stdcall; var hLib: THandle; begin Self.Color := clblack; Self.BorderStyle := bsNone; if not (Image1.Picture.Graphic is TBitmap) then begin ShowMessage('Fehler: Image muss ein Bitmap sein !'); Application.Terminate; end; {$IFDEF DEBUGMODE} // zum sichtbar machen der Form für den DebugMode Self.Show; {$ENDIF DEBUGMODE} hLib := LoadLibrary(USER32DLL); @_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); end; procedure TForm2.Timer1Timer(Sender: TObject); begin Label2.Caption:=inttostr(Timer1.tag)+' %'; timer1.Enabled:=false; timer1.Tag:=timer1.Tag+1; timer1.Enabled:=true; 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; end; procedure TForm2.Timer2Timer(Sender: TObject); begin Label2.Caption:=inttostr(Timer2.tag)+' %'; if timer2.Tag = 0 then label1.caption:='Lade Spielsystem ...'; if Label2.Caption='0 %' then timer2.Interval:=200; timer2.Enabled:=false; timer2.Tag:=timer2.Tag+1; 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 ShellExecute(Application.Handle,'open',PChar('Billiard.exe'),nil,nil,sw_ShowNormal); if Label2.Caption='100 %' then close; end; procedure TForm2.FormShow(Sender: TObject); begin timer3.enabled:=true; Label1.Caption:='Lade Programmbibliotheken ...'; Label2.Caption:=inttostr(Timer1.tag)+' %'; end; procedure TForm2.Timer3Timer(Sender: TObject); begin timer1.Enabled:=true; timer3.Enabled:=false; end; end. |
AW: Compiliertes Programm läuft nicht auf XP
Zitat:
Zitat:
Aber:
Delphi-Quellcode:
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.
uses
[...],midaslib;
Delphi-Quellcode:
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.
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;
Delphi-Quellcode:
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.
@_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);
Delphi-Quellcode:
Was... zur... HÖLLE!? Mit sowas holt man sich moralische Fingerkloppe, aber das tut man nicht in Programme! :shock:
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 |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz