summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io/qprocess/testSetNamedPipeHandleState/main.cpp
blob: 3f7260dd4e7751e285969afebaa5989217be7300 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include <windows.h>

int main()
{
    DWORD mode = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT;
    if (SetNamedPipeHandleState(GetStdHandle(STD_INPUT_HANDLE), &mode, NULL, NULL))
        return 0;
    return GetLastError();
}