Hi Herfried and Armin,
I try to explain a bit more:
This is exactly what i'doing.
The purpose is to get an ansi (CP 950 or any other) encoded byte array to
send it to a mailslot, which is maintained by a VB6-app.
No, as a message in a mailslot. (I tried also to do base64 encoding on the
unicode strings but did not find an algorithm which can decode the
base64-string i made with vb.net
Yes, above i encoded unicode to CP 950 and on the VBA side i expect it to be
950 in this case.
temp is just a string.
WtoA, AtoW are just handy functions to convert to/from unicode from famous
Michael Kaplan (www.trigeminal.com)
There is no "main". There are two independend applications (one .NET, one
VBA, talking to each other over mailslots.
If i use mailslotW to send unicode directly, Access 2003 crashes
immediately. I could not decode base64-encoded unicode-Strings on the
So i try to convert to ANSI first and send that.
The problem is, that it must work with any codepage, not only default.
Yes, I know, that's why i create a bytearray, which is sent by API-function
writefile into the mailslot.