| |
|
|
|
Description:
MultiByteToWideChar GetControlParas (B a Zeichencode String a Unicode String circa.
Deklaration:
DEF @MultiByteToWideChar(6) !kernel32,MultiByteToWideChar
Parameter:
1.Parameter: Codepage number as Integer. -0 = ANSI Codepage -1= OEM Codepage -2 = macintosh Codepage 2.Parameter: ? Happen? for manner the Zeichencode Strings and the manner the Erzeugung (can 0 his). 3.Parameter: area mt or address one Strings, the konvertiert go should. 4.Parameter: The Number of letters the Strings from Parameter 3 as Integer. this worth can on –1 staid go, if the String from Parameter 3 one abschließendes Nullbyte contains. 5.Parameter: enough dimensionierte Memory-Variable, The whom begot Unicode String aufnimmt. 6.Parameter: Size the Bereichs of Parameter 5 as Integer.
Return Value:
If Parameter 6 on 0 staid and is The action succeed, supply The API as Return The erforderliche Size the Bereiches in Parameter 5. If Parameter 6 mismatched 0 and that the function successful completed watts, is the Return The Number of copied characters (+abschließendes Nullbyte). with Return 0 is a Error aufgetreten.
Examples:
CompileMarkSeparationDEF @WideCharToMultiByte(8) !"kernel32","WideCharToMultiByte"
DEF @MultiByteToWideChar(6) !"kernel32","MultiByteToWideChar"
DEF @GetACP(0) !"kernel32","GetACP"
Windowstyle 31
Windowtitle "Stringumwandlung ins Unicode Format"
Window 0,0-640,440
Declare Unicode#,SingleByte$,Fehler&
DIM Unicode#,256
Clear Unicode#
LET SingleByte$="Hallo"
LET Fehler&=@MultiByteToWideChar(@GetACP(),0,@ADDR(SingleByte$),-1,Unicode#,100)
Print "Rückmeldung von MultiByteToWideChar="+@STR$(Fehler&)
Print "Singlebyte="+SingleByte$
PRINT "Unicode="+@CHAR$(Unicode#,0,@LEN(SINGLEBYTE$)*2)
Dispose Unicode#
While 0=0
Waitinput
Wend
[...] |
|
|
| |
|
|