ADVAPI32: Start test for service tests

Rolf Kalbermatter r.kalbermatter at
Mon May 21 04:00:22 CDT 2007

James Hawkins [mailto:truiken at] wrote:

>+    ok(size <= 1, "size should be <= 1 was %d!", size);
>This is a bad test.  According to msdn, GetServiceDisplayName does not
>modify lpcchBuffer on error, so size should be exactly 0.

MSDN says a lot of things. On my XP SP2 it returns 1 as size when passed
an empty service name. Also failing here is a bit ambigeuos since the
dunction also fails when a NULL pointer is passed or the buffer is to
small, but it does change the size into what it expects in these two

>+static BOOL test_service_info(SC_HANDLE hscm)
>test functions are void, not BOOL.  You're never going to do anything but
>return, and there's no value >to check by the caller.

I took this more or less directly from registry.c in the same directory.

>+    ok(size, "size should be returned!");
>And what is the size?  Tests are supposed to be exact.  If our
>is incorrect, and we return size as 39491, that's certainly not correct,
>this test won't fail when it should.

This won't work for localized Windows versions. The display name is possibly
translated. Also, on XP SP2 the A function returns the size in ASCI chars
the W function will need in bytes. Not a behaviour I feel Wine should
without an app that would need that behaviour.

I'll be gone for two weeks for vacation. If anyone wants to continue on that
please feel free. Otherwise I'll be picking this up afterwards.

Rolf Kalbermatter

More information about the wine-devel mailing list