oledlg: Implement OleUIAddVerbMenuA/W functions [resend]

Nikolay Sivov bunglehead at gmail.com
Wed Dec 24 19:00:21 CST 2008

Vitaly Lipatov wrote:
> В сообщении от 24 декабря 2008 Austin English написал(a):
>> On Wed, Dec 24, 2008 at 7:36 AM, Vitaly Lipatov <lav at etersoft.ru> wrote:
> ...
>>> I know it is common question about testcase, but I think it does not
>>> means with this functions.
>>> Note, I do not fix some functions, I have implemented from scratch it
>>> instead stub.
>>> And my better test case is a popular account application used this
>>> functions.
> ...
>> I'm not saying your patch is wrong by any means. Testcases serve as
>> documentation of the Win32 API, and also help prevent regressions in
>> those functions.
> I agree, but I have not idea how to make test for it. I wrote this code about 
> one year ago and do not remember how it works :) But I use these functions 
> every day in an accounting application.
You could start with testing for some special cases (such as NULL input 
For me your comment looks suspicious:

	+ * TODO
	+ *  Check if OLE object has no verbs


	+    hr = IOleObject_EnumVerbs(lpOleObj, &pEnumVerbs);
	+    if (hr == S_OK) {
Will this hr be OLEOBJ_E_NOVERBS when no verbs present?
If it's so you're actually checking for this.
This one needs a testcase for example.

At the end you return HMENU without NULL check

	+    *lphMenu = popup;
	+    return TRUE;

Does native crash on it or not? I'm not sure.

The same about SetLastError on failure - this should be checked by testing it directly.

More information about the wine-devel mailing list