msi: Add Set/GetLastError to the property tests

James Hawkins truiken at
Wed Aug 23 11:37:59 CDT 2006

On 8/23/06, Alexandre Julliard <julliard at> wrote:
> "James Hawkins" <truiken at> writes:
> > @@ -2087,33 +2087,44 @@ static void test_getproperty(void)
> >      ok( hPackage != 0, " Failed to create package\n");
> >
> >      /* set the property */
> > +    SetLastError(0xdeadbeef);
> >      r = MsiSetProperty(hPackage, "Name", "Value");
> >      ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
> > +    ok( GetLastError() == 0xdeadbeef, "Expected 0xdeadbeef, got %ld\n", GetLastError());
> In general, testing that last error isn't set on success is not
> useful, unless you really have an app that depends on it.

I'm working on a bug that is very elusive, and I'm just trying to
narrow the possibilities for what's causing the behavior.  This set of
MsiGetProperty calls is what the app is doing exactly, and it fails in
WIne and succeeds in Windows, so I'm trying to figure out what we're
doing differently.  If anyone else decides to debug the same problem,
they can look at the tests and say, "hmm the GetLastError is right, so
that's not the problem."

James Hawkins

More information about the wine-devel mailing list