Changeset 22056


Ignore:
Timestamp:
Dec 31, 2012, 12:45:31 PM (8 years ago)
Author:
dmik
Message:

testapp: Upadate stdin testcase.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/testapp/console/file/stdin.c

    r22054 r22056  
    3535int _main(int argc, char **argv)
    3636{
    37     HANDLE h = GetStdHandle(STD_INPUT_HANDLE);
    38     printf("STD_INPUT_HANDLE %x = %x\n", STD_INPUT_HANDLE, h);
     37    HANDLE hin = GetStdHandle(STD_INPUT_HANDLE);
     38    DWORD tin = GetFileType(hin);
     39    printf("STD_INPUT_HANDLE %x = %x, type %d\n", STD_INPUT_HANDLE, hin, tin);
    3940
    40     DWORD type = GetFileType(h);
    41     printf("handle type %d\n", type);
     41    HANDLE hout = GetStdHandle(STD_OUTPUT_HANDLE);
     42    DWORD tout = GetFileType(hout);
     43    printf("STD_OUTPUT_HANDLE %x = %x, type %d\n", STD_OUTPUT_HANDLE, hout, tout);
     44
     45    HANDLE herr = GetStdHandle(STD_ERROR_HANDLE);
     46    DWORD terr = GetFileType(herr);
     47    printf("STD_ERROR_HANDLE %x = %x, type %d\n", STD_ERROR_HANDLE, herr, terr);
     48
     49        const char *str = "beef\nfish\n";
     50    DWORD written;
     51        WriteFile(hout, str, strlen(str), &written, NULL);
    4252
    4353    return 0;
Note: See TracChangeset for help on using the changeset viewer.