Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Umstellung von Delphi 7 auf 2010 (https://www.delphipraxis.net/155596-umstellung-von-delphi-7-auf-2010-a.html)

DeddyH 1. Nov 2010 09:33

AW: Umstellung von Delphi 7 auf 2010
 
Zitat:

Zitat von messie (Beitrag 1058908)
Delphi-Quellcode:
GetMem(pText, Length(sText)+1);
GetMem(pCaption, Length(cText)+
Du holst Dir da Speicher für PWideChar von einem AnsiString. Du brauchst aber 2 Byte pro Zeichen.

Grüße, Messie

Delphi-Quellcode:
GetMem(pText, Length(sText) * SizeOf(char)+1);
So sollte das unter ANSI- und UNICODE-Delphi stimmen (hoffe ich zumindest).


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:05 Uhr.
Seite 2 von 2     12   

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