Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Problem mit Unicode und inet_addr() (https://www.delphipraxis.net/120972-problem-mit-unicode-und-inet_addr.html)

wth 19. Sep 2008 20:16


Problem mit Unicode und inet_addr()
 
Hallo,

Ich habe ein Edit mit dem Inhalt 127.0.0.1.

Was muss ich bei folgendem Code ändern, damit er mir wieder 127.0.0.1 anzeigt?
Delphi-Quellcode:
showmessage(inet_ntoa(tinaddr(inet_addr(pansichar(edit1.text)))));
Unter Delphi 2007 hat es funktioniert, unter Delphi 2009 nicht mehr.

//habs schon hinbekommen, stand mal wieder voll aufm Schlauch, Danke :cyclops:

toms 19. Sep 2008 20:26

Re: Problem mit Unicode und inet_addr()
 
Zitat:

Zitat von wth
//habs schon hinbekommen, stand mal wieder voll aufm Schlauch, Danke :cyclops:

Frage stellen, eine Antwort erwarten, selber beantworten und den anderen nicht mitteilen :pale:

Delphi-Quellcode:
 ShowMessage(inet_ntoa(TInAddr(inet_addr(PAnsichar(AnsiString(Edit1.Text))))));


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:03 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