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

talloc.c File Reference

#include "precomp.h"

Go to the source code of this file.

Functions

HANDLE TestProcess (IN DWORD CreationFlags, IN LPSTR AppName)
BOOL CallConsoleApi (IN WORD y)
DWORD main (int argc, char *argv[], char *envp[])

Variables

CHAR String [11] = "teststring"


Function Documentation

BOOL CallConsoleApi IN WORD  y  ) 
 

Definition at line 73 of file talloc.c.

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

00076 { 00077 CHAR_INFO Buffer[10]; 00078 COORD BufferSize; 00079 COORD BufferCoord; 00080 SMALL_RECT WriteRegion; 00081 int i; 00082 BOOL Success; 00083 00084 BufferSize.X = 10; 00085 BufferSize.Y = 1; 00086 BufferCoord.X = 0; 00087 BufferCoord.Y = 0; 00088 WriteRegion.Left = 0; 00089 WriteRegion.Top = y; 00090 WriteRegion.Right = 14; 00091 WriteRegion.Bottom = y; 00092 for (i=0;i<10;i++) { 00093 Buffer[i].Char.AsciiChar = String[i]; 00094 Buffer[i].Attributes = y; 00095 } 00096 Success = WriteConsoleOutput(GetStdHandle(STD_OUTPUT_HANDLE), 00097 Buffer, 00098 BufferSize, 00099 BufferCoord, 00100 &WriteRegion 00101 ); 00102 return Success; 00103 }

DWORD main int  argc,
char *  argv[],
char *  envp[]
 

Definition at line 106 of file talloc.c.

References AllocConsole(), CallConsoleApi(), DbgPrint, FreeConsole(), and TestProcess().

00111 { 00112 if (CallConsoleApi(5)) 00113 DbgPrint("TALLOC: CallConsoleApi succeeded\n"); 00114 00115 if (!AllocConsole()) 00116 DbgPrint("TALLOC: AllocConsole failed\n"); 00117 00118 if (!CallConsoleApi(5)) 00119 DbgPrint("TALLOC: CallConsoleApi failed\n"); 00120 00121 if (AllocConsole()) 00122 DbgPrint("TALLOC: AllocConsole succeeded\n"); 00123 00124 TestProcess(DETACHED_PROCESS,"tdetach"); 00125 00126 TestProcess(0,"tattach"); 00127 00128 Sleep(10000); 00129 00130 if (!CallConsoleApi(6)) 00131 DbgPrint("TALLOC: CallConsoleApi failed\n"); 00132 00133 if (!FreeConsole()) 00134 DbgPrint("TALLOC: FreeConsole failed\n"); 00135 00136 if (CallConsoleApi(5)) 00137 DbgPrint("TALLOC: CallConsoleApi succeeded\n"); 00138 00139 if (FreeConsole()) 00140 DbgPrint("TALLOC: FreeConsole succeeded\n"); 00141 }

HANDLE TestProcess IN DWORD  CreationFlags,
IN LPSTR  AppName
 

Definition at line 30 of file talloc.c.

References DbgPrint, NULL, and TRUE.

Referenced by main().

00034 { 00035 STARTUPINFO StartupInfo; 00036 PROCESS_INFORMATION ProcessInformation; 00037 SECURITY_ATTRIBUTES ProcessAttributes; 00038 00039 ProcessAttributes.nLength = sizeof(SECURITY_ATTRIBUTES); 00040 ProcessAttributes.lpSecurityDescriptor = NULL; 00041 ProcessAttributes.bInheritHandle = TRUE; 00042 00043 StartupInfo.cb = sizeof(StartupInfo); 00044 StartupInfo.lpReserved = "UsedByShell"; 00045 StartupInfo.lpDesktop = "TheresesDesktop"; 00046 StartupInfo.lpTitle = "TheresesTestTitle"; 00047 StartupInfo.dwX = 0; 00048 StartupInfo.dwY = 1; 00049 StartupInfo.dwXSize = 80; 00050 StartupInfo.dwYSize = 50; 00051 StartupInfo.dwFlags = 0;//STARTF_SHELLOVERRIDE; 00052 StartupInfo.wShowWindow = 0;//SW_SHOWDEFAULT; 00053 StartupInfo.lpReserved2 = 0; 00054 StartupInfo.cbReserved2 = 0; 00055 00056 if ( !CreateProcess( 00057 NULL, 00058 AppName, 00059 &ProcessAttributes, 00060 NULL, 00061 TRUE, 00062 CreationFlags, 00063 NULL, 00064 NULL, 00065 &StartupInfo, 00066 &ProcessInformation 00067 ) ) 00068 DbgPrint("TALLOC: CreateProcess failed\n"); 00069 return ProcessInformation.hProcess; 00070 }


Variable Documentation

CHAR String[11] = "teststring"
 

Definition at line 27 of file talloc.c.

Referenced by AlGetString(), CallConsoleApi(), CcLogError(), CmpCreatePerfKeys(), CmpGetBiosDate(), CmpGetBiosVersion(), CmpProcessForSimpleStringSub(), CommonMenuDisplay(), CsrCaptureMessageString(), DumpString(), ExpQueryLegacyDriverInformation(), FE_StreamWriteToScreenBuffer(), FindAttrIndex(), GetSystemLineJ(), GetSystemLineP(), GetSystemLineT(), IopAllocateUnicodeString(), IopAppendStringToValueKey(), IopBootLogToFile(), IopFreeAllocatedUnicodeString(), IopRemoveStringFromValueKey(), IoRaiseInformationalHardError(), KdLogDbgPrint(), KdpTrap(), main(), MapperFindIdentMatch(), MarkLine(), ObQueryNameString(), ObQueryTypeName(), print(), ProcessHex(), RtlCharToInteger(), RtlEraseUnicodeString(), RtlInt64ToUnicodeString(), RtlIntegerToChar(), RtlIntegerToUnicode(), RtlIntegerToUnicodeString(), RtlLargeIntegerToChar(), RtlLargeIntegerToUnicode(), RtlRunDecodeUnicodeString(), RtlRunEncodeUnicodeString(), RtlUnicodeStringToInteger(), SepDumpString(), SepTransceivePipe(), SepWritePipe(), UdfEqualCountedString(), UIntToStr(), and WWSB_DoWriteConsole().


Generated on Sat May 15 19:45:44 2004 for test by doxygen 1.3.7