I have come up with some info on these 2 (previously undocumented) calls:
DWORD STDCALL WCSToMBEx(WORD CodePage,LPWSTR UnicodeString,DWORD UnicodeSize,LPSTR *MBString,DWORD MBSize,BOOL Allocate);
DWORD STDCALL MBToWCSEx(WORD CodePage,LPSTR MBString,DWORD MBSize,LPWSTR *UnicodeString,DWORD MBSize,BOOL Allocate);


Return value for both is the count of characters copies (or mabie count of bytes, not sure)
for WCSToMBEx, the parameters are:
CodePage: specifies which code page to use (its the same code page as passed to WideCharToMultiByte)
UnicodeString: the input unicode string
UnicodeSize: the size of the unicode string (not sure if its bytes or characters). Pass -1 to ask the function to calculate it for you.
MBString: the output ascii string
MBSize: the size of the ascii string (not sure if its bytes or characters). Pass -1 to ask the function to calculate it for you.
Allocate: Set to true to ask the function to allocate the destination memory. Set to false and it assumes that the memory is preallocated by the caller.


For MBToWCSEx, the parameters are:
CodePage: specifies which code page to use (its the same code page as passed to MultiByteToWideChar)
MBString: the input ascii string
MBSize: the size of the ascii string (not sure if its bytes or characters). Pass -1 to ask the function to calculate it for you.
MBString: the output unicode string
MBSize: the size of the unicode string (not sure if its bytes or characters). Pass -1 to ask the function to calculate it for you.
Allocate: Set to true to ask the function to allocate the destination memory. Set to false and it assumes that the memory is preallocated by the caller.
I am going to implement these functions and contribute the code to ReactOS & WINE but I want someone else to play whith them and confirm all my findings as to what these functions do and how they work first.



Reply via email to