1/4 NtCreateMailslotFile tests

Dmitry Timoshkov dmitry at codeweavers.com
Sun Feb 11 22:27:49 CST 2007

"Jeff Latimer" <lats at yless4u.com.au> wrote:

> +    rc = pNtCreateMailslotFile(&hslot, DesiredAccess,
> +         &attr, &IoStatusBlock, CreateOptions, MailslotQuota, MaxMessageSize,
> +         &TimeOut);
> +    ok( rc == S_OK, "Create MailslotFile failed rc = %x %u\n", rc, GetLastError());

NT APIs return STATUS_xxx error codes, S_OK is an OLE error value.

> +    ok( hslot != INVALID_HANDLE_VALUE, "Handle is invalid\n");

INVALID_HANDLE_VALUE is a kernel32 thing, NT APIs don't use it. Most likely
you need to test returned value against 0.

> +    ok( CloseHandle(hslot), "CloseHandle failed\n");

To close the handle returned by an NT API you have you use an NT API as well.


More information about the wine-devel mailing list