Re: oleacc: implemented GetRoleText[A/W] with tests (try6 - rebased)

2008-10-09 Thread Nikolay Sivov
On Tue, 2008-10-07 at 21:23 +0400, Nikolay Sivov wrote: > Changelog(try5, try6): > - rebased with current git > Changelog(try4): > - tests for string length added > - configure.ac in the same patch > Changelog: > - implemented GetRoleText[A/W] with tests > > >From 82eeac4de0a082b3c

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > to prove this I need to add a new module named oleaccrc.dll which contains this resources on Win. >>> >>> I don't understand the argument about oleaccrc.dll. >>> >> This module contains localized resource strings used

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: >>> to prove this I need to add a new module named oleaccrc.dll which >>> contains this resources on Win. >> >> I don't understand the argument about oleaccrc.dll. >> > This module contains localized resource strings used by GetRoleText in > Win. I trie

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > >>> First of all there is no need to send the configure.ac patch >>> separately. >> Ok, but how could I remove auto generated files from patch? >> Now I commit 3 times: >> 1) configure.ac >> 2) regenerated 'configure' >> 3) mai

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: >> First of all there is no need to send the configure.ac patch separately. > Ok, but how could I remove auto generated files from patch? > Now I commit 3 times: > 1) configure.ac > 2) regenerated 'configure' > 3) main patch body. > > Then I simply don't

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > > First of all there is no need to send the configure.ac patch separately. Ok, but how could I remove auto generated files from patch? Now I commit 3 times: 1) configure.ac 2) regenerated 'configure' 3) main patch body. Then I

Re: [2/2] oleacc: implemented GetRoleText[A/W] with tests (try3)

2008-10-06 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: First of all there is no need to send the configure.ac patch separately. > +/* zero role number - not documented */ > +ret = GetRoleTextA(0, NULL, 0); > +ok(ret > 0, "GetRoleTextA doesn't return length for zero role number, > got %d\n", ret)

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

2008-10-06 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > I've made these tests but I still don't follow you: > - GetRoleTextW returns length when called with NULL buffer (and zero or > not-zero buflen) I don't see such a test. > - GetRoleTextA returns length only when called with NULL buffer. On zero > bu

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

2008-10-06 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > LoadStringA doesn't return necessary buffer length when called with (buflen = 0) but LoadStringW does. Since I need to return a necessary buffer length from both GetRoleText[A/W] I used LoadStringW in both

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

2008-10-05 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: >>> LoadStringA doesn't return necessary buffer length when called with >>> (buflen = 0) but LoadStringW does. >>> Since I need to return a necessary buffer length from both >>> GetRoleText[A/W] I used LoadStringW in both cases, >>> converting to multib

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

2008-10-05 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > >> LoadStringA doesn't return necessary buffer length when called with >> (buflen = 0) but LoadStringW does. >> Since I need to return a necessary buffer length from both >> GetRoleText[A/W] I used LoadStringW in both cases, >

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

2008-10-05 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > LoadStringA doesn't return necessary buffer length when called with > (buflen = 0) but LoadStringW does. > Since I need to return a necessary buffer length from both > GetRoleText[A/W] I used LoadStringW in both cases, > converting to multibyte in ans

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

2008-10-05 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > >> 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. > > After looking at your patch I don't

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

2008-10-05 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > 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. After looking at your patch I don't see much difference with what Lo

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

2008-10-05 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> 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 buffe

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

2008-10-05 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> 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

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

2008-10-05 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> 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

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

2008-10-05 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> 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 th

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

2008-10-04 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > >> +UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) >> +{ >> +UINT length; >> +WCHAR *roletextW; >> +CHAR *roletextA; >> + >> +TRACE("%u %p %u\n", role, lpRole, rolemax); >> + >> +length = Ge

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

2008-10-04 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > +UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) > +{ > +UINT length; > +WCHAR *roletextW; > +CHAR *roletextA; > + > +TRACE("%u %p %u\n", role, lpRole, rolemax); > + > +length = GetRoleTextW(role, NULL, 0); > +if

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

2008-09-25 Thread Dmitry Timoshkov
Nikolay Sivov <[EMAIL PROTECTED]> wrote: > +UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) > +{ > +UINT length; > +WCHAR *roletext; > +INT ret; > + > +TRACE("%u %p %u\n", role, lpRole, rolemax); > + > +length = GetRoleTextW(role, NULL, 0); > + > +if(!lengt

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

2008-09-25 Thread Alexandre Julliard
Nikolay Sivov <[EMAIL PROTECTED]> writes: > +UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax) > +{ > +UINT length; > +WCHAR *roletext; > +INT ret; > + > +TRACE("%u %p %u\n", role, lpRole, rolemax); > + > +length = GetRoleTextW(role, NULL, 0); > + > +if(!leng

Re: oleacc: implemented GetRoleText[A/W]

2008-09-13 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: >> Why not just use LoadStringW directly? > Because I don't know how to get string length with LoadStringW. It > returns with zero when > called with NULL buffer. I could pass a pointer to single char and > (buflen = = 0) maybe. > Btw, is it normal that

Re: oleacc: implemented GetRoleText[A/W]

2008-09-12 Thread Nikolay Sivov
Dmitry Timoshkov wrote: > "Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > >> +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, >> +LPVOID lpvReserved) >> +{ >> +TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved); >> + >> +switch (fdwReason) >> +{ >> +

Re: oleacc: implemented GetRoleText[A/W]

2008-09-12 Thread Dmitry Timoshkov
"Nikolay Sivov" <[EMAIL PROTECTED]> wrote: > +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, > +LPVOID lpvReserved) > +{ > +TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved); > + > +switch (fdwReason) > +{ > +case DLL_PROCESS_ATTACH: > +