Hi.

While doing some Regression-Testing for wine ("http://www.winehq.org";),
I run into some Problems with qemu and win95/win98 as guest.

When calling GetPrinterDriverDirectoryA with bad/incomplete Parameter,
GetLastError() returns "0" (ERROR_SUCCESS) on qemu with win95 or win98
as guest, while vmware/win98 or native/win98 returns
"87" (ERROR_INVALID_PARAMETER).

Example:
winspool.drv:info on http://test.winehq.org/data/200511161000/#Win98

host:
Ubuntu linux 5.04 (Kernel: 2.6.10)
qemu: 0.7.2 and cvs-snapshot 2005-11-20


guest:
win98se (german)
win95c  (german)

I stripped the failing Tests down to a short App.
(Source attached, binary available on request)

Different compilers where used:
i686-mingw32msvc-gcc (GCC) 3.3.3 (other linux system)
i586-mingw32msvc-gcc 3.4.2 (on my linux)

For the short Test-App, i used the Pelles C-Compiler:
pocc 3.00.10 (with wine on my linux)



Any Ideas how to fix this?

(More Problems with qemu exists, but for me, the bug above is important)



-- 
By By ...
      ... Detlef
/*
 * Display the bad results in qemu
 */

#include <stdio.h>
#include <windows.h>
#include <winspool.h>


int main(int argc, char ** argv)
{
    LPBYTE  buffer = NULL;
    DWORD   cbBuf = 0;
    DWORD   pcbNeeded = 0;
    DWORD   res;

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, 0, &cbBuf);
    printf("first call returned 0x%x, size 0x%lx/%ld\n", res, cbBuf, cbBuf);

    if (!cbBuf) return 1;

    buffer = HeapAlloc(GetProcessHeap(), 0, cbBuf*2);
    if (buffer == NULL) {
        printf("No buffer (need %ld bytes)\n", cbBuf*2);
        return 1 ;
    }

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, &pcbNeeded);

    printf("expected '0' with ERROR_INVALID_USER_BUFFER "
         "or '!=0' with ERROR_INVALID_PARAMETER "
         "got %d with lasterror == %ld\n", res, GetLastError());

    SetLastError(0x00dead00);
    res = GetPrinterDriverDirectoryA( NULL, NULL, 1, NULL, cbBuf, NULL);

    printf("expected '0' with RPC_X_NULL_REF_POINTER "
         "or '!=0' with ERROR_INVALID_PARAMETER "
         "got %d with lasterror == %ld\n", res, GetLastError());

    HeapFree(GetProcessHeap(), 0, buffer);
    return 0;
}

_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to