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

wow64csr.c File Reference

#include "csrdll.h"
#include "ldrp.h"
#include "ntwow64.h"

Go to the source code of this file.

Functions

NTSTATUS CsrClientConnectToServer (IN PWSTR ObjectDirectory, IN ULONG ServerDllIndex, IN PCSR_CALLBACK_INFO CallbackInformation OPTIONAL, IN PVOID ConnectionInformation, IN OUT PULONG ConnectionInformationLength OPTIONAL, OUT PBOOLEAN CalledFromServer OPTIONAL)
NTSTATUS CsrNewThread (VOID)
NTSTATUS CsrIdentifyAlertableThread (VOID)
NTSTATUS CsrSetPriorityClass (IN HANDLE ProcessHandle, IN OUT PULONG PriorityClass)
NTSTATUS CsrClientCallServer (IN OUT PCSR_API_MSG m, IN OUT PCSR_CAPTURE_HEADER CaptureBuffer OPTIONAL, IN CSR_API_NUMBER ApiNumber, IN ULONG ArgLength)
PCSR_CAPTURE_HEADER CsrAllocateCaptureBuffer (IN ULONG CountMessagePointers, IN ULONG Sizecd)
VOID CsrFreeCaptureBuffer (IN PCSR_CAPTURE_HEADER CaptureBuffer)
ULONG CsrAllocateMessagePointer (IN OUT PCSR_CAPTURE_HEADER CaptureBuffer, IN ULONG Length, OUT PVOID *Pointer)
VOID CsrCaptureMessageBuffer (IN OUT PCSR_CAPTURE_HEADER CaptureBuffer, IN PVOID Buffer OPTIONAL, IN ULONG Length, OUT PVOID *CapturedBuffer)
VOID CsrCaptureMessageString (IN OUT PCSR_CAPTURE_HEADER CaptureBuffer, IN PCSTR String OPTIONAL, IN ULONG Length, IN ULONG MaximumLength, OUT PSTRING CapturedString)
PLARGE_INTEGER CsrCaptureTimeout (IN ULONG MilliSeconds, OUT PLARGE_INTEGER Timeout)
VOID CsrProbeForWrite (IN PVOID Address, IN ULONG Length, IN ULONG Alignment)
VOID CsrProbeForRead (IN PVOID Address, IN ULONG Length, IN ULONG Alignment)


Function Documentation

PCSR_CAPTURE_HEADER CsrAllocateCaptureBuffer IN ULONG  CountMessagePointers,
IN ULONG  Sizecd
 

Definition at line 88 of file wow64csr.c.

References NtWow64CsrAllocateCaptureBuffer().

Referenced by AddConsoleAliasInternal(), AllocConsoleInternal(), CreateConsoleScreenBuffer(), CsrClientConnectToServer(), DeviceEventWorker(), ExpungeConsoleCommandHistoryInternal(), GetConsoleAliasesInternal(), GetConsoleAliasesLengthInternal(), GetConsoleAliasExesInternal(), GetConsoleAliasInternal(), GetConsoleCommandHistoryInternal(), GetConsoleCommandHistoryLengthInternal(), GetConsoleFontInfo(), GetConsoleInput(), GetConsoleTitleInternal(), ReadConsoleInternal(), ReadConsoleOutputInternal(), ReadConsoleOutputString(), RegisterConsoleVDM(), SetConsoleKeyShortcuts(), SetConsoleNumberOfCommandsInternal(), SetConsoleTitleInternal(), VDMConsoleOperation(), WriteConsoleInputInternal(), WriteConsoleInternal(), WriteConsoleOutputInternal(), and WriteConsoleOutputString().

00092 { 00093 return NtWow64CsrAllocateCaptureBuffer(CountMessagePointers, Sizecd); 00094 }

ULONG CsrAllocateMessagePointer IN OUT PCSR_CAPTURE_HEADER  CaptureBuffer,
IN ULONG  Length,
OUT PVOID *  Pointer
 

Definition at line 109 of file wow64csr.c.

References NtWow64CsrAllocateMessagePointer().

Referenced by CsrCaptureMessageBuffer(), CsrCaptureMessageString(), and CsrClientConnectToServer().

00114 { 00115 00116 return NtWow64CsrAllocateMessagePointer(CaptureBuffer, Length, Pointer); 00117 00118 }

VOID CsrCaptureMessageBuffer IN OUT PCSR_CAPTURE_HEADER  CaptureBuffer,
IN PVOID Buffer  OPTIONAL,
IN ULONG  Length,
OUT PVOID *  CapturedBuffer
 

Definition at line 122 of file wow64csr.c.

References Buffer, and NtWow64CsrCaptureMessageBuffer().

Referenced by AddConsoleAliasInternal(), AllocConsoleInternal(), CreateConsoleScreenBuffer(), DeviceEventWorker(), ExpungeConsoleCommandHistoryInternal(), GetConsoleAliasesInternal(), GetConsoleAliasesLengthInternal(), GetConsoleAliasExesInternal(), GetConsoleAliasInternal(), GetConsoleCommandHistoryInternal(), GetConsoleCommandHistoryLengthInternal(), GetConsoleFontInfo(), GetConsoleInput(), GetConsoleTitleInternal(), ReadConsoleInternal(), ReadConsoleOutputInternal(), ReadConsoleOutputString(), RegisterConsoleVDM(), SetConsoleKeyShortcuts(), SetConsoleNumberOfCommandsInternal(), SetConsoleTitleInternal(), VDMConsoleOperation(), WriteConsoleInputInternal(), WriteConsoleInternal(), WriteConsoleOutputInternal(), and WriteConsoleOutputString().

00128 { 00129 00130 NtWow64CsrCaptureMessageBuffer(CaptureBuffer,Buffer,Length,CapturedBuffer); 00131 00132 }

VOID CsrCaptureMessageString IN OUT PCSR_CAPTURE_HEADER  CaptureBuffer,
IN PCSTR String  OPTIONAL,
IN ULONG  Length,
IN ULONG  MaximumLength,
OUT PSTRING  CapturedString
 

Definition at line 135 of file wow64csr.c.

References NtWow64CsrCaptureMessageString(), and String.

00143 { 00144 00145 NtWow64CsrCaptureMessageString(CaptureBuffer, String, Length, MaximumLength, CapturedString); 00146 00147 }

PLARGE_INTEGER CsrCaptureTimeout IN ULONG  MilliSeconds,
OUT PLARGE_INTEGER  Timeout
 

Definition at line 152 of file wow64csr.c.

References NULL.

00156 { 00157 if (MilliSeconds == -1) { 00158 return( NULL ); 00159 } 00160 else { 00161 Timeout->QuadPart = Int32x32To64( MilliSeconds, -10000 ); 00162 return( (PLARGE_INTEGER)Timeout ); 00163 } 00164 }

NTSTATUS CsrClientCallServer IN OUT PCSR_API_MSG  m,
IN OUT PCSR_CAPTURE_HEADER CaptureBuffer  OPTIONAL,
IN CSR_API_NUMBER  ApiNumber,
IN ULONG  ArgLength
 

Definition at line 75 of file wow64csr.c.

References NtWow64CsrClientCallServer().

Referenced by AddConsoleAliasInternal(), AllocConsoleInternal(), CallUserpExitWindowsEx(), CallUserpRegisterLogonProcess(), CloseConsoleHandle(), ConsoleMenuControl(), CreateConsoleScreenBuffer(), CsrClientConnectToServer(), CsrIdentifyAlertableThread(), CsrSetPriorityClass(), DeviceEventWorker(), DuplicateConsoleHandle(), EndTask(), ExpungeConsoleCommandHistoryInternal(), FillConsoleOutput(), FlushConsoleInputBuffer(), FreeConsoleInternal(), GenerateConsoleCtrlEvent(), GetConsoleAliasesInternal(), GetConsoleAliasesLengthInternal(), GetConsoleAliasExesInternal(), GetConsoleAliasExesLengthInternal(), GetConsoleAliasInternal(), GetConsoleCommandHistoryInternal(), GetConsoleCommandHistoryLengthInternal(), GetConsoleCP(), GetConsoleCursorInfo(), GetConsoleDisplayMode(), GetConsoleFontInfo(), GetConsoleFontSize(), GetConsoleHandleInformation(), GetConsoleHardwareState(), GetConsoleInput(), GetConsoleKeyboardLayoutNameWorker(), GetConsoleLangId(), GetConsoleMode(), GetConsoleOutputCP(), GetConsoleScreenBufferInfo(), GetConsoleTitleInternal(), GetConsoleWindow(), GetCurrentConsoleFont(), GetLargestConsoleWindowSize(), GetNumberOfConsoleFonts(), GetNumberOfConsoleInputEvents(), GetNumberOfConsoleMouseButtons(), GetThreadDesktop(), InvalidateConsoleDIBits(), Logon(), OpenConsoleWInternal(), ReadConsoleInternal(), ReadConsoleOutputInternal(), ReadConsoleOutputString(), RegisterConsoleVDM(), RegisterServicesProcess(), ScrollConsoleScreenBufferInternal(), SetConsoleActiveScreenBuffer(), SetConsoleCommandHistoryMode(), SetConsoleCP(), SetConsoleCursor(), SetConsoleCursorInfo(), SetConsoleCursorPosition(), SetConsoleDisplayMode(), SetConsoleFont(), SetConsoleHandleInformation(), SetConsoleHardwareState(), SetConsoleIcon(), SetConsoleKeyShortcuts(), SetConsoleMenuClose(), SetConsoleMode(), SetConsoleNumberOfCommandsInternal(), SetConsoleOutputCPInternal(), SetConsolePaletteInternal(), SetConsoleScreenBufferSize(), SetConsoleTextAttribute(), SetConsoleTitleInternal(), SetConsoleWindowInfo(), SetLastConsoleEventActiveInternal(), ShowConsoleCursor(), VDMConsoleOperation(), VerifyConsoleIoHandle(), WriteConsoleInputInternal(), WriteConsoleInternal(), WriteConsoleOutputInternal(), and WriteConsoleOutputString().

00081 { 00082 00083 return NtWow64CsrClientCallServer(m,CaptureBuffer,ApiNumber,ArgLength); 00084 }

NTSTATUS CsrClientConnectToServer IN PWSTR  ObjectDirectory,
IN ULONG  ServerDllIndex,
IN PCSR_CALLBACK_INFO CallbackInformation  OPTIONAL,
IN PVOID  ConnectionInformation,
IN OUT PULONG ConnectionInformationLength  OPTIONAL,
OUT PBOOLEAN CalledFromServer  OPTIONAL
 

Definition at line 31 of file wow64csr.c.

References NtWow64CsrClientConnectToServer().

Referenced by ConnectConsoleInternal(), and UserConnectToServer().

00040 { 00041 return NtWow64CsrClientConnectToServer(ObjectDirectory, 00042 ServerDllIndex, 00043 CallbackInformation, 00044 ConnectionInformation, 00045 ConnectionInformationLength, 00046 CalledFromServer); 00047 }

VOID CsrFreeCaptureBuffer IN PCSR_CAPTURE_HEADER  CaptureBuffer  ) 
 

Definition at line 98 of file wow64csr.c.

References NtWow64CsrFreeCaptureBuffer().

Referenced by AddConsoleAliasInternal(), AllocConsoleInternal(), CreateConsoleScreenBuffer(), CsrClientConnectToServer(), DeviceEventWorker(), ExpungeConsoleCommandHistoryInternal(), GetConsoleAliasesInternal(), GetConsoleAliasesLengthInternal(), GetConsoleAliasExesInternal(), GetConsoleAliasInternal(), GetConsoleCommandHistoryInternal(), GetConsoleCommandHistoryLengthInternal(), GetConsoleFontInfo(), GetConsoleInput(), GetConsoleTitleInternal(), ReadConsoleInternal(), ReadConsoleOutputInternal(), ReadConsoleOutputString(), RegisterConsoleVDM(), SetConsoleKeyShortcuts(), SetConsoleNumberOfCommandsInternal(), SetConsoleTitleInternal(), VDMConsoleOperation(), WriteConsoleInputInternal(), WriteConsoleInternal(), WriteConsoleOutputInternal(), and WriteConsoleOutputString().

00102 { 00103 00104 NtWow64CsrFreeCaptureBuffer(CaptureBuffer); 00105 }

NTSTATUS CsrIdentifyAlertableThread VOID   ) 
 

Definition at line 58 of file wow64csr.c.

References NtWow64CsrIdentifyAlertableThread().

00059 { 00060 return NtWow64CsrIdentifyAlertableThread(); 00061 }

NTSTATUS CsrNewThread VOID   ) 
 

Definition at line 50 of file wow64csr.c.

References NtWow64CsrNewThread().

00053 { 00054 return NtWow64CsrNewThread(); 00055 }

VOID CsrProbeForRead IN PVOID  Address,
IN ULONG  Length,
IN ULONG  Alignment
 

Definition at line 238 of file wow64csr.c.

References ASSERT, CHAR, and RtlRaiseStatus().

00246 : 00247 00248 This function probes a structure for read accessibility. 00249 If the structure is not accessible, then an exception is raised. 00250 00251 Arguments: 00252 00253 Address - Supplies a pointer to the structure to be probed. 00254 00255 Length - Supplies the length of the structure. 00256 00257 Alignment - Supplies the required alignment of the structure expressed 00258 as the number of bytes in the primitive datatype (e.g., 1 for char, 00259 2 for short, 4 for long, and 8 for quad). 00260 00261 Return Value: 00262 00263 None. 00264 00265 --*/ 00266 00267 { 00268 volatile CHAR *StartAddress; 00269 volatile CHAR *EndAddress; 00270 CHAR Temp; 00271 00272 // 00273 // If the structure has zero length, then do not probe the structure for 00274 // read accessibility or alignment. 00275 // 00276 00277 if (Length != 0) { 00278 00279 // 00280 // If the structure is not properly aligned, then raise a data 00281 // misalignment exception. 00282 // 00283 00284 ASSERT((Alignment == 1) || (Alignment == 2) || 00285 (Alignment == 4) || (Alignment == 8)); 00286 StartAddress = (volatile CHAR *)Address; 00287 00288 if (((ULONG_PTR)StartAddress & (Alignment - 1)) != 0) { 00289 RtlRaiseStatus(STATUS_DATATYPE_MISALIGNMENT); 00290 } else { 00291 Temp = *StartAddress; 00292 EndAddress = StartAddress + Length - 1; 00293 Temp = *EndAddress; 00294 } 00295 } 00296 } }

VOID CsrProbeForWrite IN PVOID  Address,
IN ULONG  Length,
IN ULONG  Alignment
 

Definition at line 167 of file wow64csr.c.

References ASSERT, CHAR, CsrNtSysInfo, and RtlRaiseStatus().

00175 : 00176 00177 This function probes a structure for read accessibility. 00178 If the structure is not accessible, then an exception is raised. 00179 00180 Arguments: 00181 00182 Address - Supplies a pointer to the structure to be probed. 00183 00184 Length - Supplies the length of the structure. 00185 00186 Alignment - Supplies the required alignment of the structure expressed 00187 as the number of bytes in the primitive datatype (e.g., 1 for char, 00188 2 for short, 4 for long, and 8 for quad). 00189 00190 Return Value: 00191 00192 None. 00193 00194 --*/ 00195 00196 { 00197 volatile CHAR *StartAddress; 00198 volatile CHAR *EndAddress; 00199 CHAR Temp; 00200 00201 // 00202 // If the structure has zero length, then do not probe the structure for 00203 // write accessibility or alignment. 00204 // 00205 00206 if (Length != 0) { 00207 00208 // 00209 // If the structure is not properly aligned, then raise a data 00210 // misalignment exception. 00211 // 00212 00213 ASSERT((Alignment == 1) || (Alignment == 2) || 00214 (Alignment == 4) || (Alignment == 8)); 00215 StartAddress = (volatile CHAR *)Address; 00216 00217 if (((ULONG_PTR)StartAddress & (Alignment - 1)) != 0) { 00218 RtlRaiseStatus(STATUS_DATATYPE_MISALIGNMENT); 00219 } else { 00220 // 00221 // BUG, BUG - this should not be necessary once the 386 kernel 00222 // makes system space inaccessable to user mode. 00223 // 00224 if ((ULONG_PTR)StartAddress > CsrNtSysInfo.MaximumUserModeAddress) { 00225 RtlRaiseStatus(STATUS_ACCESS_VIOLATION); 00226 } 00227 00228 Temp = *StartAddress; 00229 *StartAddress = Temp; 00230 EndAddress = StartAddress + Length - 1; 00231 Temp = *EndAddress; 00232 *EndAddress = Temp; 00233 } 00234 } 00235 }

NTSTATUS CsrSetPriorityClass IN HANDLE  ProcessHandle,
IN OUT PULONG  PriorityClass
 

Definition at line 64 of file wow64csr.c.

References NtWow64CsrSetPriorityClass().

00068 { 00069 00070 return NtWow64CsrSetPriorityClass(ProcessHandle, PriorityClass); 00071 00072 }


Generated on Sat May 15 19:46:09 2004 for test by doxygen 1.3.7