[2/6] winspool/tests: Add tests for AddForm

Detlef Riekenberg wine.dev at web.de
Sun Apr 13 16:18:13 CDT 2008


On So, 2008-04-13 at 02:18 +0200, Marcel Partap wrote:
> Subject: [PATCH] winspool/tests: Add tests for AddForm

A test for AddForm / DeleteForm can't work with the stubs in our
"winspool.drv".
The implementation is needed first.

> +    SetLastError(MAGIC_DEAD);

Plase do not use MAGIG_DEAD, it was a mistake in my first Patchset.
Use the real Value instead.

> +    res = AddFormA(NULL, 0, NULL);
> +    RETURN_ON_DEACTIVATED_SPOOLER(res);
> +    ok( !res && (GetLastError() == ERROR_INVALID_LEVEL),
> +        "returned %d with %d (expected '0' with ERROR_INVALID_LEVEL)\n", res, GetLastError());
> +
> +    SetLastError(MAGIC_DEAD);
> +    res = AddFormA((HANDLE)MAGIC_DEAD, 1, NULL);

> +    RETURN_ON_DEACTIVATED_SPOOLER(res);

Use this macro only once.
I did not test, which AddFormA return RPC_S_SERVER_UNAVAILABLE.

Did you test the code with a non - admin account?
Many functions in winspool.drv return ERROR_ACCESS_DENIED


-- 
 
By by ... Detlef





More information about the wine-devel mailing list