ReactOS  0.4.14-dev-77-gd9e7c48
rtlp.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _RTL_BITMAP64
 
struct  _RTL_BITMAP_RUN64
 

Macros

#define PAGED_CODE_RTL()
 
#define SWAPD(x)   (x)
 
#define SWAPW(x)   (x)
 
#define SWAPQ(x)   (x)
 
#define ROUND_DOWN(n, align)   (((ULONG_PTR)(n)) & ~((align) - 1l))
 
#define ROUND_UP(n, align)   ROUND_DOWN(((ULONG_PTR)(n)) + (align) - 1, (align))
 
#define RVA(m, b)   ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))
 
#define RtlpAllocateStringMemory   RtlpAllocateMemory
 
#define RtlpFreeStringMemory   RtlpFreeMemory
 
#define NtGetTickCount   RtlGetTickCount
 
#define TAG_USTR   'RTSU'
 
#define TAG_ASTR   'RTSA'
 
#define TAG_OSTR   'RTSO'
 

Typedefs

typedef struct _RTL_BITMAP64 RTL_BITMAP64
 
typedef struct _RTL_BITMAP64PRTL_BITMAP64
 
typedef struct _RTL_BITMAP_RUN64 RTL_BITMAP_RUN64
 
typedef struct _RTL_BITMAP_RUN64PRTL_BITMAP_RUN64
 

Functions

NTSTATUS NTAPI RtlpSafeCopyMemory (_Out_writes_bytes_all_(Length) VOID UNALIGNED *Destination, _In_reads_bytes_(Length) CONST VOID UNALIGNED *Source, _In_ SIZE_T Length)
 
VOID NTAPI RtlpGetStackLimits (PULONG_PTR LowLimit, PULONG_PTR HighLimit)
 
PEXCEPTION_REGISTRATION_RECORD NTAPI RtlpGetExceptionList (VOID)
 
VOID NTAPI RtlpSetHeapParameters (IN PRTL_HEAP_PARAMETERS Parameters)
 
VOID NTAPI RtlpSetExceptionList (PEXCEPTION_REGISTRATION_RECORD NewExceptionList)
 
BOOLEAN NTAPI RtlCallVectoredExceptionHandlers (IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context)
 
VOID NTAPI RtlCallVectoredContinueHandlers (IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context)
 
PVOID NTAPI RtlpAllocateMemory (SIZE_T Bytes, ULONG Tag)
 
VOID NTAPI RtlpFreeMemory (PVOID Mem, ULONG Tag)
 
KPROCESSOR_MODE NTAPI RtlpGetMode (VOID)
 
BOOLEAN NTAPI RtlpCaptureStackLimits (IN ULONG_PTR Ebp, IN ULONG_PTR *StackBegin, IN ULONG_PTR *StackEnd)
 
NTSTATUS NTAPI RtlDeleteHeapLock (IN OUT PHEAP_LOCK Lock)
 
NTSTATUS NTAPI RtlEnterHeapLock (IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
 
BOOLEAN NTAPI RtlTryEnterHeapLock (IN OUT PHEAP_LOCK Lock, IN BOOLEAN Exclusive)
 
NTSTATUS NTAPI RtlInitializeHeapLock (IN OUT PHEAP_LOCK *Lock)
 
NTSTATUS NTAPI RtlLeaveHeapLock (IN OUT PHEAP_LOCK Lock)
 
BOOLEAN NTAPI RtlpCheckForActiveDebugger (VOID)
 
BOOLEAN NTAPI RtlpHandleDpcStackException (IN PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, IN ULONG_PTR RegistrationFrameEnd, IN OUT PULONG_PTR StackLow, IN OUT PULONG_PTR StackHigh)
 
ULONG NTAPI RtlGetTickCount (VOID)
 
BOOLEAN NTAPI RtlpSetInDbgPrint (VOID)
 
VOID NTAPI RtlpClearInDbgPrint (VOID)
 
EXCEPTION_DISPOSITION NTAPI RtlpExecuteHandlerForUnwind (PEXCEPTION_RECORD ExceptionRecord, PEXCEPTION_REGISTRATION_RECORD RegistrationFrame, PCONTEXT Context, PVOID DispatcherContext, PEXCEPTION_ROUTINE ExceptionHandler)
 
VOID NTAPI RtlpCheckLogException (IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT ContextRecord, IN PVOID ContextData, IN ULONG Size)
 
VOID NTAPI RtlpCaptureContext (OUT PCONTEXT ContextRecord)
 
ULONG NTAPI DebugService (IN ULONG Service, IN PVOID Argument1, IN PVOID Argument2, IN PVOID Argument3, IN PVOID Argument4)
 
VOID NTAPI DebugService2 (IN PVOID Argument1, IN PVOID Argument2, IN ULONG Service)
 
NTSTATUS RtlpInitializeTimerThread (VOID)
 
WCHAR NTAPI RtlpUpcaseUnicodeChar (IN WCHAR Source)
 
WCHAR NTAPI RtlpDowncaseUnicodeChar (IN WCHAR Source)
 
VOID NTAPI LdrpInitializeProcessCompat (PVOID pProcessActctx, PVOID *pOldShimData)
 

Variables

PVOID MmHighestUserAddress
 
HANDLE TimerThreadHandle
 

Macro Definition Documentation

◆ NtGetTickCount

#define NtGetTickCount   RtlGetTickCount

Definition at line 146 of file rtlp.h.

◆ PAGED_CODE_RTL

#define PAGED_CODE_RTL ( )

Definition at line 16 of file rtlp.h.

◆ ROUND_DOWN

#define ROUND_DOWN (   n,
  align 
)    (((ULONG_PTR)(n)) & ~((align) - 1l))

Definition at line 29 of file rtlp.h.

◆ ROUND_UP

#define ROUND_UP (   n,
  align 
)    ROUND_DOWN(((ULONG_PTR)(n)) + (align) - 1, (align))

Definition at line 32 of file rtlp.h.

◆ RtlpAllocateStringMemory

#define RtlpAllocateStringMemory   RtlpAllocateMemory

Definition at line 140 of file rtlp.h.

◆ RtlpFreeStringMemory

#define RtlpFreeStringMemory   RtlpFreeMemory

Definition at line 141 of file rtlp.h.

◆ RVA

#define RVA (   m,
  b 
)    ((PVOID)((ULONG_PTR)(b) + (ULONG_PTR)(m)))

Definition at line 35 of file rtlp.h.

◆ SWAPD

#define SWAPD (   x)    (x)

Definition at line 24 of file rtlp.h.

◆ SWAPQ

#define SWAPQ (   x)    (x)

Definition at line 26 of file rtlp.h.

◆ SWAPW

#define SWAPW (   x)    (x)

Definition at line 25 of file rtlp.h.

◆ TAG_ASTR

#define TAG_ASTR   'RTSA'

Definition at line 214 of file rtlp.h.

◆ TAG_OSTR

#define TAG_OSTR   'RTSO'

Definition at line 215 of file rtlp.h.

◆ TAG_USTR

#define TAG_USTR   'RTSU'

Definition at line 213 of file rtlp.h.

Typedef Documentation

◆ PRTL_BITMAP64

◆ PRTL_BITMAP_RUN64

◆ RTL_BITMAP64

◆ RTL_BITMAP_RUN64

Function Documentation

◆ DebugService()

ULONG NTAPI DebugService ( IN ULONG  Service,
IN PVOID  Argument1,
IN PVOID  Argument2,
IN PVOID  Argument3,
IN PVOID  Argument4 
)

◆ DebugService2()

VOID NTAPI DebugService2 ( IN PVOID  Argument1,
IN PVOID  Argument2,
IN ULONG  Service 
)

◆ LdrpInitializeProcessCompat()

VOID NTAPI LdrpInitializeProcessCompat ( PVOID  pProcessActctx,
PVOID pOldShimData 
)

Definition at line 1542 of file ldrinit.c.

1543 {
1544  static const struct
1545  {
1546  const GUID* Guid;
1547  const DWORD Version;
1548  } KnownCompatGuids[] = {
1549  { &COMPAT_GUID_WIN10, _WIN32_WINNT_WIN10 },
1550  { &COMPAT_GUID_WIN81, _WIN32_WINNT_WINBLUE },
1551  { &COMPAT_GUID_WIN8, _WIN32_WINNT_WIN8 },
1552  { &COMPAT_GUID_WIN7, _WIN32_WINNT_WIN7 },
1553  { &COMPAT_GUID_VISTA, _WIN32_WINNT_VISTA },
1554  };
1555 
1556  ULONG Buffer[(sizeof(COMPATIBILITY_CONTEXT_ELEMENT) * 10 + sizeof(ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION)) / sizeof(ULONG)];
1557  ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION* ContextCompatInfo;
1558  SIZE_T SizeRequired;
1559  NTSTATUS Status;
1560  DWORD n, cur;
1561  ReactOS_ShimData* pShimData = *pOldShimData;
1562 
1563  if (pShimData)
1564  {
1565  if (pShimData->dwMagic != REACTOS_SHIMDATA_MAGIC ||
1566  pShimData->dwSize != sizeof(ReactOS_ShimData))
1567  {
1568  DPRINT1("LdrpInitializeProcessCompat: Corrupt pShimData (0x%x, %u)\n", pShimData->dwMagic, pShimData->dwSize);
1569  return;
1570  }
1571  if (pShimData->dwRosProcessCompatVersion)
1572  {
1574  {
1575  DPRINT1("LdrpInitializeProcessCompat: ProcessCompatVersion set to ignore manifest\n");
1576  }
1577  else
1578  {
1579  DPRINT1("LdrpInitializeProcessCompat: ProcessCompatVersion already set to 0x%x\n", pShimData->dwRosProcessCompatVersion);
1580  }
1581  return;
1582  }
1583  }
1584 
1585  SizeRequired = sizeof(Buffer);
1587  pProcessActctx,
1588  NULL,
1589  CompatibilityInformationInActivationContext,
1590  Buffer,
1591  sizeof(Buffer),
1592  &SizeRequired);
1593 
1594  if (!NT_SUCCESS(Status))
1595  {
1596  DPRINT1("LdrpInitializeProcessCompat: Unable to query process actctx with status %x\n", Status);
1597  return;
1598  }
1599 
1600  ContextCompatInfo = (ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION*)Buffer;
1601  /* No Compatibility elements present, bail out */
1602  if (ContextCompatInfo->ElementCount == 0)
1603  return;
1604 
1605  /* Search for known GUID's, starting from newest to oldest. */
1606  for (cur = 0; cur < RTL_NUMBER_OF(KnownCompatGuids); ++cur)
1607  {
1608  for (n = 0; n < ContextCompatInfo->ElementCount; ++n)
1609  {
1610  if (ContextCompatInfo->Elements[n].Type == ACTCX_COMPATIBILITY_ELEMENT_TYPE_OS &&
1611  RtlCompareMemory(&ContextCompatInfo->Elements[n].Id, KnownCompatGuids[cur].Guid, sizeof(GUID)) == sizeof(GUID))
1612  {
1613  /* If this process did not need shim data before, allocate and store it */
1614  if (pShimData == NULL)
1615  {
1616  PPEB Peb = NtCurrentPeb();
1617 
1618  ASSERT(Peb->pShimData == NULL);
1619  pShimData = RtlAllocateHeap(Peb->ProcessHeap, HEAP_ZERO_MEMORY, sizeof(*pShimData));
1620 
1621  if (!pShimData)
1622  {
1623  DPRINT1("LdrpInitializeProcessCompat: Unable to allocated %u bytes\n", sizeof(*pShimData));
1624  return;
1625  }
1626 
1627  pShimData->dwSize = sizeof(*pShimData);
1628  pShimData->dwMagic = REACTOS_SHIMDATA_MAGIC;
1629 
1630  Peb->pShimData = pShimData;
1631  *pOldShimData = pShimData;
1632  }
1633 
1634  /* Store the highest found version, and bail out. */
1635  pShimData->dwRosProcessCompatVersion = KnownCompatGuids[cur].Version;
1636  DPRINT1("LdrpInitializeProcessCompat: Found guid for winver 0x%x\n", KnownCompatGuids[cur].Version);
1637  return;
1638  }
1639  }
1640  }
1641 }
#define _WIN32_WINNT_WIN7
Definition: sdkddkver.h:28
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
PPEB Peb
Definition: dllmain.c:27
#define _WIN32_WINNT_WIN10
Definition: sdkddkver.h:32
LONG NTSTATUS
Definition: precomp.h:26
GLdouble n
Definition: glext.h:7729
#define REACTOS_COMPATVERSION_IGNOREMANIFEST
Definition: hsdb.c:32
#define _WIN32_WINNT_WINBLUE
Definition: sdkddkver.h:30
#define _WIN32_WINNT_VISTA
Definition: sdkddkver.h:25
static GUID * Guid
Definition: apphelp.c:93
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define REACTOS_SHIMDATA_MAGIC
Definition: compat_undoc.h:15
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
#define _WIN32_WINNT_WIN8
Definition: sdkddkver.h:29
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
PVOID ProcessHeap
Definition: ntddk_ex.h:249
unsigned long DWORD
Definition: ntddk_ex.h:95
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
Status
Definition: gdiplustypes.h:24
ULONG_PTR SIZE_T
Definition: typedefs.h:78
struct _GUID GUID
#define NtCurrentPeb()
Definition: FLS.c:20
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG, HANDLE, PVOID, ULONG, PVOID, SIZE_T, SIZE_T *)
Definition: actctx.c:5443
#define HEAP_ZERO_MEMORY
Definition: compat.h:123
#define DPRINT1
Definition: precomp.h:8
DWORD dwRosProcessCompatVersion
Definition: compat_undoc.h:11
unsigned int ULONG
Definition: retypes.h:1
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
#define RTL_QUERY_ACTIVATION_CONTEXT_FLAG_NO_ADDREF
Definition: rtltypes.h:119

Referenced by actctx_init().

◆ RtlCallVectoredContinueHandlers()

VOID NTAPI RtlCallVectoredContinueHandlers ( IN PEXCEPTION_RECORD  ExceptionRecord,
IN PCONTEXT  Context 
)

Definition at line 284 of file vectoreh.c.

286 {
287  /*
288  * Call the shared routine (ignoring result,
289  * execution always continues at this point)
290  */
291  (VOID)RtlpCallVectoredHandlers(ExceptionRecord,
292  Context,
294 }
BOOLEAN NTAPI RtlpCallVectoredHandlers(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN PLIST_ENTRY VectoredHandlerList)
Definition: vectoreh.c:40
LIST_ENTRY RtlpVectoredContinueList
Definition: vectoreh.c:17
#define VOID
Definition: acefi.h:82

◆ RtlCallVectoredExceptionHandlers()

BOOLEAN NTAPI RtlCallVectoredExceptionHandlers ( IN PEXCEPTION_RECORD  ExceptionRecord,
IN PCONTEXT  Context 
)

Definition at line 273 of file vectoreh.c.

275 {
276  /* Call the shared routine */
277  return RtlpCallVectoredHandlers(ExceptionRecord,
278  Context,
280 }
BOOLEAN NTAPI RtlpCallVectoredHandlers(IN PEXCEPTION_RECORD ExceptionRecord, IN PCONTEXT Context, IN PLIST_ENTRY VectoredHandlerList)
Definition: vectoreh.c:40
LIST_ENTRY RtlpVectoredExceptionList
Definition: vectoreh.c:17

◆ RtlDeleteHeapLock()

NTSTATUS NTAPI RtlDeleteHeapLock ( IN OUT PHEAP_LOCK  Lock)

Definition at line 101 of file libsupp.c.

102 {
103  return RtlDeleteCriticalSection(&Lock->CriticalSection);
104 }
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

Referenced by RtlDestroyHeap(), and RtlpPageHeapDestroy().

◆ RtlEnterHeapLock()

NTSTATUS NTAPI RtlEnterHeapLock ( IN OUT PHEAP_LOCK  Lock,
IN BOOLEAN  Exclusive 
)

Definition at line 108 of file libsupp.c.

109 {
110  UNREFERENCED_PARAMETER(Exclusive);
111 
112  return RtlEnterCriticalSection(&Lock->CriticalSection);
113 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75

Referenced by RtlAllocateHeap(), RtlDebugAllocateHeap(), RtlDebugFreeHeap(), RtlDebugGetUserInfoHeap(), RtlDebugReAllocateHeap(), RtlDebugSetUserFlagsHeap(), RtlDebugSetUserValueHeap(), RtlDebugSizeHeap(), RtlFreeHeap(), RtlGetUserInfoHeap(), RtlLockHeap(), RtlpDphEnterCriticalSection(), RtlpDphFreeDelayedBlocksFromHeap(), RtlpPageHeapCreate(), RtlpPageHeapDestroy(), RtlReAllocateHeap(), RtlSetUserFlagsHeap(), RtlSetUserValueHeap(), and RtlValidateHeap().

◆ RtlGetTickCount()

ULONG NTAPI RtlGetTickCount ( VOID  )

Definition at line 1015 of file libsupp.c.

1016 {
1017  ULARGE_INTEGER TickCount;
1018 
1019 #ifdef _WIN64
1020  TickCount.QuadPart = *((volatile ULONG64*)&SharedUserData->TickCount);
1021 #else
1022  while (TRUE)
1023  {
1024  TickCount.HighPart = (ULONG)SharedUserData->TickCount.High1Time;
1025  TickCount.LowPart = SharedUserData->TickCount.LowPart;
1026 
1027  if (TickCount.HighPart == (ULONG)SharedUserData->TickCount.High2Time)
1028  break;
1029 
1030  YieldProcessor();
1031  }
1032 #endif
1033 
1034  return (ULONG)((UInt32x32To64(TickCount.LowPart,
1035  SharedUserData->TickCountMultiplier) >> 24) +
1036  UInt32x32To64((TickCount.HighPart << 8) & 0xFFFFFFFF,
1037  SharedUserData->TickCountMultiplier));
1038 }
#define TRUE
Definition: types.h:120
$ULONG LowPart
Definition: ntbasedef.h:576
FORCEINLINE VOID YieldProcessor(VOID)
Definition: ke.h:32
ULONGLONG QuadPart
Definition: ms-dtyp.idl:185
$ULONG HighPart
Definition: ntbasedef.h:577
if(!(yy_init))
Definition: macro.lex.yy.c:714
unsigned __int64 ULONG64
Definition: imports.h:198
#define SharedUserData
unsigned int ULONG
Definition: retypes.h:1
#define UInt32x32To64(a, b)
Definition: intsafe.h:258

◆ RtlInitializeHeapLock()

NTSTATUS NTAPI RtlInitializeHeapLock ( IN OUT PHEAP_LOCK Lock)

Definition at line 126 of file libsupp.c.

127 {
128  return RtlInitializeCriticalSection(&(*Lock)->CriticalSection);
129 }
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

Referenced by RtlpDphInitializeDelayedFreeQueue(), RtlpDphProcessStartupInitialization(), RtlpInitializeHeap(), and RtlpPageHeapCreate().

◆ RtlLeaveHeapLock()

NTSTATUS NTAPI RtlLeaveHeapLock ( IN OUT PHEAP_LOCK  Lock)

Definition at line 133 of file libsupp.c.

134 {
135  return RtlLeaveCriticalSection(&Lock->CriticalSection);
136 }
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75

Referenced by RtlAllocateHeap(), RtlDebugAllocateHeap(), RtlDebugFreeHeap(), RtlDebugGetUserInfoHeap(), RtlDebugReAllocateHeap(), RtlDebugSetUserFlagsHeap(), RtlDebugSetUserValueHeap(), RtlDebugSizeHeap(), RtlFreeHeap(), RtlGetUserInfoHeap(), RtlpAllocateNonDedicated(), RtlpDphFreeDelayedBlocksFromHeap(), RtlpDphLeaveCriticalSection(), RtlpPageHeapCreate(), RtlpPageHeapDestroy(), RtlReAllocateHeap(), RtlSetUserFlagsHeap(), RtlSetUserValueHeap(), RtlUnlockHeap(), and RtlValidateHeap().

◆ RtlpAllocateMemory()

PVOID NTAPI RtlpAllocateMemory ( SIZE_T  Bytes,
ULONG  Tag 
)

Definition at line 35 of file libsupp.c.

37 {
39 }
PVOID FrLdrDefaultHeap
Definition: heap.c:34
_In_ UINT Bytes
Definition: mmcopy.h:9
PVOID FrLdrHeapAllocateEx(PVOID HeapHandle, SIZE_T ByteSize, ULONG Tag)
Definition: heap.c:320
IN ULONG IN ULONG Tag
Definition: evtlib.h:159

◆ RtlpCaptureContext()

VOID NTAPI RtlpCaptureContext ( OUT PCONTEXT  ContextRecord)

Referenced by RtlUnwind().

◆ RtlpCaptureStackLimits()

BOOLEAN NTAPI RtlpCaptureStackLimits ( IN ULONG_PTR  Ebp,
IN ULONG_PTR StackBegin,
IN ULONG_PTR StackEnd 
)

Definition at line 211 of file libsupp.c.

214 {
215  /* FIXME: Verify */
216  *StackBegin = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
217  *StackEnd = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
218  return TRUE;
219 }
#define TRUE
Definition: types.h:120
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420
#define ULONG_PTR
Definition: config.h:101

Referenced by RtlWalkFrameChain().

◆ RtlpCheckForActiveDebugger()

BOOLEAN NTAPI RtlpCheckForActiveDebugger ( VOID  )

Definition at line 25 of file libsupp.c.

26 {
27  /* Return the flag in the PEB */
28  return NtCurrentPeb()->BeingDebugged;
29 }
#define NtCurrentPeb()
Definition: FLS.c:20

Referenced by RtlRaiseException(), RtlRaiseStatus(), and vDbgPrintExWithPrefixInternal().

◆ RtlpCheckLogException()

VOID NTAPI RtlpCheckLogException ( IN PEXCEPTION_RECORD  ExceptionRecord,
IN PCONTEXT  ContextRecord,
IN PVOID  ContextData,
IN ULONG  Size 
)

Definition at line 201 of file libsupp.c.

205 {
206  /* Exception logging is not done in user-mode */
207 }

Referenced by RtlDispatchException().

◆ RtlpClearInDbgPrint()

VOID NTAPI RtlpClearInDbgPrint ( VOID  )

Definition at line 45 of file libsupp.c.

46 {
47  /* Clear the flag */
48  NtCurrentTeb()->InDbgPrint = FALSE;
49 }
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420

Referenced by vDbgPrintExWithPrefixInternal().

◆ RtlpDowncaseUnicodeChar()

WCHAR NTAPI RtlpDowncaseUnicodeChar ( IN WCHAR  Source)

Definition at line 89 of file nls.c.

90 {
91  USHORT Offset;
92 
94 
95  if (Source < L'A')
96  return Source;
97 
98  if (Source <= L'Z')
99  return Source + (L'a' - L'A');
100 
101  if (Source < 0x80)
102  return Source;
103 
104  Offset = ((USHORT)Source >> 8);
105  DPRINT("Offset: %hx\n", Offset);
106 
108  DPRINT("Offset: %hx\n", Offset);
109 
110  Offset += (((USHORT)Source & 0x00F0) >> 4);
111  DPRINT("Offset: %hx\n", Offset);
112 
114  DPRINT("Offset: %hx\n", Offset);
115 
116  Offset += ((USHORT)Source & 0x000F);
117  DPRINT("Offset: %hx\n", Offset);
118 
120  DPRINT("Offset: %hx\n", Offset);
121 
122  DPRINT("Result: %hx\n", Source + (SHORT)Offset);
123 
124  return Source + (SHORT)Offset;
125 }
#define PAGED_CODE_RTL()
Definition: rtlp.h:16
PUSHORT NlsUnicodeLowercaseTable
Definition: nls.c:19
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
short SHORT
Definition: pedump.c:59
void DPRINT(...)
Definition: polytest.cpp:61
static const WCHAR L[]
Definition: oid.c:1250
unsigned short USHORT
Definition: pedump.c:61
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167

Referenced by RtlDowncaseUnicodeChar(), RtlDowncaseUnicodeString(), and RtlIsDosDeviceName_Ustr().

◆ RtlpExecuteHandlerForUnwind()

EXCEPTION_DISPOSITION NTAPI RtlpExecuteHandlerForUnwind ( PEXCEPTION_RECORD  ExceptionRecord,
PEXCEPTION_REGISTRATION_RECORD  RegistrationFrame,
PCONTEXT  Context,
PVOID  DispatcherContext,
PEXCEPTION_ROUTINE  ExceptionHandler 
)

Referenced by RtlUnwind().

◆ RtlpFreeMemory()

VOID NTAPI RtlpFreeMemory ( PVOID  Mem,
ULONG  Tag 
)

Definition at line 44 of file libsupp.c.

46 {
48 }
PVOID FrLdrDefaultHeap
Definition: heap.c:34
VOID FrLdrHeapFreeEx(PVOID HeapHandle, PVOID Pointer, ULONG Tag)
Definition: heap.c:438
IN ULONG IN ULONG Tag
Definition: evtlib.h:159

◆ RtlpGetExceptionList()

PEXCEPTION_REGISTRATION_RECORD NTAPI RtlpGetExceptionList ( VOID  )

Referenced by RtlDispatchException(), and RtlUnwind().

◆ RtlpGetMode()

KPROCESSOR_MODE NTAPI RtlpGetMode ( VOID  )

Definition at line 53 of file libsupp.c.

54 {
55  return UserMode;
56 }

Referenced by RtlCreateHeap(), RtlCreateProcessParameters(), RtlDestroyHeap(), RtlFreeHeap(), RtlpExtendHeap(), and RtlpInitializeHeap().

◆ RtlpGetStackLimits()

VOID NTAPI RtlpGetStackLimits ( PULONG_PTR  LowLimit,
PULONG_PTR  HighLimit 
)

◆ RtlpHandleDpcStackException()

BOOLEAN NTAPI RtlpHandleDpcStackException ( IN PEXCEPTION_REGISTRATION_RECORD  RegistrationFrame,
IN ULONG_PTR  RegistrationFrameEnd,
IN OUT PULONG_PTR  StackLow,
IN OUT PULONG_PTR  StackHigh 
)

Definition at line 190 of file libsupp.c.

194 {
195  /* There's no such thing as a DPC stack in user-mode */
196  return FALSE;
197 }

Referenced by RtlDispatchException(), and RtlUnwind().

◆ RtlpInitializeTimerThread()

NTSTATUS RtlpInitializeTimerThread ( VOID  )

Definition at line 27 of file timerqueue.c.

28 {
30 }
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:225

Referenced by RtlpQueueWorkerThread().

◆ RtlpSafeCopyMemory()

NTSTATUS NTAPI RtlpSafeCopyMemory ( _Out_writes_bytes_all_(Length) VOID UNALIGNED Destination,
_In_reads_bytes_(Length) CONST VOID UNALIGNED Source,
_In_ SIZE_T  Length 
)

Definition at line 56 of file rtlcompat.c.

61 {
63  return STATUS_SUCCESS;
64 }
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:2891
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167
return STATUS_SUCCESS
Definition: btrfs.c:2966

Referenced by RtlLargeIntegerToChar().

◆ RtlpSetExceptionList()

VOID NTAPI RtlpSetExceptionList ( PEXCEPTION_REGISTRATION_RECORD  NewExceptionList)

Referenced by RtlUnwind().

◆ RtlpSetHeapParameters()

VOID NTAPI RtlpSetHeapParameters ( IN PRTL_HEAP_PARAMETERS  Parameters)

Definition at line 174 of file libsupp.c.

175 {
176  PPEB Peb;
177 
178  /* Get PEB */
179  Peb = RtlGetCurrentPeb();
180 
181  /* Apply defaults for non-set parameters */
182  if (!Parameters->SegmentCommit) Parameters->SegmentCommit = Peb->HeapSegmentCommit;
183  if (!Parameters->SegmentReserve) Parameters->SegmentReserve = Peb->HeapSegmentReserve;
184  if (!Parameters->DeCommitFreeBlockThreshold) Parameters->DeCommitFreeBlockThreshold = Peb->HeapDeCommitFreeBlockThreshold;
185  if (!Parameters->DeCommitTotalFreeThreshold) Parameters->DeCommitTotalFreeThreshold = Peb->HeapDeCommitTotalFreeThreshold;
186 }
ULONG HeapSegmentReserve
Definition: ntddk_ex.h:275
PPEB Peb
Definition: dllmain.c:27
ULONG HeapDeCommitFreeBlockThreshold
Definition: ntddk_ex.h:278
ULONG HeapSegmentCommit
Definition: ntddk_ex.h:276
PPEB NTAPI RtlGetCurrentPeb(VOID)
Definition: libsupp.c:63
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:872
ULONG HeapDeCommitTotalFreeThreshold
Definition: ntddk_ex.h:277

Referenced by RtlCreateHeap().

◆ RtlpSetInDbgPrint()

BOOLEAN NTAPI RtlpSetInDbgPrint ( VOID  )

Definition at line 33 of file libsupp.c.

34 {
35  /* Check if it's already set and return TRUE if so */
36  if (NtCurrentTeb()->InDbgPrint) return TRUE;
37 
38  /* Set it and return */
39  NtCurrentTeb()->InDbgPrint = TRUE;
40  return FALSE;
41 }
#define TRUE
Definition: types.h:120
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
Definition: psfuncs.h:420

Referenced by vDbgPrintExWithPrefixInternal().

◆ RtlpUpcaseUnicodeChar()

WCHAR NTAPI RtlpUpcaseUnicodeChar ( IN WCHAR  Source)

Definition at line 715 of file nls.c.

716 {
717  USHORT Offset;
718 
719  if (Source < 'a')
720  return Source;
721 
722  if (Source <= 'z')
723  return (Source - ('a' - 'A'));
724 
725  Offset = ((USHORT)Source >> 8) & 0xFF;
727 
728  Offset += ((USHORT)Source >> 4) & 0xF;
730 
731  Offset += ((USHORT)Source & 0xF);
733 
734  return Source + (SHORT)Offset;
735 }
PUSHORT NlsUnicodeUpcaseTable
Definition: nls.c:18
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
short SHORT
Definition: pedump.c:59
unsigned short USHORT
Definition: pedump.c:61
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3167

Referenced by CompareUnicodeStrings(), RtlCompareUnicodeString(), RtlGenerate8dot3Name(), RtlGetFullPathName_Ustr(), RtlIsValidOemCharacter(), RtlpIsCharInUnicodeString(), RtlPrefixUnicodeString(), RtlUpcaseUnicodeChar(), RtlUpcaseUnicodeString(), RtlUpcaseUnicodeToCustomCPN(), RtlUpcaseUnicodeToMultiByteN(), RtlUpcaseUnicodeToOemN(), and RtlUpperChar().

◆ RtlTryEnterHeapLock()

BOOLEAN NTAPI RtlTryEnterHeapLock ( IN OUT PHEAP_LOCK  Lock,
IN BOOLEAN  Exclusive 
)

Definition at line 117 of file libsupp.c.

118 {
119  UNREFERENCED_PARAMETER(Exclusive);
120 
121  return RtlTryEnterCriticalSection(&Lock->CriticalSection);
122 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG IN OUT PLONG IN LONG Increment IN PNDIS_RW_LOCK Lock
Definition: CrNtStubs.h:75
NTSYSAPI BOOLEAN NTAPI RtlTryEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

Referenced by RtlpDphEnterCriticalSection().

Variable Documentation

◆ MmHighestUserAddress

◆ TimerThreadHandle

HANDLE TimerThreadHandle

Definition at line 24 of file timerqueue.c.

Referenced by RtlpQueueWorkerThread().