Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   C++ Frage: Konstante mit L".... (https://www.delphipraxis.net/2746-c-frage-konstante-mit-l.html)

sakura 5. Feb 2003 13:35


C++ Frage: Konstante mit L"....
 
Was bewirkt das L in der Definition einer WCHAR Konstante in C/C++

Code:
//Beispiel
WCHAR KeyNameBuffer[]      = [color=#ff0000]L[/color]"\\Registry\\Machine\\SOFTWARE";
...:cat:...

X-Dragon 5. Feb 2003 13:42

Das sollte weiter helfen :)

Zitat:

The "L" macro is NOT a type conversion utility. It works only at COMPILE time to produce a UNICODE string constant.

If you need to convert from ASCII to UNICODE or back there are several alternatives. If you are using MFC, there are several macros defined in afxpriv.h that are convenient. In particular they are A2W or W2A.

Also at your disposal are the Windows SDK functions:

MultiByteToWideChar()
WideCharToMultiByte()

functions. These are the "standard" means of converting.
Quelle: http://www.experts-exchange.com/Prog...0141914.html#1

sakura 5. Feb 2003 14:14

:thuimb: Danke, hat mir weitergeholfen :)
Ob mir das aber mehr Zeit für SwapIt!" lässt...
...:cat:...


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