test: tdetach.c File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# tdetach.c File Reference

`#include "precomp.h"`

Go to the source code of this file.

## Functions

BOOL | CallConsoleApi (IN WORD y)
DWORD | main (int argc, char *argv[], char *envp[])

## Variables

CHAR | String [11] = "detachedpr"

## Function Documentation

BOOL CallConsoleApi | ( | IN WORD | y | ) |

Definition at line 28 of file tdetach.c.

References BOOL, Buffer, BufferSize, STD_OUTPUT_HANDLE, and String.

Referenced by main().

    00031 {
    00032     CHAR_INFO Buffer[10];
    00033     COORD BufferSize;
    00034     COORD BufferCoord;
    00035     SMALL_RECT WriteRegion;
    00036     int i;
    00037     BOOL Success;
    00038
    00039     BufferSize.X = 10;
    00040     BufferSize.Y = 1;
    00041     BufferCoord.X = 0;
    00042     BufferCoord.Y = 0;
    00043     WriteRegion.Left = 0;
    00044     WriteRegion.Top = y;
    00045     WriteRegion.Right = 14;
    00046     WriteRegion.Bottom = y;
    00047     for (i=0;i<10;i++) {
    00048         Buffer[i].Char.AsciiChar = String[i];
    00049         Buffer[i].Attributes = y;
    00050     }
    00051     Success = WriteConsoleOutput(GetStdHandle(STD_OUTPUT_HANDLE),
    00052                                  Buffer,
    00053                                  BufferSize,
    00054                                  BufferCoord,
    00055                                  &WriteRegion
    00056                                 );
    00057     return Success;
    00058 }

DWORD main | ( | int | argc,
|  | char * | argv[],
|  | char * | envp[]
| ) |

Definition at line 61 of file tdetach.c.

References CallConsoleApi(), and DbgPrint.

    00066 {
    00067     DbgPrint("entering tdetach\n");
    00068     if (CallConsoleApi(5))
    00069         DbgPrint("TDETACH: CallConsoleApi succeeded\n");
    00070 }

## Variable Documentation

CHAR String[11] = "detachedpr"

| Definition at line 25 of file tdetach.c.