Hi.
--- In [email protected], "swzoh" <[EMAIL PROTECTED]> wrote:
> Why don't you just use dll plugin then? Here is a sample script:

Yes, I came up with something similar meanwhile. Was my first script 
with dll-plugin. A couple of questions, though:

> iwNum=dll.call("MultiByteToWideChar|ui ui s i x i",;;+
> 0,0,"sString",-1,"xString",0)

Is 0 the current charset (first parameter)? Doh. I tried getting it 
with GetACP...
x is for a byteblock, right? Is this appropriate for a LPWSTR?
Is it not necessary to define the return value (another int at the 
end)?

> xString=repeat(" ",iwNum*2) ;; needed when sString is long

Ah, this is how to initialize the byteblock? Good to know.
But is this really wide enough for real wide chars? Don't know... I 
think a unicode-char can have up to 4 bytes if I'm not mistaken...

> iuNum=dll.call("WideCharToMultiByte|ui ui x i s i ui ui",;;+
> 65001,0,"xString",-1,"uString",0,0,0)

Damn, I overlooked that function. Went all the way from hex to 
binary and via a conversion-table back to hex. Not nice...

Thanks for posting this, anyway.

Mockey









Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to