English
Regulars table & Café

WideCharToMultiByte.

 


Description:

WideCharToMultiByte GetControlParas (B a Unicode String a Multi- or Singlebyte String circa.




Deklaration:

DEF @WideCharToMultiByte(8) !kernel32,WideCharToMultiByte




Parameter:

1.Parameter: Codepage number as Integer. =>
-0 = ANSI Codepage
-1= OEM Codepage
-2 = macintosh Codepage
2.Parameter: performance- and Umwandlungsflags as LongInt (can 0 his).
3.Parameter: area mt or address one Strings in the Unicode stature, the konvertiert go should.
4.Parameter: Number of letters in the string from Parameter 3. becomes here –1 indicated, becomes adopted, that the String with a Nullbyte end and the Size automatically accounts.
5.Parameter: enough dimensionierte Memory-Variable, The whom konvertierten String aufnimmt.
6.Parameter: Size the Bereichs of Parameter 5 as Integer. If this Parameter 0 is, gives The function The benötigte amount on Bytes for Parameter 5 back.
7.Parameter: address one Strings or Memory-Variable with a String, the a letters contains, the inserted becomes, if one Unicode character not Translated go can. this Parameter can 0 his – it'll then one Systemstandard uses.
8.Parameter: Memory-Variable, The The address one ? Happen? receiving, the indicating whether a character through one ‚Default’ (Parameter 7) supplant watts (can 0 his). =>
-1 = Yes
-0 = No



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:

CompileMarkSeparation
DEF @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#,SingleByte$,Fehler&
DIM Unicode#,256*2
DIM SingleByte#,256
Clear Unicode#
LET SingleByte$=@input$("Bitte Wort eingeben","Stringumwandlung","Hallo")
LET Fehler&=@MultiByteToWideChar(@GetACP(),0,@ADDR(SingleByte$),-1,Unicode#,256*2)
Print "Rückmeldung von MultiByteToWideChar="+@STR$(Fehler&)
Print "Singlebyte="+SingleByte$
PRINT "Unicode="+@CHAR$(Unicode#,0,@LEN(SINGLEBYTE$)*2)
Let Fehler&=@WideCharToMultiByte(@GetACP(),0,Unicode#,-1,SingleByte#,256,0,0)
Print "Rückmeldung von WideCharToMultiByte="+@STR$(Fehler&)
Print "Zurück in Singlebyte="+@STRING$(Singlebyte#,0)
Dispose Unicode#
Dispose SingleByte#

While 0=0

    Waitinput

Wend

 
04/09/05  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

4.350 Views

Untitledvor 0 min.
Sven Bader11/22/21
Michael W.08/21/18
iF05/22/12
Georg Hülsmann05/26/11

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie