ReactOS 0.4.17-dev-1190-g4c812f4
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)) & ~((ULONG_PTR)(align) - 1))
 
#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_BITMAP64 * PRTL_BITMAP64
 
typedef struct _RTL_BITMAP_RUN64 RTL_BITMAP_RUN64
 
typedef struct _RTL_BITMAP_RUN64 * PRTL_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)
 
VOID NTAPI RtlpSetHeapParameters (IN PRTL_HEAP_PARAMETERS Parameters)
 
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 (_Inout_ struct _EXCEPTION_RECORD *ExceptionRecord, _In_ PVOID EstablisherFrame, _Inout_ struct _CONTEXT *ContextRecord, _In_ PVOID DispatcherContext)
 
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)
 
PVOID NTAPI RtlpDebugBufferCommit (_Inout_ PRTL_DEBUG_INFORMATION Buffer, _In_ SIZE_T Size)
 

Variables

PVOID MmHighestUserAddress
 
HANDLE TimerThreadHandle
 

Macro Definition Documentation

◆ NtGetTickCount

#define NtGetTickCount   RtlGetTickCount

Definition at line 163 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)) & ~((ULONG_PTR)(align) - 1))

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 155 of file rtlp.h.

◆ RtlpFreeStringMemory

#define RtlpFreeStringMemory   RtlpFreeMemory

Definition at line 156 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 261 of file rtlp.h.

◆ TAG_OSTR

#define TAG_OSTR   'RTSO'

Definition at line 262 of file rtlp.h.

◆ TAG_USTR

#define TAG_USTR   'RTSU'

Definition at line 260 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 
)

Referenced by DebugPrint(), and DebugPrompt().

◆ DebugService2()

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

◆ LdrpInitializeProcessCompat()

VOID NTAPI LdrpInitializeProcessCompat ( PVOID  pProcessActctx,
PVOID *  pOldShimData 
)

Definition at line 1601 of file ldrinit.c.

1602{
1603 static const struct
1604 {
1605 const GUID* Guid;
1606 const DWORD Version;
1607 } KnownCompatGuids[] = {
1608 { &COMPAT_GUID_WIN10, _WIN32_WINNT_WIN10 },
1609 { &COMPAT_GUID_WIN81, _WIN32_WINNT_WINBLUE },
1610 { &COMPAT_GUID_WIN8, _WIN32_WINNT_WIN8 },
1611 { &COMPAT_GUID_WIN7, _WIN32_WINNT_WIN7 },
1612 { &COMPAT_GUID_VISTA, _WIN32_WINNT_VISTA },
1613 };
1614
1615 ULONG Buffer[(sizeof(COMPATIBILITY_CONTEXT_ELEMENT) * 10 + sizeof(ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION)) / sizeof(ULONG)];
1616 ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION* ContextCompatInfo;
1617 SIZE_T SizeRequired;
1619 DWORD n, cur;
1620 ReactOS_ShimData* pShimData = *pOldShimData;
1621
1622 if (pShimData)
1623 {
1624 if (pShimData->dwMagic != REACTOS_SHIMDATA_MAGIC ||
1625 pShimData->dwSize != sizeof(ReactOS_ShimData))
1626 {
1627 DPRINT1("LdrpInitializeProcessCompat: Corrupt pShimData (0x%x, %u)\n", pShimData->dwMagic, pShimData->dwSize);
1628 return;
1629 }
1630#ifdef _M_AMD64
1631 pShimData->RtlGetCurrentDirectory_U_RtlpMsysDecoy = &RtlGetCurrentDirectory_U_RtlpMsysDecoy; /* We need this private symbol for a MSYS shim */
1632#endif
1633 if (pShimData->dwRosProcessCompatVersion)
1634 {
1636 {
1637 DPRINT1("LdrpInitializeProcessCompat: ProcessCompatVersion set to ignore manifest\n");
1638 }
1639 else
1640 {
1641 DPRINT1("LdrpInitializeProcessCompat: ProcessCompatVersion already set to 0x%x\n", pShimData->dwRosProcessCompatVersion);
1642 }
1643 return;
1644 }
1645 }
1646
1647 SizeRequired = sizeof(Buffer);
1649 pProcessActctx,
1650 NULL,
1651 CompatibilityInformationInActivationContext,
1652 Buffer,
1653 sizeof(Buffer),
1654 &SizeRequired);
1655
1656 if (!NT_SUCCESS(Status))
1657 {
1658 DPRINT1("LdrpInitializeProcessCompat: Unable to query process actctx with status %x\n", Status);
1659 return;
1660 }
1661
1662 ContextCompatInfo = (ACTIVATION_CONTEXT_COMPATIBILITY_INFORMATION*)Buffer;
1663 /* No Compatibility elements present, bail out */
1664 if (ContextCompatInfo->ElementCount == 0)
1665 return;
1666
1667 /* Search for known GUIDs, starting from oldest to newest.
1668 Note that on Windows it is somewhat reversed, starting from the latest known
1669 version, going down. But we are not Windows, trying to allow a lower version,
1670 we are ReactOS trying to fake a higher version. So we interpret what Windows
1671 does as "try the closest version to the actual version", so we start with the
1672 lowest version, which is closest to Windows 2003, which we mostly are. */
1673 for (cur = RTL_NUMBER_OF(KnownCompatGuids) - 1; cur != -1; --cur)
1674 {
1675 for (n = 0; n < ContextCompatInfo->ElementCount; ++n)
1676 {
1677 if (ContextCompatInfo->Elements[n].Type == ACTCTX_COMPATIBILITY_ELEMENT_TYPE_OS &&
1678 RtlCompareMemory(&ContextCompatInfo->Elements[n].Id, KnownCompatGuids[cur].Guid, sizeof(GUID)) == sizeof(GUID))
1679 {
1681 {
1682 DPRINT1("LdrpInitializeProcessCompat: Not applying automatic fix for winver 0x%x due to policy\n", KnownCompatGuids[cur].Version);
1683 return;
1684 }
1685
1686 /* If this process did not need shim data before, allocate and store it */
1687 if (pShimData == NULL)
1688 {
1689 PPEB Peb = NtCurrentPeb();
1690
1691 ASSERT(Peb->pShimData == NULL);
1692 pShimData = RtlAllocateHeap(Peb->ProcessHeap, HEAP_ZERO_MEMORY, sizeof(*pShimData));
1693
1694 if (!pShimData)
1695 {
1696 DPRINT1("LdrpInitializeProcessCompat: Unable to allocated %u bytes\n", sizeof(*pShimData));
1697 return;
1698 }
1699
1700 pShimData->dwSize = sizeof(*pShimData);
1701 pShimData->dwMagic = REACTOS_SHIMDATA_MAGIC;
1702#ifdef _M_AMD64
1703 /* The process did not ask for shims, but we want to make sure that if the Peb->pShimData is available, the data in it is complete */
1704 pShimData->RtlGetCurrentDirectory_U_RtlpMsysDecoy = &RtlGetCurrentDirectory_U_RtlpMsysDecoy;
1705#endif
1706
1707 Peb->pShimData = pShimData;
1708 *pOldShimData = pShimData;
1709 }
1710
1711 /* Store the lowest found version, and bail out. */
1712 pShimData->dwRosProcessCompatVersion = KnownCompatGuids[cur].Version;
1713 DPRINT1("LdrpInitializeProcessCompat: Found guid for winver 0x%x in manifest from %wZ\n",
1714 KnownCompatGuids[cur].Version,
1715 &(NtCurrentPeb()->ProcessParameters->ImagePathName));
1716 return;
1717 }
1718 }
1719 }
1720}
#define NtCurrentPeb()
Definition: FLS.c:22
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:616
Definition: bufpool.h:45
#define REACTOS_SHIMDATA_MAGIC
Definition: compat_undoc.h:19
#define NULL
Definition: types.h:112
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
PPEB Peb
Definition: dllmain.c:27
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
unsigned long DWORD
Definition: ntddk_ex.h:95
FxCollectionEntry * cur
Status
Definition: gdiplustypes.h:24
GLdouble n
Definition: glext.h:7729
#define REACTOS_COMPATVERSION_IGNOREMANIFEST
Definition: hsdb.c:36
BOOLEAN NTAPI LdrpDisableProcessCompatGuidDetection(VOID)
Definition: ldrinit.c:1567
#define ASSERT(a)
Definition: mode.c:44
static PVOID RtlGetCurrentDirectory_U_RtlpMsysDecoy
Definition: msys2.c:16
#define RTL_QUERY_ACTIVATION_CONTEXT_FLAG_NO_ADDREF
Definition: rtltypes.h:127
#define _WIN32_WINNT_WIN10
Definition: sdkddkver.h:32
#define _WIN32_WINNT_WINBLUE
Definition: sdkddkver.h:30
#define _WIN32_WINNT_WIN8
Definition: sdkddkver.h:29
#define _WIN32_WINNT_WIN7
Definition: sdkddkver.h:28
#define _WIN32_WINNT_VISTA
Definition: sdkddkver.h:25
PVOID ProcessHeap
Definition: ntddk_ex.h:249
DWORD dwRosProcessCompatVersion
Definition: compat_undoc.h:11
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
Definition: wdfobject.h:762
NTSYSAPI NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG, HANDLE, PVOID, ULONG, PVOID, SIZE_T, SIZE_T *)
Definition: actctx.c:5833

◆ 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}
#define VOID
Definition: acefi.h:82
_In_ PIRP _In_ PIO_COMPLETION_ROUTINE _In_ PVOID Context
Definition: kse.h:81
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

◆ 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}
LIST_ENTRY RtlpVectoredExceptionList
Definition: vectoreh.c:17

◆ RtlDeleteHeapLock()

NTSTATUS NTAPI RtlDeleteHeapLock ( IN OUT PHEAP_LOCK  Lock)

Definition at line 114 of file libsupp.c.

115{
116 return RtlDeleteCriticalSection(&Lock->CriticalSection);
117}
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127

Referenced by RtlDestroyHeap(), and RtlpPageHeapDestroy().

◆ RtlEnterHeapLock()

◆ RtlGetTickCount()

ULONG NTAPI RtlGetTickCount ( VOID  )

Definition at line 1233 of file libsupp.c.

1234{
1235 LARGE_INTEGER TickCount;
1236
1237 TickCount = KiReadSystemTime(&SharedUserData->TickCount);
1238
1239 /* Convert to milliseconds */
1240 return KiTickCountToMs(TickCount);
1241}
FORCEINLINE ULONG64 KiTickCountToMs(_In_ LARGE_INTEGER TickCount)
Definition: kefuncs.h:453
FORCEINLINE LARGE_INTEGER KiReadSystemTime(_In_ volatile const KSYSTEM_TIME *SystemTime)
Definition: kefuncs.h:403
#define SharedUserData

◆ RtlInitializeHeapLock()

NTSTATUS NTAPI RtlInitializeHeapLock ( IN OUT PHEAP_LOCK *  Lock)

Definition at line 139 of file libsupp.c.

140{
141 return RtlInitializeCriticalSection(&(*Lock)->CriticalSection);
142}
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

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

◆ RtlLeaveHeapLock()

◆ RtlpAllocateMemory()

PVOID NTAPI RtlpAllocateMemory ( SIZE_T  Bytes,
ULONG  Tag 
)

◆ 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 224 of file libsupp.c.

227{
228 /* FIXME: Verify */
229 *StackBegin = (ULONG_PTR)NtCurrentTeb()->NtTib.StackLimit;
230 *StackEnd = (ULONG_PTR)NtCurrentTeb()->NtTib.StackBase;
231 return TRUE;
232}
#define TRUE
Definition: types.h:120
#define ULONG_PTR
Definition: config.h:101
#define NtCurrentTeb

Referenced by RtlWalkFrameChain().

◆ RtlpCheckForActiveDebugger()

BOOLEAN NTAPI RtlpCheckForActiveDebugger ( VOID  )

Definition at line 27 of file libsupp.c.

28{
29 /* Return the flag in the PEB */
30 return NtCurrentPeb()->BeingDebugged;
31}

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 214 of file libsupp.c.

218{
219 /* Exception logging is not done in user-mode */
220}

Referenced by RtlDispatchException(), and RtlpUnwindInternal().

◆ RtlpClearInDbgPrint()

VOID NTAPI RtlpClearInDbgPrint ( VOID  )

Definition at line 54 of file libsupp.c.

55{
56#if (NTDDI_VERSION < NTDDI_LONGHORN)
57 /* Clear the flag */
58 NtCurrentTeb()->InDbgPrint = FALSE;
59#else
60 NtCurrentTeb()->DbgInDebugPrint = FALSE;
61#endif
62}
#define FALSE
Definition: types.h:117

Referenced by vDbgPrintExWithPrefixInternal().

◆ RtlpDebugBufferCommit()

PVOID NTAPI RtlpDebugBufferCommit ( _Inout_ PRTL_DEBUG_INFORMATION  Buffer,
_In_ SIZE_T  Size 
)

Definition at line 20 of file dbgbuffer.c.

22{
23 ULONG Remaining = Buffer->CommitSize - Buffer->OffsetFree;
26
27 if (Size > MAXLONG)
28 return NULL;
29
30 if (Remaining < Size)
31 {
32 PVOID Buf;
34
35 Buf = (PVOID)((ULONG_PTR)Buffer->ViewBaseClient + Buffer->CommitSize);
36 CommitSize = Size - Remaining;
37
38 /* this is not going to end well.. */
39 if (CommitSize > MAXLONG)
40 return NULL;
41
43 if (!NT_SUCCESS(Status))
44 return NULL;
45
46 Buffer->CommitSize += CommitSize;
47 Remaining = Buffer->CommitSize - Buffer->OffsetFree;
48 /* Sanity check */
49 ASSERT(Remaining >= Size);
50 if (Remaining < Size)
51 return NULL;
52 }
53
54 Result = (PBYTE)Buffer->ViewBaseClient + Buffer->OffsetFree;
55 Buffer->OffsetFree += Size;
56
57 return Result;
58}
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize _Pre_valid_ PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
Definition: mmfuncs.h:410
#define PAGE_READWRITE
Definition: nt_native.h:1307
#define NtCurrentProcess()
Definition: nt_native.h:1660
#define MEM_COMMIT
Definition: nt_native.h:1316
NTSTATUS NTAPI NtAllocateVirtualMemory(IN HANDLE ProcessHandle, IN OUT PVOID *UBaseAddress, IN ULONG_PTR ZeroBits, IN OUT PSIZE_T URegionSize, IN ULONG AllocationType, IN ULONG Protect)
Definition: virtual.c:4457
BYTE * PBYTE
Definition: pedump.c:66
void * PVOID
Definition: typedefs.h:50
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define MAXLONG
Definition: umtypes.h:116
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409

Referenced by RtlQueryProcessDebugInformation().

◆ RtlpDowncaseUnicodeChar()

WCHAR NTAPI RtlpDowncaseUnicodeChar ( IN WCHAR  Source)

Definition at line 89 of file nls.c.

90{
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 L(x)
Definition: resources.c:13
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
short SHORT
Definition: pedump.c:59
unsigned short USHORT
Definition: pedump.c:61
#define PAGED_CODE_RTL()
Definition: rtlp.h:16
PUSHORT NlsUnicodeLowercaseTable
Definition: nls.c:19
#define DPRINT
Definition: sndvol32.h:73

Referenced by RtlDowncaseUnicodeChar().

◆ RtlpExecuteHandlerForUnwind()

EXCEPTION_DISPOSITION NTAPI RtlpExecuteHandlerForUnwind ( _Inout_ struct _EXCEPTION_RECORD *  ExceptionRecord,
_In_ PVOID  EstablisherFrame,
_Inout_ struct _CONTEXT *  ContextRecord,
_In_ PVOID  DispatcherContext 
)

Referenced by RtlpUnwindInternal(), and RtlUnwind().

◆ RtlpFreeMemory()

VOID NTAPI RtlpFreeMemory ( PVOID  Mem,
ULONG  Tag 
)

Definition at line 44 of file libsupp.c.

46{
47 FrLdrHeapFree(Mem, Tag);
48}
VOID FrLdrHeapFree(PVOID MemoryPointer, ULONG Tag)
Definition: heap.c:539
_Must_inspect_result_ _In_ UCXENDPOINT _In_ PVOID Tag
Definition: ucxendpoint.h:325

Referenced by _Success_(), RtlAddRange(), RtlCreateSystemVolumeInformationFolder(), RtlDeleteFunctionTable(), RtlDeleteOwnersRanges(), RtlDeleteRange(), RtlFreeRangeList(), RtlFreeSid(), RtlpSysVolCheckOwnerAndSecurity(), and RtlpSysVolCreateSecurityDescriptor().

◆ RtlpGetMode()

KPROCESSOR_MODE NTAPI RtlpGetMode ( VOID  )

Definition at line 66 of file libsupp.c.

67{
68 return UserMode;
69}
#define UserMode
Definition: asm.h:39

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

◆ 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 203 of file libsupp.c.

207{
208 /* There's no such thing as a DPC stack in user-mode */
209 return FALSE;
210}

Referenced by RtlDispatchException(), and RtlUnwind().

◆ RtlpInitializeTimerThread()

NTSTATUS RtlpInitializeTimerThread ( VOID  )

Definition at line 27 of file timerqueue.c.

28{
30}
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42

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 52 of file libsupp.c.

56{
58 return STATUS_SUCCESS;
59}
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3051
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_SUCCESS
Definition: shellext.h:65
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by RtlLargeIntegerToChar().

◆ RtlpSetHeapParameters()

VOID NTAPI RtlpSetHeapParameters ( IN PRTL_HEAP_PARAMETERS  Parameters)

Definition at line 187 of file libsupp.c.

188{
189 PPEB Peb;
190
191 /* Get PEB */
193
194 /* Apply defaults for non-set parameters */
195 if (!Parameters->SegmentCommit) Parameters->SegmentCommit = Peb->HeapSegmentCommit;
196 if (!Parameters->SegmentReserve) Parameters->SegmentReserve = Peb->HeapSegmentReserve;
197 if (!Parameters->DeCommitFreeBlockThreshold) Parameters->DeCommitFreeBlockThreshold = Peb->HeapDeCommitFreeBlockThreshold;
198 if (!Parameters->DeCommitTotalFreeThreshold) Parameters->DeCommitTotalFreeThreshold = Peb->HeapDeCommitTotalFreeThreshold;
199}
_In_ HANDLE _In_ CONST PDXGKMDT_OPM_GET_INFO_PARAMETERS Parameters
Definition: dispmprt.h:321
ULONG HeapSegmentReserve
Definition: ntddk_ex.h:275
ULONG HeapDeCommitFreeBlockThreshold
Definition: ntddk_ex.h:278
ULONG HeapDeCommitTotalFreeThreshold
Definition: ntddk_ex.h:277
ULONG HeapSegmentCommit
Definition: ntddk_ex.h:276
NTSYSAPI PEB *WINAPI RtlGetCurrentPeb(void)
Definition: libsupp.c:76

Referenced by RtlCreateHeap().

◆ RtlpSetInDbgPrint()

BOOLEAN NTAPI RtlpSetInDbgPrint ( VOID  )

Definition at line 35 of file libsupp.c.

36{
37 /* Check if it's already set and return TRUE if so */
38#if (NTDDI_VERSION < NTDDI_LONGHORN)
39 if (NtCurrentTeb()->InDbgPrint) return TRUE;
40
41 /* Set it and return */
42 NtCurrentTeb()->InDbgPrint = TRUE;
43#else
44 if (NtCurrentTeb()->DbgInDebugPrint) return TRUE;
45
46 /* Set it and return */
47 NtCurrentTeb()->DbgInDebugPrint = TRUE;
48#endif
49 return FALSE;
50}

Referenced by vDbgPrintExWithPrefixInternal().

◆ RtlpUpcaseUnicodeChar()

WCHAR NTAPI RtlpUpcaseUnicodeChar ( IN WCHAR  Source)

Definition at line 695 of file nls.c.

696{
698
699 if (Source < 'a')
700 return Source;
701
702 if (Source <= 'z')
703 return (Source - ('a' - 'A'));
704
705 Offset = ((USHORT)Source >> 8) & 0xFF;
707
708 Offset += ((USHORT)Source >> 4) & 0xF;
710
711 Offset += ((USHORT)Source & 0xF);
713
714 return Source + (SHORT)Offset;
715}
PUSHORT NlsUnicodeUpcaseTable
Definition: nls.c:18

Referenced by RtlUpcaseUnicodeChar(), RtlUpcaseUnicodeToCustomCPN(), RtlUpcaseUnicodeToMultiByteN(), RtlUpcaseUnicodeToOemN(), and RtlUpperChar().

◆ RtlTryEnterHeapLock()

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

Definition at line 130 of file libsupp.c.

131{
133
134 return RtlTryEnterCriticalSection(&Lock->CriticalSection);
135}
NTSYSAPI LOGICAL NTAPI RtlTryEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

Referenced by RtlpDphEnterCriticalSection().

Variable Documentation

◆ MmHighestUserAddress

◆ TimerThreadHandle

HANDLE TimerThreadHandle
extern

Definition at line 24 of file timerqueue.c.

Referenced by RtlpQueueWorkerThread().