[2/2] oleacc: implemented GetRoleText[A/W] with tests

Dmitry Timoshkov dmitry at codeweavers.com
Sun Oct 5 03:09:47 CDT 2008


"Nikolay Sivov" <bunglehead at gmail.com> wrote:

>>>> Why do you need to allocate an intermediate roletextA?
>>>>
>>> WideCharToMultiByte requires to have a sufficient buffer. I think 
>>> it's the easiest way to allocate necessary buffer instead of using 
>>> local buffer of some hardcoded length. What do you think?
>>
>> And what is the problem with WideCharToMultiByte?
>>
> No problems with it. The reason is that I couldn't use rolemax as an 
> WideCharToMultiByte argument cause it could be less then required 
> buffer. After that I don't want to use something like CHAR buff[64] 
> because of unexplainable length, so I allocate it in heap.
> Why it's wrong?

I still fail to see why you can't use rolemax in WideCharToMultiByte,
obviously that's the size of the target buffer.

-- 
Dmitry.



More information about the wine-devel mailing list