[2/2] oleacc: implemented GetRoleText[A/W] with tests
Nikolay Sivov
bunglehead at gmail.com
Sun Oct 5 04:38:38 CDT 2008
Dmitry Timoshkov wrote:
> "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.
>
The thought that WideCharToMultiByte will not fill buffer of
insufficient length, that's where I was wrong. I've just posted a
corrected patch. Any feedback will be appreciated.
More information about the wine-devel
mailing list