Exemplo n.º 1
0
/*
 * @implemented
 */
BOOL
WINAPI
UpdatePerUserSystemParameters(DWORD dwReserved,
                              BOOL bEnable)
{
    return NtUserUpdatePerUserSystemParameters(dwReserved, bEnable);
}
Exemplo n.º 2
0
NTSTATUS
NTAPI
UserInitialize(VOID)
{
    static const DWORD wPattern55AA[] = /* 32 bit aligned */
    { 0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa,
      0x55555555, 0xaaaaaaaa, 0x55555555, 0xaaaaaaaa };
    HBITMAP hPattern55AABitmap = NULL;
    NTSTATUS Status;

// Set W32PF_Flags |= (W32PF_READSCREENACCESSGRANTED | W32PF_IOWINSTA)
// Create Event for Diconnect Desktop.

    Status = UserCreateWinstaDirectory();
    if (!NT_SUCCESS(Status)) return Status;

    /* Initialize Video */
    Status = InitVideo();
    if (!NT_SUCCESS(Status)) return Status;

// {
//     DrvInitConsole.
//     DrvChangeDisplaySettings.
//     Update Shared Device Caps.
//     Initialize User Screen.
// }
// Create ThreadInfo for this Thread!
// {

    /* Initialize the current thread */
    Status = InitThreadCallback(PsGetCurrentThread());
    if (!NT_SUCCESS(Status)) return Status;

// }
// Set Global SERVERINFO Error flags.
// Load Resources.

    NtUserUpdatePerUserSystemParameters(0, TRUE);

    if (gpsi->hbrGray == NULL)
    {
        hPattern55AABitmap = GreCreateBitmap(8, 8, 1, 1, (LPBYTE)wPattern55AA);
        gpsi->hbrGray = IntGdiCreatePatternBrush(hPattern55AABitmap);
        GreDeleteObject(hPattern55AABitmap);
        GreSetBrushOwner(gpsi->hbrGray, GDI_OBJ_HMGR_PUBLIC);
    }

    return STATUS_SUCCESS;
}
INT
Test_NtUserUpdatePerUserSystemParameters(PTESTINFO pti)
{
    BOOL bScrRd;

    TEST(NtUserUpdatePerUserSystemParameters(0, 0) == 0);
    TEST(NtUserUpdatePerUserSystemParameters(0, 1) == 0);
    TEST(NtUserUpdatePerUserSystemParameters(1, 0) == 0);
    TEST(NtUserUpdatePerUserSystemParameters(1, 1) == 0);
    TEST(NtUserUpdatePerUserSystemParameters(0, 2) == 0);
    TEST(NtUserUpdatePerUserSystemParameters(0, -1) == 0);

//    NtUserSystemParametersInfo(SPI_SETSCREENREADER, 1, 0, 0);
    NtUserSystemParametersInfo(SPI_GETSCREENREADER, 0, &bScrRd, 0);
    printf("bScrRd = %d\n", bScrRd);

    return APISTATUS_NORMAL;
}