![]() |
Problem mit DOS-Command und Delphi 2009
Salvete,
die Umstellung von RAD Studio 2007 auf 2009 bringt doch einige nette Überraschungen mit sich ... *grummel* doscommand.pas
Delphi-Quellcode:
Gruss
procedure Register;
implementation type TCharBuffer = array[0..MaxInt - 1] of Char; => Fehlermeldung Datentyp zu groß: 2GB überschritten EL |
Re: Problem mit DOS-Command und Delphi 2009
Und bei array of AnsiChar?
|
Re: Problem mit DOS-Command und Delphi 2009
Char ist jetzt 2 Zeichen breit. Deshalb ist der Buffer doppelt so gro0
|
Re: Problem mit DOS-Command und Delphi 2009
Zitat:
Delphi-Quellcode:
GrussStr := Str + pBuf^[i]; //add a character => Warnung impliziete Stringumwandlung von AnsiChar zu string pBuf^[II - 2] := InputLines[0][II]; => Fehler inkompatible Typen AnsiChar und Char EL |
Re: Problem mit DOS-Command und Delphi 2009
Dann ersetz mal alle String-Deklarationen durch AnsiString.
|
Re: Problem mit DOS-Command und Delphi 2009
Wenn dann alle String->AnsiString, Char->AnsiChar, PChar->PAnsiChar
|
Re: Problem mit DOS-Command und Delphi 2009
Zitat:
Ich schmeisse die Komponente erst einmal raus und vertage diese Problematik auf später Gruss EL |
Re: Problem mit DOS-Command und Delphi 2009
Warum verkleinerst du den Buffer nicht einfach?
|
Re: Problem mit DOS-Command und Delphi 2009
Zitat:
Gruss EL |
Re: Problem mit DOS-Command und Delphi 2009
In dem du die obere Grenze verkleinertst!
|
Re: Problem mit DOS-Command und Delphi 2009
Zitat:
Gruss EL |
Re: Problem mit DOS-Command und Delphi 2009
z. B. so
Delphi-Quellcode:
type TCharBuffer = array[0..(MaxInt div SizeOf(Char)) - 1] of Char;
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:05 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 by Thomas Breitkreuz