ReactOS 0.4.16-dev-287-g2d3f3a1
rtlfuncs.h File Reference
#include <umtypes.h>
#include <ntnls.h>
#include <rtltypes.h>
#include <pstypes.h>
#include <extypes.h>
#include "in6addr.h"
#include "inaddr.h"
Include dependency graph for rtlfuncs.h:

Go to the source code of this file.

Macros

#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT   8
 
#define NtCurrentPeb()   (NtCurrentTeb()->ProcessEnvironmentBlock)
 
#define RTL_SKIP_BUFFER_COPY   0x00000001
 
#define RTL_UNCHANGED_UNK_PATH   1
 
#define RTL_CONVERTED_UNC_PATH   2
 
#define RTL_CONVERTED_NT_PATH   3
 
#define RTL_UNCHANGED_DOS_PATH   4
 

Functions

NTSYSAPI VOID NTAPI RtlCaptureContext (_Out_ PCONTEXT ContextRecord)
 
NTSYSAPI BOOLEAN NTAPI RtlDispatchException (_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context)
 
 _IRQL_requires_max_ (APC_LEVEL) _When_(Status< 0
 Probes and locks virtual pages in memory for the specified process.
 
 _Out_range_ (>, 0)) _When_(Status >=0
 
 _When_ (Status< 0, _Out_range_(>, 0)) _When_(Status >=0
 
NTSYSAPI NTSTATUS NTAPI RtlMapSecurityErrorToNtStatus (_In_ ULONG SecurityError)
 
NTSYSAPI VOID NTAPI RtlRaiseException (_In_ PEXCEPTION_RECORD ExceptionRecord)
 
DECLSPEC_NORETURN NTSYSAPI VOID NTAPI RtlRaiseStatus (_In_ NTSTATUS Status)
 
NTSYSAPI VOID NTAPI RtlUnwind (_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_opt_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue)
 
NTSYSAPI ULONG NTAPI RtlWalkFrameChain (_Out_writes_(Count -(Flags > > RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT)) PVOID *Callers, _In_ ULONG Count, _In_ ULONG Flags)
 
NTSYSAPI USHORT NTAPI RtlLogStackBackTrace (VOID)
 
NTSYSAPI SIZE_T NTAPI RtlSizeHeap (_In_ PVOID HeapHandle, _In_ ULONG Flags, _In_ PVOID MemoryPointer)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAccessAllowedObjectAce (_Inout_ PACL pAcl, _In_ ULONG dwAceRevision, _In_ ULONG AceFlags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID pSid)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedAce (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedAceEx (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedObjectAce (_Inout_ PACL pAcl, _In_ ULONG dwAceRevision, _In_ ULONG AceFlags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID pSid)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAce (_Inout_ PACL Acl, _In_ ULONG AceRevision, _In_ ULONG StartingAceIndex, _In_reads_bytes_(AceListLength) PVOID AceList, _In_ ULONG AceListLength)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessAce (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid, _In_ BOOLEAN Success, _In_ BOOLEAN Failure)
 
NTSYSAPI NTSTATUS NTAPI RtlAcquirePrivilege (_In_ PULONG Privilege, _In_ ULONG NumPriv, _In_ ULONG Flags, _Out_ PVOID *ReturnedState)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessAceEx (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid, _In_ BOOLEAN Success, _In_ BOOLEAN Failure)
 
NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessObjectAce (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_opt_ GUID *ObjectTypeGuid, _In_opt_ GUID *InheritedObjectTypeGuid, _In_ PSID Sid, _In_ BOOLEAN Success, _In_ BOOLEAN Failure)
 
NTSYSAPI NTSTATUS NTAPI RtlAddMandatoryAce (_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ULONG MandatoryFlags, _In_ UCHAR AceType, _In_ PSID LabelSid)
 
NTSYSAPI NTSTATUS NTAPI RtlAdjustPrivilege (_In_ ULONG Privilege, _In_ BOOLEAN NewValue, _In_ BOOLEAN ForThread, _Out_ PBOOLEAN OldValue)
 
_Must_inspect_result_ NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid (_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority, _In_ UCHAR SubAuthorityCount, _In_ ULONG SubAuthority0, _In_ ULONG SubAuthority1, _In_ ULONG SubAuthority2, _In_ ULONG SubAuthority3, _In_ ULONG SubAuthority4, _In_ ULONG SubAuthority5, _In_ ULONG SubAuthority6, _In_ ULONG SubAuthority7, _Outptr_ PSID *Sid)
 
NTSYSAPI BOOLEAN NTAPI RtlAreAllAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess)
 
NTSYSAPI BOOLEAN NTAPI RtlAreAnyAccessesGranted (ACCESS_MASK GrantedAccess, ACCESS_MASK DesiredAccess)
 
NTSYSAPI VOID NTAPI RtlCopyLuidAndAttributesArray (ULONG Count, PLUID_AND_ATTRIBUTES Src, PLUID_AND_ATTRIBUTES Dest)
 
NTSYSAPI NTSTATUS NTAPI RtlCopySidAndAttributesArray (_In_ ULONG Count, _In_ PSID_AND_ATTRIBUTES Src, _In_ ULONG SidAreaSize, _In_ PSID_AND_ATTRIBUTES Dest, _In_ PSID SidArea, _Out_ PSID *RemainingSidArea, _Out_ PULONG RemainingSidAreaSize)
 
 _Out_writes_bytes_ (DestinationSidLength) PSID DestinationSid
 
NTSYSAPI NTSTATUS NTAPI RtlCreateAcl (PACL Acl, ULONG AclSize, ULONG AclRevision)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptor (_Out_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ ULONG Revision)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateSecurityDescriptorRelative (_Out_ PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptor, _In_ ULONG Revision)
 
NTSYSAPI NTSTATUS NTAPI RtlCopySecurityDescriptor (_In_ PSECURITY_DESCRIPTOR pSourceSecurityDescriptor, _Out_ PSECURITY_DESCRIPTOR *pDestinationSecurityDescriptor)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteAce (PACL Acl, ULONG AceIndex)
 
NTSYSAPI BOOLEAN NTAPI RtlEqualPrefixSid (PSID Sid1, PSID Sid2)
 
NTSYSAPI BOOLEAN NTAPI RtlEqualSid (_In_ PSID Sid1, _In_ PSID Sid2)
 
NTSYSAPI BOOLEAN NTAPI RtlFirstFreeAce (PACL Acl, PACE *Ace)
 
NTSYSAPI PVOID NTAPI RtlFreeSid (_In_ _Post_invalid_ PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlGetAce (PACL Acl, ULONG AceIndex, PVOID *Ace)
 
NTSYSAPI NTSTATUS NTAPI RtlGetControlSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSECURITY_DESCRIPTOR_CONTROL Control, _Out_ PULONG Revision)
 
NTSYSAPI NTSTATUS NTAPI RtlGetDaclSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN DaclPresent, _Out_ PACL *Dacl, _Out_ PBOOLEAN DaclDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlGetSaclSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PBOOLEAN SaclPresent, _Out_ PACL *Sacl, _Out_ PBOOLEAN SaclDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSID *Group, _Out_ PBOOLEAN GroupDefaulted)
 
NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PSID *Owner, _Out_ PBOOLEAN OwnerDefaulted)
 
NTSYSAPI BOOLEAN NTAPI RtlGetSecurityDescriptorRMControl (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _Out_ PUCHAR RMControl)
 
NTSYSAPI PSID_IDENTIFIER_AUTHORITY NTAPI RtlIdentifierAuthoritySid (PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlImpersonateSelf (IN SECURITY_IMPERSONATION_LEVEL ImpersonationLevel)
 
NTSYSAPI ULONG NTAPI RtlLengthRequiredSid (IN ULONG SubAuthorityCount)
 
NTSYSAPI ULONG NTAPI RtlLengthSid (IN PSID Sid)
 
NTSYSAPI NTSTATUS NTAPI RtlMakeSelfRelativeSD (_In_ PSECURITY_DESCRIPTOR AbsoluteSD, _Out_ PSECURITY_DESCRIPTOR SelfRelativeSD, _Inout_ PULONG BufferLength)
 
NTSYSAPI VOID NTAPI RtlMapGenericMask (PACCESS_MASK AccessMask, PGENERIC_MAPPING GenericMapping)
 
NTSYSAPI VOID NTAPI RtlReleasePrivilege (_In_ PVOID ReturnedState)
 
NTSYSAPI NTSTATUS NTAPI RtlRemovePrivileges (_In_ HANDLE TokenHandle, _In_reads_opt_(PrivilegeCount) _When_(PrivilegeCount !=0, _Notnull_) PULONG PrivilegesToKeep, _In_ ULONG PrivilegeCount)
 Removes all privileges in the specified access token.
 
NTSYSAPI NTSTATUS NTAPI RtlSelfRelativeToAbsoluteSD2 (_Inout_ PSECURITY_DESCRIPTOR SelfRelativeSD, _Out_ PULONG BufferSize)
 
NTSYSAPI NTSTATUS NTAPI RtlSetAttributesSecurityDescriptor (_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SECURITY_DESCRIPTOR_CONTROL Control, _Out_ PULONG Revision)
 
NTSYSAPI NTSTATUS NTAPI RtlSetControlSecurityDescriptor (_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ SECURITY_DESCRIPTOR_CONTROL ControlBitsOfInterest, _In_ SECURITY_DESCRIPTOR_CONTROL ControlBitsToSet)
 
NTSYSAPI NTSTATUS NTAPI RtlSetSaclSecurityDescriptor (_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ BOOLEAN SaclPresent, _In_ PACL Sacl, _In_ BOOLEAN SaclDefaulted)
 
NTSYSAPI VOID NTAPI RtlSetSecurityDescriptorRMControl (_Inout_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PUCHAR RMControl)
 
NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid (_In_ PSID Sid)
 
NTSYSAPI PULONG NTAPI RtlSubAuthoritySid (_In_ PSID Sid, _In_ ULONG SubAuthority)
 
NTSYSAPI BOOLEAN NTAPI RtlValidSecurityDescriptor (IN PSECURITY_DESCRIPTOR SecurityDescriptor)
 
NTSYSAPI BOOLEAN NTAPI RtlValidSid (IN PSID Sid)
 
NTSYSAPI BOOLEAN NTAPI RtlValidAcl (PACL Acl)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteSecurityObject (_In_ PSECURITY_DESCRIPTOR *ObjectDescriptor)
 
NTSYSAPI NTSTATUS NTAPI RtlNewSecurityObject (_In_ PSECURITY_DESCRIPTOR ParentDescriptor, _In_ PSECURITY_DESCRIPTOR CreatorDescriptor, _Out_ PSECURITY_DESCRIPTOR *NewDescriptor, _In_ BOOLEAN IsDirectoryObject, _In_ HANDLE Token, _In_ PGENERIC_MAPPING GenericMapping)
 
NTSYSAPI NTSTATUS NTAPI RtlQuerySecurityObject (_In_ PSECURITY_DESCRIPTOR ObjectDescriptor, _In_ SECURITY_INFORMATION SecurityInformation, _Out_ PSECURITY_DESCRIPTOR ResultantDescriptor, _In_ ULONG DescriptorLength, _Out_ PULONG ReturnLength)
 
NTSYSAPI NTSTATUS NTAPI RtlSetSecurityObject (_In_ SECURITY_INFORMATION SecurityInformation, _In_ PSECURITY_DESCRIPTOR ModificationDescriptor, _Out_ PSECURITY_DESCRIPTOR *ObjectsSecurityDescriptor, _In_ PGENERIC_MAPPING GenericMapping, _In_ HANDLE Token)
 
NTSYSAPI NTSTATUS NTAPI RtlLargeIntegerToChar (_In_ PLARGE_INTEGER Value, _In_ ULONG Base, _In_ ULONG Length, _Out_ PCHAR String)
 
NTSYSAPI CHAR NTAPI RtlUpperChar (CHAR Source)
 
NTSYSAPI WCHAR NTAPI RtlUpcaseUnicodeChar (WCHAR Source)
 
NTSYSAPI WCHAR NTAPI RtlDowncaseUnicodeChar (IN WCHAR Source)
 
NTSYSAPI NTSTATUS NTAPI RtlIntegerToChar (_In_ ULONG Value, _In_ ULONG Base, _In_ ULONG Length, _Out_ PCHAR String)
 
NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicode (_In_ ULONG Value, _In_opt_ ULONG Base, _In_opt_ ULONG Length, _Inout_ LPWSTR String)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) _At_(String -> MaximumLength, _Const_) NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicodeString(_In_ ULONG Value, _In_opt_ ULONG Base, _Inout_ PUNICODE_STRING String)
 Queries information details about a security descriptor.
 
NTSYSAPI NTSTATUS NTAPI RtlCharToInteger (PCSZ String, ULONG Base, PULONG Value)
 
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToAnsiSize (IN PCUNICODE_STRING UnicodeString)
 
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString (PANSI_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
 
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeStringToOemString (POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
 
_Out_ _At_ (DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString
 
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToOemString (POEM_STRING DestinationString, PCUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
 
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToOemN (PCHAR OemString, ULONG OemSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
 
NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize (IN PCUNICODE_STRING UnicodeString)
 
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToOemN (PCHAR OemString, ULONG OemSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
 
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteN (PCHAR MbString, ULONG MbSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
 
NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToMultiByteN (PCHAR MbString, ULONG MbSize, PULONG ResultSize, PCWCH UnicodeString, ULONG UnicodeSize)
 
NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteSize (PULONG MbSize, PCWCH UnicodeString, ULONG UnicodeSize)
 
NTSYSAPI ULONG NTAPI RtlxOemStringToUnicodeSize (IN PCOEM_STRING OemString)
 
NTSYSAPI NTSTATUS NTAPI RtlOemStringToUnicodeString (PUNICODE_STRING DestinationString, PCOEM_STRING SourceString, BOOLEAN AllocateDestinationString)
 
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG _In_reads_bytes_ (BytesInOemString) PCCH OemString
 
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString (PUNICODE_STRING DestinationString, PCANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
 
NTSYSAPI ULONG NTAPI RtlxAnsiStringToUnicodeSize (PCANSI_STRING AnsiString)
 
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz (_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
 
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeToString (PUNICODE_STRING Destination, PCWSTR Source)
 
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString (PUNICODE_STRING Destination, PCUNICODE_STRING Source)
 
NTSYSAPI LONG NTAPI RtlCompareUnicodeString (PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOLEAN CaseInsensitive)
 
_Must_inspect_result_ NTSYSAPI LONG NTAPI RtlCompareUnicodeStrings (_In_reads_(String1Length) PCWCH String1, _In_ SIZE_T String1Length, _In_reads_(String2Length) PCWCH String2, _In_ SIZE_T String2Length, _In_ BOOLEAN CaseInSensitive)
 
NTSYSAPI VOID NTAPI RtlCopyUnicodeString (PUNICODE_STRING DestinationString, PCUNICODE_STRING SourceString)
 
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString (PUNICODE_STRING DestinationString, PCWSTR SourceString)
 
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString (PCUNICODE_STRING String1, PCUNICODE_STRING String2, BOOLEAN CaseInsensitive)
 
NTSYSAPI VOID NTAPI RtlEraseUnicodeString (_Inout_ PUNICODE_STRING String)
 
NTSYSAPI NTSTATUS NTAPI RtlHashUnicodeString (_In_ CONST UNICODE_STRING *String, _In_ BOOLEAN CaseInSensitive, _In_ ULONG HashAlgorithm, _Out_ PULONG HashValue)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) _At_(DestinationString -> Buffer, _Post_equal_to_(SourceString)) _When_(SourceString !=NULL, _At_(DestinationString->Length, _Post_equal_to_(_String_length_(SourceString))) _At_(DestinationString->MaximumLength, _Post_equal_to_(DestinationString->Length+sizeof(CHAR)))) _When_(SourceString==NULL, _At_(DestinationString->Length, _Post_equal_to_(0)) _At_(DestinationString->MaximumLength, _Post_equal_to_(0))) NTSYSAPI VOID NTAPI RtlInitString(_Out_ PSTRING DestinationString, _In_opt_z_ __drv_aliasesMem PCSTR SourceString)
 
NTSYSAPI BOOLEAN NTAPI RtlIsTextUnicode (_In_ CONST VOID *Buffer, _In_ INT Size, _Inout_opt_ INT *Flags)
 
NTSYSAPI VOID NTAPI RtlCopyString (_Out_ PSTRING DestinationString, _In_opt_ const STRING *SourceString)
 
_Must_inspect_result_ NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeString (_When_(AllocateDestinationString, _Out_ _At_(DestinationString->Buffer, __drv_allocatesMem(Mem))) _When_(!AllocateDestinationString, _Inout_) PUNICODE_STRING DestinationString, _In_ PCUNICODE_STRING SourceString, _In_ BOOLEAN AllocateDestinationString)
 
NTSYSAPI NTSTATUS NTAPI RtlValidateUnicodeString (_In_ ULONG Flags, _In_ PCUNICODE_STRING String)
 
NTSYSAPI NTSTATUS NTAPI RtlpEnsureBufferSize (_In_ ULONG Flags, _Inout_ PRTL_BUFFER Buffer, _In_ SIZE_T RequiredSize)
 
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG _In_reads_bytes_ (BytesInMultiByteString) const CHAR *MultiByteString
 
NTSYSAPI NTSTATUS NTAPI RtlAddAtomToAtomTable (_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateAtomTable (_In_ ULONG TableSize, _Inout_ PRTL_ATOM_TABLE *AtomTable)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteAtomFromAtomTable (_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom)
 
NTSYSAPI NTSTATUS NTAPI RtlDestroyAtomTable (IN PRTL_ATOM_TABLE AtomTable)
 
NTSYSAPI NTSTATUS NTAPI RtlQueryAtomInAtomTable (_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom, _Out_opt_ PULONG RefCount, _Out_opt_ PULONG PinCount, _Out_opt_z_bytecap_(*NameLength) PWSTR AtomName, _Inout_opt_ PULONG NameLength)
 
NTSYSAPI NTSTATUS NTAPI RtlPinAtomInAtomTable (_In_ PRTL_ATOM_TABLE AtomTable, _In_ RTL_ATOM Atom)
 
NTSYSAPI NTSTATUS NTAPI RtlLookupAtomInAtomTable (_In_ PRTL_ATOM_TABLE AtomTable, _In_ PWSTR AtomName, _Out_ PRTL_ATOM Atom)
 
NTSYSAPI PPEB NTAPI RtlGetCurrentPeb (VOID)
 
NTSYSAPI VOID NTAPI RtlAcquirePebLock (VOID)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateProcessParameters (_Out_ PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, _In_ PUNICODE_STRING ImagePathName, _In_opt_ PUNICODE_STRING DllPath, _In_opt_ PUNICODE_STRING CurrentDirectory, _In_opt_ PUNICODE_STRING CommandLine, _In_opt_ PWSTR Environment, _In_opt_ PUNICODE_STRING WindowTitle, _In_opt_ PUNICODE_STRING DesktopInfo, _In_opt_ PUNICODE_STRING ShellInfo, _In_opt_ PUNICODE_STRING RuntimeInfo)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateUserProcess (_In_ PUNICODE_STRING ImageFileName, _In_ ULONG Attributes, _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters, _In_opt_ PSECURITY_DESCRIPTOR ProcessSecutityDescriptor, _In_opt_ PSECURITY_DESCRIPTOR ThreadSecurityDescriptor, _In_opt_ HANDLE ParentProcess, _In_ BOOLEAN CurrentDirectory, _In_opt_ HANDLE DebugPort, _In_opt_ HANDLE ExceptionPort, _Out_ PRTL_USER_PROCESS_INFORMATION ProcessInfo)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateUserThread (_In_ PVOID ThreadContext, _Out_ HANDLE *OutThreadHandle, _Reserved_ PVOID Reserved1, _Reserved_ PVOID Reserved2, _Reserved_ PVOID Reserved3, _Reserved_ PVOID Reserved4, _Reserved_ PVOID Reserved5, _Reserved_ PVOID Reserved6, _Reserved_ PVOID Reserved7, _Reserved_ PVOID Reserved8)
 
NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlDeNormalizeProcessParams (_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
 
NTSYSAPI NTSTATUS NTAPI RtlDestroyProcessParameters (_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
 
NTSYSAPI VOID NTAPI RtlExitUserThread (_In_ NTSTATUS Status)
 
NTSYSAPI VOID NTAPI RtlInitializeContext (_In_ HANDLE ProcessHandle, _Out_ PCONTEXT ThreadContext, _In_opt_ PVOID ThreadStartParam, _In_ PTHREAD_START_ROUTINE ThreadStartAddress, _In_ PINITIAL_TEB InitialTeb)
 
NTSYSAPI BOOLEAN NTAPI RtlIsThreadWithinLoaderCallout (VOID)
 
NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams (_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
 
NTSYSAPI VOID NTAPI RtlReleasePebLock (VOID)
 
NTSYSAPI NTSTATUS NTAPI RtlRemoteCall (_In_ HANDLE Process, _In_ HANDLE Thread, _In_ PVOID CallSite, _In_ ULONG ArgumentCount, _In_ PULONG Arguments, _In_ BOOLEAN PassContext, _In_ BOOLEAN AlreadySuspended)
 
NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical (_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
 
NTSYSAPI NTSTATUS __cdecl RtlSetThreadIsCritical (_In_ BOOLEAN NewValue, _Out_opt_ PBOOLEAN OldValue, _In_ BOOLEAN NeedBreaks)
 
NTSYSAPI ULONG NTAPI RtlGetCurrentProcessorNumber (VOID)
 
NTSTATUS NTAPI RtlSetThreadPoolStartFunc (_In_ PRTL_START_POOL_THREAD StartPoolThread, _In_ PRTL_EXIT_POOL_THREAD ExitPoolThread)
 
NTSYSAPI NTSTATUS NTAPI RtlDeregisterWaitEx (_In_ HANDLE hWaitHandle, _In_opt_ HANDLE hCompletionEvent)
 
NTSYSAPI NTSTATUS NTAPI RtlDeregisterWait (_In_ HANDLE hWaitHandle)
 
NTSYSAPI NTSTATUS NTAPI RtlQueueWorkItem (_In_ WORKERCALLBACKFUNC Function, _In_opt_ PVOID Context, _In_ ULONG Flags)
 
NTSYSAPI NTSTATUS NTAPI RtlSetIoCompletionCallback (_In_ HANDLE FileHandle, _In_ PIO_APC_ROUTINE Callback, _In_ ULONG Flags)
 
NTSYSAPI NTSTATUS NTAPI RtlRegisterWait (_In_ PHANDLE phNewWaitObject, _In_ HANDLE hObject, _In_ WAITORTIMERCALLBACKFUNC Callback, _In_ PVOID pvContext, _In_ ULONG ulMilliseconds, _In_ ULONG ulFlags)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateEnvironment (_In_ BOOLEAN Inherit, _Out_ PWSTR *Environment)
 
NTSYSAPI NTSTATUS NTAPI RtlComputePrivatizedDllName_U (_In_ PUNICODE_STRING DllName, _Inout_ PUNICODE_STRING RealName, _Inout_ PUNICODE_STRING LocalName)
 
NTSYSAPI VOID NTAPI RtlDestroyEnvironment (_In_ PWSTR Environment)
 
NTSYSAPI BOOLEAN NTAPI RtlDoesFileExists_U (_In_ PCWSTR FileName)
 
NTSYSAPI RTL_PATH_TYPE NTAPI RtlDetermineDosPathNameType_U (_In_ PCWSTR Path)
 
NTSYSAPI ULONG NTAPI RtlDosSearchPath_U (_In_ PCWSTR Path, _In_ PCWSTR FileName, _In_ PCWSTR Extension, _In_ ULONG BufferSize, _Out_ PWSTR Buffer, _Out_ PWSTR *PartName)
 
NTSYSAPI NTSTATUS NTAPI RtlDosSearchPath_Ustr (_In_ ULONG Flags, _In_ PUNICODE_STRING PathString, _In_ PUNICODE_STRING FileNameString, _In_ PUNICODE_STRING ExtensionString, _In_ PUNICODE_STRING CallerBuffer, _Inout_opt_ PUNICODE_STRING DynamicString, _Out_opt_ PUNICODE_STRING *FullNameOut, _Out_opt_ PSIZE_T FilePartSize, _Out_opt_ PSIZE_T LengthNeeded)
 
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U (_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
 
NTSYSAPI NTSTATUS NTAPI RtlNtPathNameToDosPathName (_In_ ULONG Flags, _Inout_ PRTL_UNICODE_STRING_BUFFER Path, _Out_opt_ PULONG PathType, _Out_opt_ PULONG Unknown)
 
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToRelativeNtPathName_U (_In_ PCWSTR DosName, _Out_ PUNICODE_STRING NtName, _Out_ PCWSTR *PartName, _Out_ PRTL_RELATIVE_NAME_U RelativeName)
 
 _At_ (Destination->Buffer, _Out_bytecap_(Destination->MaximumLength)) NTSYSAPI NTSTATUS NTAPI RtlExpandEnvironmentStrings_U(_In_z_ PWSTR Environment
 
NTSYSAPI ULONG NTAPI RtlGetCurrentDirectory_U (_In_ ULONG MaximumLength, _Out_bytecap_(MaximumLength) PWSTR Buffer)
 
NTSYSAPI ULONG NTAPI RtlGetFullPathName_U (_In_ PCWSTR FileName, _In_ ULONG Size, _Out_z_bytecap_(Size) PWSTR Buffer, _Out_opt_ PWSTR *ShortName)
 
NTSYSAPI NTSTATUS NTAPI RtlGetFullPathName_UEx (_In_ PWSTR FileName, _In_ ULONG BufferLength, _Out_ PWSTR Buffer, _Out_opt_ PWSTR *FilePart, _Out_opt_ RTL_PATH_TYPE *InputPathType)
 
NTSTATUS NTAPI RtlGetFullPathName_UstrEx (_In_ PUNICODE_STRING FileName, _In_opt_ PUNICODE_STRING StaticString, _In_opt_ PUNICODE_STRING DynamicString, _Out_opt_ PUNICODE_STRING *StringUsed, _Out_opt_ PSIZE_T FilePartSize, _Out_opt_ PBOOLEAN NameInvalid, _Out_ RTL_PATH_TYPE *PathType, _Out_opt_ PSIZE_T LengthNeeded)
 
NTSYSAPI NTSTATUS NTAPI RtlGetLengthWithoutTrailingPathSeperators (_Reserved_ ULONG Flags, _In_ PCUNICODE_STRING PathString, _Out_ PULONG Length)
 
NTSYSAPI ULONG NTAPI RtlGetLongestNtPathLength (VOID)
 
NTSYSAPI ULONG NTAPI RtlIsDosDeviceName_U (_In_ PCWSTR Name)
 
NTSYSAPI ULONG NTAPI RtlIsDosDeviceName_Ustr (_In_ PCUNICODE_STRING Name)
 
NTSYSAPI NTSTATUS NTAPI RtlQueryEnvironmentVariable_U (_In_opt_ PWSTR Environment, _In_ PCUNICODE_STRING Name, _Out_ PUNICODE_STRING Value)
 
VOID NTAPI RtlReleaseRelativeName (_In_ PRTL_RELATIVE_NAME_U RelativeName)
 
NTSYSAPI NTSTATUS NTAPI RtlSetCurrentDirectory_U (_In_ PUNICODE_STRING name)
 
NTSYSAPI NTSTATUS NTAPI RtlSetEnvironmentVariable (_In_z_ PWSTR *Environment, _In_ PUNICODE_STRING Name, _In_ PUNICODE_STRING Value)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSectionAndSpinCount (_In_ PRTL_CRITICAL_SECTION CriticalSection, _In_ ULONG SpinCount)
 
NTSYSAPI ULONG NTAPI RtlIsCriticalSectionLocked (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI ULONG NTAPI RtlIsCriticalSectionLockedByThread (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI BOOLEAN NTAPI RtlTryEnterCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI VOID NTAPI RtlpUnWaitCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI NTSTATUS NTAPI RtlpWaitForCriticalSection (_In_ PRTL_CRITICAL_SECTION CriticalSection)
 
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceExclusive (_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
 
NTSYSAPI BOOLEAN NTAPI RtlAcquireResourceShared (_In_ PRTL_RESOURCE Resource, _In_ BOOLEAN Wait)
 
NTSYSAPI VOID NTAPI RtlConvertExclusiveToShared (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI VOID NTAPI RtlConvertSharedToExclusive (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI VOID NTAPI RtlDeleteResource (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI VOID NTAPI RtlDumpResource (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI VOID NTAPI RtlInitializeResource (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI VOID NTAPI RtlReleaseResource (_In_ PRTL_RESOURCE Resource)
 
NTSYSAPI NTSTATUS NTAPI RtlCompressBuffer (_In_ USHORT CompressionFormatAndEngine, _In_reads_bytes_(UncompressedBufferSize) PUCHAR UncompressedBuffer, _In_ ULONG UncompressedBufferSize, _Out_writes_bytes_to_(CompressedBufferSize, *FinalCompressedSize) PUCHAR CompressedBuffer, _In_ ULONG CompressedBufferSize, _In_ ULONG UncompressedChunkSize, _Out_ PULONG FinalCompressedSize, _In_ PVOID WorkSpace)
 
 _Out_writes_bytes_to_ (UncompressedBufferSize, *FinalUncompressedSize) PUCHAR UncompressedBuffer
 
_In_ ULONG _In_reads_bytes_ (CompressedBufferSize) PUCHAR CompressedBuffer
 
NTSYSAPI NTSTATUS NTAPI RtlGetCompressionWorkSpaceSize (_In_ USHORT CompressionFormatAndEngine, _Out_ PULONG CompressBufferWorkSpaceSize, _Out_ PULONG CompressFragmentWorkSpaceSize)
 
NTSYSAPI VOID NTAPI RtlPopFrame (_In_ PTEB_ACTIVE_FRAME Frame)
 
NTSYSAPI VOID NTAPI RtlPushFrame (_In_ PTEB_ACTIVE_FRAME Frame)
 
NTSYSAPI PTEB_ACTIVE_FRAME NTAPI RtlGetFrame (VOID)
 
NTSYSAPI PRTL_DEBUG_INFORMATION NTAPI RtlCreateQueryDebugBuffer (_In_ ULONG Size, _In_ BOOLEAN EventPair)
 
NTSYSAPI NTSTATUS NTAPI RtlDestroyQueryDebugBuffer (IN PRTL_DEBUG_INFORMATION DebugBuffer)
 
NTSYSAPI NTSTATUS NTAPI RtlQueryProcessDebugInformation (_In_ ULONG ProcessId, _In_ ULONG DebugInfoClassMask, _Inout_ PRTL_DEBUG_INFORMATION DebugBuffer)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateTimer (_In_ HANDLE TimerQueue, _In_ PHANDLE phNewTimer, _In_ WAITORTIMERCALLBACKFUNC Callback, _In_ PVOID Parameter, _In_ ULONG DueTime, _In_ ULONG Period, _In_ ULONG Flags)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateTimerQueue (PHANDLE TimerQueue)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimer (_In_ HANDLE TimerQueue, _In_ HANDLE Timer, _In_ HANDLE CompletionEvent)
 
NTSYSAPI NTSTATUS NTAPI RtlUpdateTimer (_In_ HANDLE TimerQueue, _In_ HANDLE Timer, _In_ ULONG DueTime, _In_ ULONG Period)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueueEx (_In_ HANDLE TimerQueue, _In_opt_ HANDLE CompletionEvent)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueue (HANDLE TimerQueue)
 
PSLIST_ENTRY FASTCALL InterlockedPushListSList (_Inout_ PSLIST_HEADER ListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY List, _Inout_ PSLIST_ENTRY ListEnd, _In_ ULONG Count)
 
NTSYSAPI VOID NTAPI RtlInitializeRangeList (_Out_ PRTL_RANGE_LIST RangeList)
 
NTSYSAPI VOID NTAPI RtlFreeRangeList (_In_ PRTL_RANGE_LIST RangeList)
 
NTSYSAPI NTSTATUS NTAPI RtlCopyRangeList (_Out_ PRTL_RANGE_LIST CopyRangeList, _In_ PRTL_RANGE_LIST RangeList)
 
NTSYSAPI NTSTATUS NTAPI RtlMergeRangeLists (_Out_ PRTL_RANGE_LIST MergedRangeList, _In_ PRTL_RANGE_LIST RangeList1, _In_ PRTL_RANGE_LIST RangeList2, _In_ ULONG Flags)
 
NTSYSAPI NTSTATUS NTAPI RtlInvertRangeList (_Out_ PRTL_RANGE_LIST InvertedRangeList, _In_ PRTL_RANGE_LIST RangeList)
 
NTSYSAPI NTSTATUS NTAPI RtlAddRange (_Inout_ PRTL_RANGE_LIST RangeList, _In_ ULONGLONG Start, _In_ ULONGLONG End, _In_ UCHAR Attributes, _In_ ULONG Flags, _In_opt_ PVOID UserData, _In_opt_ PVOID Owner)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteRange (_Inout_ PRTL_RANGE_LIST RangeList, _In_ ULONGLONG Start, _In_ ULONGLONG End, _In_ PVOID Owner)
 
NTSYSAPI NTSTATUS NTAPI RtlDeleteOwnersRanges (_Inout_ PRTL_RANGE_LIST RangeList, _In_ _Maybenull_ PVOID Owner)
 
NTSYSAPI NTSTATUS NTAPI RtlFindRange (_In_ PRTL_RANGE_LIST RangeList, _In_ ULONGLONG Minimum, _In_ ULONGLONG Maximum, _In_ ULONG Length, _In_ ULONG Alignment, _In_ ULONG Flags, _In_ UCHAR AttributeAvailableMask, _In_opt_ PVOID Context, _In_opt_ PRTL_CONFLICT_RANGE_CALLBACK Callback, _Out_ PULONGLONG Start)
 
NTSYSAPI NTSTATUS NTAPI RtlIsRangeAvailable (_In_ PRTL_RANGE_LIST RangeList, _In_ ULONGLONG Start, _In_ ULONGLONG End, _In_ ULONG Flags, _In_ UCHAR AttributeAvailableMask, _In_opt_ PVOID Context, _In_opt_ PRTL_CONFLICT_RANGE_CALLBACK Callback, _Out_ PBOOLEAN Available)
 
NTSYSAPI NTSTATUS NTAPI RtlGetFirstRange (_In_ PRTL_RANGE_LIST RangeList, _Out_ PRTL_RANGE_LIST_ITERATOR Iterator, _Outptr_ PRTL_RANGE *Range)
 
NTSYSAPI NTSTATUS NTAPI RtlGetNextRange (_Inout_ PRTL_RANGE_LIST_ITERATOR Iterator, _Outptr_ PRTL_RANGE *Range, _In_ BOOLEAN MoveForwards)
 
ULONG __cdecl DbgPrint (_In_z_ _Printf_format_string_ PCSTR Format,...)
 
NTSYSAPI ULONG __cdecl DbgPrintEx (_In_ ULONG ComponentId, _In_ ULONG Level, _In_z_ _Printf_format_string_ PCSTR Format,...)
 
NTSYSAPI ULONG NTAPI DbgPrompt (_In_z_ PCCH Prompt, _Out_writes_bytes_(MaximumResponseLength) PCH Response, _In_ ULONG MaximumResponseLength)
 
VOID NTAPI DbgBreakPoint (VOID)
 
VOID NTAPI DbgLoadImageSymbols (_In_ PSTRING Name, _In_ PVOID Base, _In_ ULONG_PTR ProcessId)
 
VOID NTAPI DbgUnLoadImageSymbols (_In_ PSTRING Name, _In_ PVOID Base, _In_ ULONG_PTR ProcessId)
 
VOID NTAPI DbgCommandString (_In_ PCCH Name, _In_ PCCH Command)
 
NTSYSAPI PRTL_HANDLE_TABLE_ENTRY NTAPI RtlAllocateHandle (_In_ PRTL_HANDLE_TABLE HandleTable, _Inout_ PULONG Index)
 
NTSYSAPI VOID NTAPI RtlDestroyHandleTable (_Inout_ PRTL_HANDLE_TABLE HandleTable)
 
NTSYSAPI BOOLEAN NTAPI RtlFreeHandle (_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
 
NTSYSAPI VOID NTAPI RtlInitializeHandleTable (_In_ ULONG TableSize, _In_ ULONG HandleSize, _In_ PRTL_HANDLE_TABLE HandleTable)
 
NTSYSAPI BOOLEAN NTAPI RtlIsValidHandle (_In_ PRTL_HANDLE_TABLE HandleTable, _In_ PRTL_HANDLE_TABLE_ENTRY Handle)
 
 _Success_ (return!=FALSE) NTSYSAPI BOOLEAN NTAPI RtlIsValidIndexHandle(_In_ PRTL_HANDLE_TABLE HandleTable
 
NTSYSAPI NTSTATUS NTAPI RtlFindMessage (_In_ PVOID BaseAddress, _In_ ULONG Type, _In_ ULONG Language, _In_ ULONG MessageId, _Out_ PMESSAGE_RESOURCE_ENTRY *MessageResourceEntry)
 
NTSYSAPI ULONG NTAPI RtlGetNtGlobalFlags (VOID)
 
NTSYSAPI PVOID NTAPI RtlImageRvaToVa (_In_ PIMAGE_NT_HEADERS NtHeader, _In_ PVOID BaseAddress, _In_ ULONG Rva, _Inout_opt_ PIMAGE_SECTION_HEADER *SectionHeader)
 
NTSYSAPI PIMAGE_NT_HEADERS NTAPI RtlImageNtHeader (_In_ PVOID BaseAddress)
 
NTSYSAPI NTSTATUS NTAPI RtlImageNtHeaderEx (_In_ ULONG Flags, _In_ PVOID BaseAddress, _In_ ULONGLONG Size, _Out_ PIMAGE_NT_HEADERS *NtHeader)
 
NTSYSAPI PIMAGE_SECTION_HEADER NTAPI RtlImageRvaToSection (_In_ PIMAGE_NT_HEADERS NtHeader, _In_ PVOID BaseAddress, _In_ ULONG Rva)
 
ULONG NTAPI LdrRelocateImageWithBias (_In_ PVOID BaseAddress, _In_ LONGLONG AdditionalBias, _In_opt_ PCSTR LoaderName, _In_ ULONG Success, _In_ ULONG Conflict, _In_ ULONG Invalid)
 
NTSYSAPI NTSTATUS NTAPI RtlCreateRegistryKey (_In_ ULONG RelativeTo, _In_ PWSTR Path)
 
NTSYSAPI NTSTATUS NTAPI RtlFormatCurrentUserKeyPath (_Out_ _At_(KeyPath->Buffer, __drv_allocatesMem(Mem) _Post_bytecap_(KeyPath->MaximumLength) _Post_bytecount_(KeyPath->Length)) PUNICODE_STRING KeyPath)
 
NTSYSAPI NTSTATUS NTAPI RtlOpenCurrentUser (_In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE KeyHandle)
 
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_reads_bytes_opt_ (ValueLength) PVOID ValueData
 
NTSYSAPI VOID NTAPI RtlGetDefaultCodePage (_Out_ PUSHORT AnsiCodePage, _Out_ PUSHORT OemCodePage)
 
NTSYSAPI VOID NTAPI RtlInitNlsTables (_In_ PUSHORT AnsiTableBase, _In_ PUSHORT OemTableBase, _In_ PUSHORT CaseTableBase, _Out_ PNLSTABLEINFO NlsTable)
 
NTSYSAPI VOID NTAPI RtlResetRtlTranslations (_In_ PNLSTABLEINFO NlsTable)
 
NTSYSAPI ULONG NTAPI RtlUniform (_In_ PULONG Seed)
 
NTSYSAPI ULONG NTAPI RtlRandom (_Inout_ PULONG Seed)
 
NTSYSAPI ULONG NTAPI RtlComputeCrc32 (_In_ ULONG InitialCrc, _In_ const UCHAR *Buffer, _In_ ULONG Length)
 
NTSYSAPI PSTR NTAPI RtlIpv4AddressToStringA (_In_ const struct in_addr *Addr, _Out_writes_(16) PCHAR S)
 
NTSYSAPI PWSTR NTAPI RtlIpv4AddressToStringW (_In_ const struct in_addr *Addr, _Out_writes_(16) PWCHAR S)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv4AddressToStringExA (_In_ const struct in_addr *Address, _In_ USHORT Port, _Out_writes_to_(*AddressStringLength, *AddressStringLength) PCHAR AddressString, _Inout_ PULONG AddressStringLength)
 
NTSTATUS NTAPI RtlIpv4AddressToStringExW (_In_ const struct in_addr *Address, _In_ USHORT Port, _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString, _Inout_ PULONG AddressStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressA (_In_ PCSTR String, _In_ BOOLEAN Strict, _Out_ PCSTR *Terminator, _Out_ struct in_addr *Addr)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressW (_In_ PCWSTR String, _In_ BOOLEAN Strict, _Out_ PCWSTR *Terminator, _Out_ struct in_addr *Addr)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressExA (_In_ PCSTR AddressString, _In_ BOOLEAN Strict, _Out_ struct in_addr *Address, _Out_ PUSHORT Port)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressExW (_In_ PCWSTR AddressString, _In_ BOOLEAN Strict, _Out_ struct in_addr *Address, _Out_ PUSHORT Port)
 
NTSYSAPI PSTR NTAPI RtlIpv6AddressToStringA (_In_ const struct in6_addr *Addr, _Out_writes_(46) PSTR S)
 
NTSYSAPI PWSTR NTAPI RtlIpv6AddressToStringW (_In_ const struct in6_addr *Addr, _Out_writes_(46) PWSTR S)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6AddressToStringExA (_In_ const struct in6_addr *Address, _In_ ULONG ScopeId, _In_ USHORT Port, _Out_writes_to_(*AddressStringLength, *AddressStringLength) PSTR AddressString, _Inout_ PULONG AddressStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6AddressToStringExW (_In_ const struct in6_addr *Address, _In_ ULONG ScopeId, _In_ USHORT Port, _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString, _Inout_ PULONG AddressStringLength)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressA (_In_ PCSTR String, _Out_ PCSTR *Terminator, _Out_ struct in6_addr *Addr)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressW (_In_ PCWSTR String, _Out_ PCWSTR *Terminator, _Out_ struct in6_addr *Addr)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressExA (_In_ PCSTR AddressString, _Out_ struct in6_addr *Address, _Out_ PULONG ScopeId, _Out_ PUSHORT Port)
 
NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressExW (_In_ PCWSTR AddressString, _Out_ struct in6_addr *Address, _Out_ PULONG ScopeId, _Out_ PUSHORT Port)
 
NTSYSAPI BOOLEAN NTAPI RtlCutoverTimeToSystemTime (_In_ PTIME_FIELDS CutoverTimeFields, _Out_ PLARGE_INTEGER SystemTime, _In_ PLARGE_INTEGER CurrentTime, _In_ BOOLEAN ThisYearsCutoverOnly)
 
NTSYSAPI NTSTATUS NTAPI RtlQueryTimeZoneInformation (_Out_ PRTL_TIME_ZONE_INFORMATION TimeZoneInformation)
 
NTSYSAPI VOID NTAPI RtlSecondsSince1970ToTime (_In_ ULONG SecondsSince1970, _Out_ PLARGE_INTEGER Time)
 
NTSYSAPI NTSTATUS NTAPI RtlSetTimeZoneInformation (_In_ PRTL_TIME_ZONE_INFORMATION TimeZoneInformation)
 
 _Success_ (return !=FALSE) NTSYSAPI BOOLEAN NTAPI RtlTimeFieldsToTime(_In_ PTIME_FIELDS TimeFields
 
NTSYSAPI VOID NTAPI RtlTimeToTimeFields (PLARGE_INTEGER Time, PTIME_FIELDS TimeFields)
 
NTSYSAPI NTSTATUS NTAPI RtlSystemTimeToLocalTime (_In_ PLARGE_INTEGER SystemTime, _Out_ PLARGE_INTEGER LocalTime)
 
NTSYSAPI VOID NTAPI RtlInitializeConditionVariable (_Out_ PRTL_CONDITION_VARIABLE ConditionVariable)
 
NTSYSAPI VOID NTAPI RtlWakeConditionVariable (_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable)
 
NTSYSAPI VOID NTAPI RtlWakeAllConditionVariable (_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable)
 
NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableCS (_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable, _Inout_ PRTL_CRITICAL_SECTION CriticalSection, _In_opt_ PLARGE_INTEGER TimeOut)
 
NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableSRW (_Inout_ PRTL_CONDITION_VARIABLE ConditionVariable, _Inout_ PRTL_SRWLOCK SRWLock, _In_opt_ PLARGE_INTEGER TimeOut, _In_ ULONG Flags)
 
NTSYSAPI NTSTATUS NTAPI RtlFindActivationContextSectionGuid (ULONG flags, const GUID *extguid, ULONG section_kind, const GUID *guid, void *ptr)
 

Variables

_Out_writes_bytes_to_opt_ BufferLength PSECURITY_DESCRIPTOR SelfRelativeSecurityDescriptor
 
_Out_writes_bytes_to_opt_ BufferLength PSECURITY_DESCRIPTOR _Inout_ PULONG BufferLength
 
_In_ ULONG Revision
 
_In_ ULONG _In_ ACCESS_MASK AccessMask
 
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
 
_In_ ULONG dwAceRevision
 
_In_ ULONG _In_ ULONG AceFlags
 
_In_ ULONG _In_ ULONG _In_ ACCESS_MASK _In_ PSID pSid
 
_In_ PLUID SourceLuid
 
_In_ PSID _In_ BOOLEAN AllocateDestinationString
 
_In_ PSID SourceSid
 
_In_ PSID_IDENTIFIER_AUTHORITY IdentifierAuthority
 
_In_ PSID_IDENTIFIER_AUTHORITY _In_ UCHAR SubAuthorityCount
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR AbsoluteSecurityDescriptor
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG AbsoluteSecurityDescriptorSize
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG DaclSize
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL Sacl
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG SaclSize
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID _Inout_ PULONG OwnerSize
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID _Inout_ PULONG _Out_writes_bytes_to_opt_ PrimaryGroupSize PSID PrimaryGroup
 
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID _Inout_ PULONG _Out_writes_bytes_to_opt_ PrimaryGroupSize PSID _Inout_ PULONG PrimaryGroupSize
 
_In_ BOOLEAN DaclPresent
 
_In_ BOOLEAN _In_opt_ PACL _In_opt_ BOOLEAN DaclDefaulted
 
_In_opt_ PSID Group
 
_In_opt_ PSID _In_opt_ BOOLEAN GroupDefaulted
 
_In_opt_ PSID _In_opt_ BOOLEAN OwnerDefaulted
 
_In_ ULONG SecurityDescriptorLength
 
_In_ ULONG _In_ SECURITY_INFORMATION RequiredInformation
 
_Out_ _Inout_ POEM_STRING DestinationString
 
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
 
*BytesInUnicodeString PWCH UnicodeString
 
*BytesInUnicodeString PWCH _In_ ULONG MaxBytesInUnicodeString
 
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG BytesInUnicodeString
 
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG _In_ ULONG BytesInOemString
 
_In_ const STRINGString2
 
_In_ const STRING _In_ BOOLEAN CaseInsensitive
 
_In_ const STRING _In_ BOOLEAN CaseInSensitive
 
_In_ const STRINGSource
 
_In_opt_ ULONG Base
 
_In_opt_ ULONG _Out_ PULONG Value
 
*BytesInUnicodeString PWCH _In_ ULONG _Out_opt_ PULONG _In_ ULONG BytesInMultiByteString
 
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
 
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING _Out_ PULONG Length
 
_Inout_opt_ POEM_STRING OemName
 
_Inout_opt_ POEM_STRING _Out_opt_ PBOOLEAN NameContainsSpaces
 
_In_ ULONG UncompressedBufferSize
 
_In_ ULONG _In_ ULONG CompressedBufferSize
 
_In_ ULONG _In_ ULONG _Out_ PULONG FinalUncompressedSize
 
_In_ ULONG Index
 
_In_ ULONG _Out_ PRTL_HANDLE_TABLE_ENTRYHandle
 
_In_ BOOLEAN MappedAsImage
 
_In_ BOOLEAN _In_ USHORT Directory
 
_In_ BOOLEAN _In_ USHORT _Out_ PULONG Size
 
_In_ PWSTR Path
 
_In_ PCWSTR _Inout_ _At_ QueryTable EntryContext
 
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE QueryTable
 
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE _In_opt_ PVOID Context
 
_In_ PCWSTR _Inout_ _At_ QueryTable _Pre_unknown_ PRTL_QUERY_REGISTRY_TABLE _In_opt_ PVOID _In_opt_ PVOID Environment
 
_In_ PCWSTR _In_z_ PCWSTR ValueName
 
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG ValueType
 
_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_ ULONG ValueLength
 
_Out_ PCPTABLEINFO CodePageTable
 
_Out_ PLARGE_INTEGER Time
 
_Out_ PULONG ElapsedSeconds
 
_In_ ULONG TypeMask
 
_In_ ULONG _In_ ULONGLONG ConditionMask
 

Macro Definition Documentation

◆ NtCurrentPeb

#define NtCurrentPeb ( )    (NtCurrentTeb()->ProcessEnvironmentBlock)

Definition at line 1111 of file rtlfuncs.h.

◆ RTL_CONVERTED_NT_PATH

#define RTL_CONVERTED_NT_PATH   3

Definition at line 2985 of file rtlfuncs.h.

◆ RTL_CONVERTED_UNC_PATH

#define RTL_CONVERTED_UNC_PATH   2

Definition at line 2984 of file rtlfuncs.h.

◆ RTL_SKIP_BUFFER_COPY

#define RTL_SKIP_BUFFER_COPY   0x00000001

Definition at line 2463 of file rtlfuncs.h.

◆ RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT

#define RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT   8

Definition at line 820 of file rtlfuncs.h.

◆ RTL_UNCHANGED_DOS_PATH

#define RTL_UNCHANGED_DOS_PATH   4

Definition at line 2986 of file rtlfuncs.h.

◆ RTL_UNCHANGED_UNK_PATH

#define RTL_UNCHANGED_UNK_PATH   1

Definition at line 2983 of file rtlfuncs.h.

Function Documentation

◆ _At_() [1/2]

_At_ ( Destination->  Buffer,
_Out_bytecap_(Destination->MaximumLength  
)

◆ _At_() [2/2]

_Out_ _At_ ( DestinationString->  Buffer,
__drv_allocatesMem(Mem)   
)

◆ _In_reads_bytes_() [1/3]

◆ _In_reads_bytes_() [2/3]

◆ _In_reads_bytes_() [3/3]

_In_ ULONG _In_reads_bytes_ ( CompressedBufferSize  )

◆ _In_reads_bytes_opt_()

_In_ PCWSTR _In_z_ PCWSTR _In_ ULONG _In_reads_bytes_opt_ ( ValueLength  )

◆ _IRQL_requires_max_() [1/3]

_IRQL_requires_max_ ( APC_LEVEL  )

Probes and locks virtual pages in memory for the specified process.

Parameters
[in,out]MemoryDescriptorListMemory Descriptor List (MDL) containing the buffer to be probed and locked.
[in]ProcessThe process for which the buffer should be probed and locked.
[in]AccessModeAccess mode for probing the pages. Can be KernelMode or UserMode.
[in]LockOperationThe type of the probing and locking operation. Can be IoReadAccess, IoWriteAccess or IoModifyAccess.
Returns
Nothing.
See also
MmProbeAndLockPages
Remarks
Must be called at IRQL <= APC_LEVEL

Probes and locks virtual pages in memory for the specified process.

Frees previously reserved amount of memory in system virtual address space.

Parameters
[in]NumberOfBytesSize, in bytes, of memory to reserve.
[in]PoolTagPool Tag identifying the buffer. Usually consists from 4 characters in reversed order.
Returns
A pointer to the 1st memory block of the reserved buffer in case of success, NULL otherwise.
Remarks
Must be called at IRQL <= APC_LEVEL
Parameters
[in]BaseAddressA pointer to the 1st memory block of the reserved buffer.
[in]PoolTagPool Tag identifying the buffer. Usually consists from 4 characters in reversed order.
Returns
Nothing.
See also
MmAllocateMappingAddress
Remarks
Must be called at IRQL <= APC_LEVEL

Definition at line 37 of file cddata.c.

254{
255 THREAD_CONTEXT ThreadContext = {0};
256 PIRP_CONTEXT IrpContext = NULL;
258
259#ifdef CD_SANITY
260 PVOID PreviousTopLevel;
261#endif
262
264
265#if DBG
266
267 KIRQL SaveIrql = KeGetCurrentIrql();
268
269#endif
270
272
274
276
277#ifdef CD_SANITY
278 PreviousTopLevel = IoGetTopLevelIrp();
279#endif
280
281 //
282 // Loop until this request has been completed or posted.
283 //
284
285 do {
286
287 //
288 // Use a try-except to handle the exception cases.
289 //
290
291 _SEH2_TRY {
292
293 //
294 // If the IrpContext is NULL then this is the first pass through
295 // this loop.
296 //
297
298 if (IrpContext == NULL) {
299
300 //
301 // Decide if this request is waitable an allocate the IrpContext.
302 // If the file object in the stack location is NULL then this
303 // is a mount which is always waitable. Otherwise we look at
304 // the file object flags.
305 //
306
308
309 Wait = TRUE;
310
311 } else {
312
313 Wait = CanFsdWait( Irp );
314 }
315
316 IrpContext = CdCreateIrpContext( Irp, Wait );
317
318 //
319 // Update the thread context information.
320 //
321
322 CdSetThreadContext( IrpContext, &ThreadContext );
323
324#ifdef CD_SANITY
325 NT_ASSERT( !CdTestTopLevel ||
326 SafeNodeType( IrpContext->TopLevel ) == CDFS_NTC_IRP_CONTEXT );
327#endif
328
329 //
330 // Otherwise cleanup the IrpContext for the retry.
331 //
332
333 } else {
334
335 //
336 // Set the MORE_PROCESSING flag to make sure the IrpContext
337 // isn't inadvertently deleted here. Then cleanup the
338 // IrpContext to perform the retry.
339 //
340
341 SetFlag( IrpContext->Flags, IRP_CONTEXT_FLAG_MORE_PROCESSING );
342 CdCleanupIrpContext( IrpContext, FALSE );
343 }
344
345 //
346 // Case on the major irp code.
347 //
348
349 switch (IrpContext->MajorFunction) {
350
351 case IRP_MJ_CREATE :
352
353 Status = CdCommonCreate( IrpContext, Irp );
354 break;
355
356 case IRP_MJ_CLOSE :
357
358 Status = CdCommonClose( IrpContext, Irp );
359 break;
360
361 case IRP_MJ_READ :
362
363 //
364 // If this is an Mdl complete request, don't go through
365 // common read.
366 //
367
368 if (FlagOn( IrpContext->MinorFunction, IRP_MN_COMPLETE )) {
369
370 Status = CdCompleteMdl( IrpContext, Irp );
371
372 } else {
373
374 Status = CdCommonRead( IrpContext, Irp );
375 }
376
377 break;
378
379 case IRP_MJ_WRITE :
380
381 Status = CdCommonWrite( IrpContext, Irp );
382 break;
383
385
386 Status = CdCommonQueryInfo( IrpContext, Irp );
387 break;
388
390
391 Status = CdCommonSetInfo( IrpContext, Irp );
392 break;
393
395
396 Status = CdCommonQueryVolInfo( IrpContext, Irp );
397 break;
398
400
401 Status = CdCommonDirControl( IrpContext, Irp );
402 break;
403
405
406 Status = CdCommonFsControl( IrpContext, Irp );
407 break;
408
410
411 Status = CdCommonDevControl( IrpContext, Irp );
412 break;
413
415
416 Status = CdCommonLockControl( IrpContext, Irp );
417 break;
418
419 case IRP_MJ_CLEANUP :
420
421 Status = CdCommonCleanup( IrpContext, Irp );
422 break;
423
424 case IRP_MJ_PNP :
425
426 Status = CdCommonPnp( IrpContext, Irp );
427 break;
428
429 case IRP_MJ_SHUTDOWN :
430
431 Status = CdCommonShutdown( IrpContext, Irp );
432 break;
433
434 default :
435
437 CdCompleteRequest( IrpContext, Irp, Status );
438 }
439
441
442 Status = CdProcessException( IrpContext, Irp, _SEH2_GetExceptionCode() );
443 } _SEH2_END;
444
445 } while (Status == STATUS_CANT_WAIT);
446
447#ifdef CD_SANITY
448 NT_ASSERT( !CdTestTopLevel ||
449 (PreviousTopLevel == IoGetTopLevelIrp()) );
450#endif
451
453
454 NT_ASSERT( SaveIrql == KeGetCurrentIrql( ));
455
456 return Status;
457}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
VOID CdCompleteRequest(_Inout_opt_ PIRP_CONTEXT IrpContext, _Inout_opt_ PIRP Irp, _In_ NTSTATUS Status)
Definition: cddata.c:914
LONG CdExceptionFilter(_Inout_ PIRP_CONTEXT IrpContext, _In_ PEXCEPTION_POINTERS ExceptionPointer)
Definition: cddata.c:525
VOID CdSetThreadContext(_Inout_ PIRP_CONTEXT IrpContext, _In_ PTHREAD_CONTEXT ThreadContext)
Definition: cddata.c:981
#define ASSERT_OPTIONAL_IRP(I)
Definition: cddata.h:251
NTSTATUS CdCompleteMdl(_In_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: cachesup.c:411
VOID CdCleanupIrpContext(_In_ PIRP_CONTEXT IrpContext, _In_ BOOLEAN Post)
Definition: strucsup.c:1733
#define CanFsdWait(I)
Definition: cdprocs.h:2001
NTSTATUS CdCommonLockControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: lockctrl.c:35
NTSTATUS CdCommonDevControl(_Inout_ PIRP_CONTEXT IrpContext, _Inout_ PIRP Irp)
Definition: devctrl.c:46
_Ret_valid_ PIRP_CONTEXT CdCreateIrpContext(_In_ PIRP Irp, _In_ BOOLEAN Wait)
Definition: strucsup.c:1573
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
#define IRP_CONTEXT_FLAG_MORE_PROCESSING
Definition: cdstruc.h:1214
_In_ PIRP Irp
Definition: csq.h:116
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CDFS_NTC_IRP_CONTEXT
Definition: nodetype.h:34
#define SafeNodeType(Ptr)
Definition: nodetype.h:54
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define SetFlag(_F, _SF)
Definition: ext2fs.h:187
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
Status
Definition: gdiplustypes.h:25
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843
#define STATUS_CANT_WAIT
Definition: ntstatus.h:452
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:165
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:66
#define _SEH2_GetExceptionInformation()
Definition: pseh2_64.h:164
#define _SEH2_END
Definition: pseh2_64.h:155
#define _SEH2_TRY
Definition: pseh2_64.h:55
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
#define IRP_MJ_READ
Definition: rdpdr.c:46
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
Definition: wdfdevice.h:550
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
#define IRP_MN_COMPLETE
Definition: iotypes.h:4420
#define IRP_MJ_FILE_SYSTEM_CONTROL
#define IRP_MJ_SHUTDOWN
#define IRP_MJ_CLEANUP
#define NT_ASSERT
Definition: rtlfuncs.h:3327

◆ _IRQL_requires_max_() [2/3]

Definition at line 347 of file common.c.

3587{
3589 BOOLEAN requestSent = FALSE;
3590
3591 BOOLEAN shouldRetry = TRUE;
3592 PCDB cdb = (PCDB)DeviceExtension->PowerContext.Srb.Cdb;
3593 ULONG timeoutValue = DeviceExtension->TimeOutValue;
3594 ULONG retryCount = 1;
3595
3596 // reset some fields.
3597 DeviceExtension->PowerContext.RetryIntervalIn100ns = 0;
3598 status = PowerContextReuseRequest(DeviceExtension);
3599 RequestClearSendTime(DeviceExtension->PowerContext.PowerRequest);
3600
3601 if (!NT_SUCCESS(status))
3602 {
3603 return status;
3604 }
3605
3606 // set proper timeout value and max retry count.
3607 switch(DeviceExtension->PowerContext.PowerChangeState.PowerDown)
3608 {
3612 break;
3613
3615 // Case of issuing SYNC CACHE command. Do not use power irp timeout remaining time in this case
3616 // as we want to give best try on SYNC CACHE command.
3617 retryCount = MAXIMUM_RETRIES;
3618 timeoutValue = DeviceExtension->TimeOutValue;
3619 break;
3620
3622 {
3623 // Case of issuing STOP UNIT command
3624 // As "Imme" bit is set to '1', this command should be completed in short time.
3625 // This command is at low importance, failure of this command has very small impact.
3626 ULONG secondsRemaining = 0;
3627
3628#if (WINVER >= 0x0601)
3629 // this API is introduced in Windows7
3630 PoQueryWatchdogTime(DeviceExtension->LowerPdo, &secondsRemaining);
3631#endif
3632
3633 if (secondsRemaining == 0)
3634 {
3635 // not able to retrieve remaining time from PoQueryWatchdogTime API, use default values.
3636 retryCount = MAXIMUM_RETRIES;
3637 timeoutValue = SCSI_CDROM_TIMEOUT;
3638 }
3639 else
3640 {
3641 // plan to leave about 30 seconds to lower level drivers if possible.
3642 if (secondsRemaining >= 32)
3643 {
3644 retryCount = (secondsRemaining - 30)/SCSI_CDROM_TIMEOUT + 1;
3645 timeoutValue = SCSI_CDROM_TIMEOUT;
3646
3647 if (retryCount > MAXIMUM_RETRIES)
3648 {
3649 retryCount = MAXIMUM_RETRIES;
3650 }
3651
3652 if (retryCount == 1)
3653 {
3654 timeoutValue = secondsRemaining - 30;
3655 }
3656 }
3657 else
3658 {
3659 // issue the command with minimal timeout value and do not retry on it.
3660 retryCount = 1;
3661 timeoutValue = 2;
3662 }
3663 }
3664 }
3665 break;
3666 default:
3667 NT_ASSERT( FALSE );
3669 return status;
3670 }
3671
3672 DeviceExtension->PowerContext.RetryCount = retryCount;
3673
3674 // issue command.
3675 while (shouldRetry)
3676 {
3677
3678 // set SRB fields.
3679 DeviceExtension->PowerContext.Srb.SrbFlags = SRB_FLAGS_NO_DATA_TRANSFER |
3684
3685 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_EXECUTE_SCSI;
3686 DeviceExtension->PowerContext.Srb.TimeOutValue = timeoutValue;
3687
3688 if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceInitial)
3689 {
3690 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_LOCK_QUEUE;
3691 }
3692 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceLocked)
3693 {
3694 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_QUIESCE_DEVICE;
3695 }
3696 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3697 {
3698 // Case of issuing SYNC CACHE command.
3699 DeviceExtension->PowerContext.Srb.CdbLength = 10;
3700 cdb->SYNCHRONIZE_CACHE10.OperationCode = SCSIOP_SYNCHRONIZE_CACHE;
3701 }
3702 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceFlushed)
3703 {
3704 // Case of issuing STOP UNIT command.
3705 DeviceExtension->PowerContext.Srb.CdbLength = 6;
3706 cdb->START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
3707 cdb->START_STOP.Start = 0;
3708 cdb->START_STOP.Immediate = 1;
3709 }
3710 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceStopped)
3711 {
3712 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_UNLOCK_QUEUE;
3713 }
3714
3715 // Set up completion routine and context if requested
3717 {
3718 WdfRequestSetCompletionRoutine(DeviceExtension->PowerContext.PowerRequest,
3720 Context);
3721 }
3722
3723 status = RequestSend(DeviceExtension,
3724 DeviceExtension->PowerContext.PowerRequest,
3725 DeviceExtension->IoTarget,
3727 &requestSent);
3728
3729 if (requestSent)
3730 {
3731 if ((CompletionRoutine == NULL) &&
3732 (SRB_STATUS(DeviceExtension->PowerContext.Srb.SrbStatus) != SRB_STATUS_SUCCESS))
3733 {
3734 TracePrint((TRACE_LEVEL_ERROR,
3735 TRACE_FLAG_POWER,
3736 "%p\tError occured when issuing %s command to device. Srb %p, Status %x\n",
3737 DeviceExtension->PowerContext.PowerRequest,
3738 (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced) ? "SYNC CACHE" : "STOP UNIT",
3739 &DeviceExtension->PowerContext.Srb,
3740 DeviceExtension->PowerContext.Srb.SrbStatus));
3741
3742 NT_ASSERT(!(TEST_FLAG(DeviceExtension->PowerContext.Srb.SrbStatus, SRB_STATUS_QUEUE_FROZEN)));
3743
3744 shouldRetry = RequestSenseInfoInterpret(DeviceExtension,
3745 DeviceExtension->PowerContext.PowerRequest,
3746 &(DeviceExtension->PowerContext.Srb),
3747 retryCount - DeviceExtension->PowerContext.RetryCount,
3748 &status,
3749 &(DeviceExtension->PowerContext.RetryIntervalIn100ns));
3750
3751 if (shouldRetry && (DeviceExtension->PowerContext.RetryCount-- == 0))
3752 {
3753 shouldRetry = FALSE;
3754 }
3755 }
3756 else
3757 {
3758 // succeeded, do not need to retry.
3759 shouldRetry = FALSE;
3760 }
3761
3762 }
3763 else
3764 {
3765 // request failed to be sent
3766 shouldRetry = FALSE;
3767 }
3768
3769 if (shouldRetry)
3770 {
3772 t.QuadPart = -DeviceExtension->PowerContext.RetryIntervalIn100ns;
3774
3775 status = PowerContextReuseRequest(DeviceExtension);
3776 if (!NT_SUCCESS(status))
3777 {
3778 shouldRetry = FALSE;
3779 }
3780 }
3781 }
3782
3783 if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3784 {
3785 // record SYNC CACHE command completion time stamp.
3786 KeQueryTickCount(&DeviceExtension->PowerContext.Step1CompleteTime);
3787 }
3788
3789 return status;
3790}
#define MAXIMUM_RETRIES
Definition: cdrom.h:124
#define SCSI_CDROM_TIMEOUT
Definition: cdrom.h:680
BOOLEAN RequestSenseInfoInterpret(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG RetriedCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIntervalIn100ns)
Definition: sense.c:2467
#define TEST_FLAG(Flags, Bit)
Definition: cdrom.h:1495
@ PowerDownDeviceStopped
Definition: cdrom.h:412
@ PowerDownDeviceQuiesced
Definition: cdrom.h:410
@ PowerDownDeviceInitial
Definition: cdrom.h:408
@ PowerDownDeviceLocked
Definition: cdrom.h:409
@ PowerDownDeviceFlushed
Definition: cdrom.h:411
union _CDB * PCDB
#define SCSIOP_START_STOP_UNIT
Definition: cdrw_hw.h:897
#define SCSIOP_SYNCHRONIZE_CACHE
Definition: cdrw_hw.h:918
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
NTSTATUS RequestSend(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDFIOTARGET IoTarget, _In_ ULONG Flags, _Out_opt_ PBOOLEAN RequestSent)
Definition: common.c:3793
VOID RequestClearSendTime(_In_ WDFREQUEST Request)
Definition: common.c:111
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:315
#define SRB_FLAGS_NO_DATA_TRANSFER
Definition: srb.h:402
#define SRB_FUNCTION_LOCK_QUEUE
Definition: srb.h:332
#define SRB_FUNCTION_UNLOCK_QUEUE
Definition: srb.h:333
#define SRB_FLAGS_BYPASS_LOCKED_QUEUE
Definition: srb.h:410
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
Definition: srb.h:397
#define SRB_STATUS(Status)
Definition: srb.h:389
#define SRB_STATUS_QUEUE_FROZEN
Definition: srb.h:386
#define SRB_FLAGS_NO_QUEUE_FREEZE
Definition: srb.h:404
#define SRB_STATUS_SUCCESS
Definition: srb.h:341
#define KeDelayExecutionThread(mode, foo, t)
Definition: env_spec_w32.h:484
GLdouble GLdouble t
Definition: gl.h:2047
#define KernelMode
Definition: asm.h:34
#define SRB_FLAGS_D3_PROCESSING
Definition: srb.h:165
#define SRB_FUNCTION_QUIESCE_DEVICE
Definition: srb.h:99
#define KeQueryTickCount(CurrentCount)
Definition: ke.h:43
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
uint32_t ULONG
Definition: typedefs.h:59
Definition: cdrw_hw.h:28
struct _CDB::_START_STOP START_STOP
struct _CDB::_SYNCHRONIZE_CACHE10 SYNCHRONIZE_CACHE10
@ WDF_REQUEST_SEND_OPTION_SYNCHRONOUS
Definition: wdfrequest.h:109
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895

◆ _IRQL_requires_max_() [3/3]

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 923 of file Messaging.c.

75{
76 PFLT_SERVER_PORT_OBJECT PortObject;
78
79 /* The caller must allow at least one connection */
80 if (MaxConnections == 0)
81 {
83 }
84
85 /* The request must be for a kernel handle */
86 if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87 {
89 }
90
91 /*
92 * Get rundown protection on the target to stop the owner
93 * from unloading whilst this port object is open. It gets
94 * removed in the FltpServerPortClose callback
95 */
97 if (!NT_SUCCESS(Status))
98 {
99 return Status;
100 }
101
102 /* Create the server port object for this filter */
107 NULL,
109 0,
110 0,
111 (PVOID *)&PortObject);
112 if (NT_SUCCESS(Status))
113 {
114 /* Zero out the struct */
115 RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116
117 /* Increment the ref count on the target filter */
119
120 /* Setup the filter port object */
121 PortObject->Filter = Filter;
125 PortObject->Cookie = ServerPortCookie;
126 PortObject->MaxConnections = MaxConnections;
127
128 /* Insert the object */
129 Status = ObInsertObject(PortObject,
130 NULL,
132 0,
133 NULL,
135 if (NT_SUCCESS(Status))
136 {
137 /* Lock the connection list */
139
140 /* Add the new port object to the connection list and increment the count */
143
144 /* Unlock the connection list*/
146 }
147 }
148
149 if (!NT_SUCCESS(Status))
150 {
151 /* Allow the filter to be cleaned up */
153 }
154
155 return Status;
156}
static const INTERNET_PORT ServerPort
Definition: CWebService.cpp:11
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1877
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1875
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1874
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1876
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
static LONG MaxConnections
#define FILE_READ_DATA
Definition: nt_native.h:628
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2935
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:1039
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121
LIST_ENTRY mList
Definition: fltmgrint.h:56
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ _Out_range_()

_Out_range_ ( )
pure virtual

◆ _Out_writes_bytes_()

_Out_writes_bytes_ ( DestinationSidLength  )

◆ _Out_writes_bytes_to_()

_Out_writes_bytes_to_ ( UncompressedBufferSize  ,
FinalUncompressedSize 
)

◆ _Success_() [1/2]

_Success_ ( return = FALSE)

Definition at line 1028 of file fsctrl.c.

3189{
3191
3192 PVPB Vpb = Vcb->Vpb;
3193 PVPB OldVpb;
3194
3195 BOOLEAN Remount = FALSE;
3196
3197 PAGED_CODE();
3198
3199 UNREFERENCED_PARAMETER( IrpContext );
3200
3201 //
3202 // Check whether we are looking for a device only Mvcb.
3203 //
3204
3205 for (Link = CdData.VcbQueue.Flink;
3206 Link != &CdData.VcbQueue;
3207 Link = Link->Flink) {
3208
3209 *OldVcb = CONTAINING_RECORD( Link, VCB, VcbLinks );
3210
3211 //
3212 // Skip ourselves.
3213 //
3214
3215 if (Vcb == *OldVcb) { continue; }
3216
3217 //
3218 // Look at the Vpb and state of the previous Vcb.
3219 //
3220
3221 OldVpb = (*OldVcb)->Vpb;
3222
3223 if ((OldVpb != Vpb) &&
3224 (OldVpb->RealDevice == Vpb->RealDevice) &&
3225 ((*OldVcb)->VcbCondition == VcbNotMounted)) {
3226
3227 //
3228 // If the current disk is a raw disk then it can match a previous music or
3229 // raw disk.
3230 //
3231
3232 if (FlagOn( Vcb->VcbState, VCB_STATE_AUDIO_DISK)) {
3233
3234 if (FlagOn( (*OldVcb)->VcbState, VCB_STATE_AUDIO_DISK )) {
3235
3236 //
3237 // If we have both TOC then fail the remount if the lengths
3238 // are different or they don't match.
3239 //
3240
3241 if ((Vcb->TocLength != (*OldVcb)->TocLength) ||
3242 ((Vcb->TocLength != 0) &&
3243 !RtlEqualMemory( Vcb->CdromToc,
3244 (*OldVcb)->CdromToc,
3245 Vcb->TocLength ))) {
3246
3247 continue;
3248 }
3249
3250 Remount = TRUE;
3251 break;
3252 }
3253
3254 //
3255 // The current disk is not a raw disk. Go ahead and compare
3256 // serial numbers, volume label and TOC.
3257 //
3258
3259 }
3260 else if ((OldVpb->SerialNumber == Vpb->SerialNumber) &&
3261 (Vcb->TocLength == (*OldVcb)->TocLength) &&
3262 ((Vcb->TocLength == 0) || RtlEqualMemory( Vcb->CdromToc,
3263 (*OldVcb)->CdromToc,
3264 Vcb->TocLength )) &&
3265 (Vpb->VolumeLabelLength == OldVpb->VolumeLabelLength) &&
3266 (RtlEqualMemory( OldVpb->VolumeLabel,
3267 Vpb->VolumeLabel,
3268 Vpb->VolumeLabelLength ))) {
3269 //
3270 // Remember the old Vcb. Then set the return value to
3271 // TRUE and break.
3272 //
3273
3274 Remount = TRUE;
3275 break;
3276 }
3277 }
3278 }
3279
3280 return Remount;
3281}
#define PAGED_CODE()
CD_DATA CdData
Definition: cddata.c:42
#define VCB_STATE_AUDIO_DISK
Definition: cdstruc.h:712
@ VcbNotMounted
Definition: cdstruc.h:490
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1676
#define RtlEqualMemory(dst, src, len)
Definition: kdvm.h:18
#define Vcb
Definition: cdprocs.h:1415
LIST_ENTRY VcbQueue
Definition: cdstruc.h:334
Definition: typedefs.h:120
struct _LIST_ENTRY * Flink
Definition: typedefs.h:121
Definition: cdstruc.h:498
Definition: iotypes.h:189
WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH/sizeof(WCHAR)]
Definition: iotypes.h:198
USHORT VolumeLabelLength
Definition: iotypes.h:193
ULONG SerialNumber
Definition: iotypes.h:196
struct _DEVICE_OBJECT * RealDevice
Definition: iotypes.h:195
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
static int Link(const char **args)
Definition: vfdcmd.c:2414

◆ _Success_() [2/2]

_Success_ ( return!  = FALSE)

Definition at line 279 of file mapping.c.

289{
291 PENGSECTION pSection;
292
293 /* Check parameter */
294 if (cjSize == 0) return NULL;
295
296 /* Allocate a section object */
297 pSection = EngCreateSectionHack(fl, cjSize, ulTag);
298 if (!pSection)
299 {
300 *ppvSection = NULL;
301 return NULL;
302 }
303
304 /* Map the section in session space */
306 &pSection->pvMappedBase,
307 &pSection->cjViewSize);
308 if (!NT_SUCCESS(Status))
309 {
310 DPRINT1("Failed to map a section Status=0x%x\n", Status);
311 *ppvSection = NULL;
312 EngFreeSectionMem(pSection, NULL);
313 return NULL;
314 }
315
316 if (fl & FL_ZERO_MEMORY)
317 {
319 }
320
321 /* Set section pointer and return base address */
322 *ppvSection = pSection;
323 return pSection->pvMappedBase;
324}
NTSTATUS NTAPI MmMapViewInSessionSpace(IN PVOID Section, OUT PVOID *MappedBase, IN OUT PSIZE_T ViewSize)
Definition: section.c:2687
#define DPRINT1
Definition: precomp.h:8
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
PVOID pvSectionObject
Definition: mapping.h:4
PVOID pvMappedBase
Definition: mapping.h:5
SIZE_T cjViewSize
Definition: mapping.h:6
PVOID NTAPI EngCreateSectionHack(_In_ ULONG fl, _In_ SIZE_T cjSize, _In_ ULONG ulTag)
Definition: mapping.c:132
BOOL APIENTRY EngFreeSectionMem(_In_opt_ PVOID pvSection, _In_opt_ PVOID pvMappedBase)
Definition: mapping.c:246
_In_ FLONG fl
Definition: winddi.h:1279
_In_ ULONG _In_ ULONG ulTag
Definition: winddi.h:3942
_In_ ULONG cjSize
Definition: winddi.h:3634

◆ _When_()

_When_ ( )
pure virtual

◆ DbgBreakPoint()

VOID NTAPI DbgBreakPoint ( VOID  )

◆ DbgCommandString()

VOID NTAPI DbgCommandString ( _In_ PCCH  Name,
_In_ PCCH  Command 
)

◆ DbgLoadImageSymbols()

VOID NTAPI DbgLoadImageSymbols ( _In_ PSTRING  Name,
_In_ PVOID  Base,
_In_ ULONG_PTR  ProcessId 
)

◆ DbgPrint()

ULONG __cdecl DbgPrint ( _In_z_ _Printf_format_string_ PCSTR  Format,
  ... 
)

◆ DbgPrintEx()

◆ DbgPrompt()

NTSYSAPI ULONG NTAPI DbgPrompt ( _In_z_ PCCH  Prompt,
_Out_writes_bytes_(MaximumResponseLength) PCH  Response,
_In_ ULONG  MaximumResponseLength 
)

◆ DbgUnLoadImageSymbols()

VOID NTAPI DbgUnLoadImageSymbols ( _In_ PSTRING  Name,
_In_ PVOID  Base,
_In_ ULONG_PTR  ProcessId 
)

◆ InterlockedPushListSList()

PSLIST_ENTRY FASTCALL InterlockedPushListSList ( _Inout_ PSLIST_HEADER  ListHead,
_Inout_ __drv_aliasesMem PSLIST_ENTRY  List,
_Inout_ PSLIST_ENTRY  ListEnd,
_In_ ULONG  Count 
)

◆ LdrRelocateImageWithBias()

ULONG NTAPI LdrRelocateImageWithBias ( _In_ PVOID  BaseAddress,
_In_ LONGLONG  AdditionalBias,
_In_opt_ PCSTR  LoaderName,
_In_ ULONG  Success,
_In_ ULONG  Conflict,
_In_ ULONG  Invalid 
)

Definition at line 474 of file image.c.

481{
482 PIMAGE_NT_HEADERS NtHeaders;
483 PIMAGE_DATA_DIRECTORY RelocationDDir;
484 PIMAGE_BASE_RELOCATION RelocationDir, RelocationEnd;
485 ULONG Count;
487 PUSHORT TypeOffset;
489
490 UNREFERENCED_PARAMETER(LoaderName);
491
492 NtHeaders = RtlImageNtHeader(BaseAddress);
493
494 if (NtHeaders == NULL)
495 return Invalid;
496
498 {
499 return Conflict;
500 }
501
503
504 if (SWAPD(RelocationDDir->VirtualAddress) == 0 || SWAPD(RelocationDDir->Size) == 0)
505 {
506 return Success;
507 }
508
509 Delta = (ULONG_PTR)BaseAddress - SWAPD(NtHeaders->OptionalHeader.ImageBase) + AdditionalBias;
510 RelocationDir = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)BaseAddress + SWAPD(RelocationDDir->VirtualAddress));
511 RelocationEnd = (PIMAGE_BASE_RELOCATION)((ULONG_PTR)RelocationDir + SWAPD(RelocationDDir->Size));
512
513 while (RelocationDir < RelocationEnd &&
514 SWAPW(RelocationDir->SizeOfBlock) > 0)
515 {
516 Count = (SWAPW(RelocationDir->SizeOfBlock) - sizeof(IMAGE_BASE_RELOCATION)) / sizeof(USHORT);
518 TypeOffset = (PUSHORT)(RelocationDir + 1);
519
521 Count,
522 TypeOffset,
523 Delta);
524
525 if (RelocationDir == NULL)
526 {
527 DPRINT1("Error during call to LdrProcessRelocationBlockLongLong()!\n");
528 return Invalid;
529 }
530 }
531
532 return Success;
533}
@ Invalid
Definition: asmpp.cpp:30
#define SWAPD(x)
Definition: bytesex.h:7
#define SWAPW(x)
Definition: bytesex.h:8
#define RtlImageNtHeader
Definition: compat.h:806
#define ULONG_PTR
Definition: config.h:101
@ Success
Definition: eventcreate.c:712
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
int Count
Definition: noreturn.cpp:7
struct _IMAGE_BASE_RELOCATION * PIMAGE_BASE_RELOCATION
struct _IMAGE_BASE_RELOCATION IMAGE_BASE_RELOCATION
#define IMAGE_DIRECTORY_ENTRY_BASERELOC
Definition: pedump.c:264
unsigned short USHORT
Definition: pedump.c:61
#define IMAGE_FILE_RELOCS_STRIPPED
Definition: pedump.c:159
static WCHAR Address[46]
Definition: ping.c:68
#define RVA(m, b)
Definition: image.c:20
PIMAGE_BASE_RELOCATION NTAPI LdrProcessRelocationBlockLongLong(IN ULONG_PTR Address, IN ULONG Count, IN PUSHORT TypeOffset, IN LONGLONG Delta)
Definition: image.c:392
IMAGE_OPTIONAL_HEADER32 OptionalHeader
Definition: ntddk_ex.h:184
IMAGE_FILE_HEADER FileHeader
Definition: ntddk_ex.h:183
IMAGE_DATA_DIRECTORY DataDirectory[IMAGE_NUMBEROF_DIRECTORY_ENTRIES]
Definition: ntddk_ex.h:178
int64_t LONGLONG
Definition: typedefs.h:68
uint16_t * PUSHORT
Definition: typedefs.h:56
uint32_t ULONG_PTR
Definition: typedefs.h:65
static ULONG Delta
Definition: xboxvideo.c:33

Referenced by LdrpInitializeProcess(), LdrpMapDll(), LdrRelocateImage(), MiReloadBootLoadedDrivers(), MmLoadSystemImage(), and PeLdrLoadImageEx().

◆ RtlAcquirePebLock()

NTSYSAPI VOID NTAPI RtlAcquirePebLock ( VOID  )

Definition at line 74 of file libsupp.c.

75{
78}
#define NtCurrentPeb()
Definition: FLS.c:22
PPEB Peb
Definition: dllmain.c:27
NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
PVOID FastPebLock
Definition: ntddk_ex.h:250

◆ RtlAcquirePrivilege()

◆ RtlAcquireResourceExclusive()

◆ RtlAcquireResourceShared()

◆ RtlAddAccessAllowedObjectAce()

NTSYSAPI NTSTATUS NTAPI RtlAddAccessAllowedObjectAce ( _Inout_ PACL  pAcl,
_In_ ULONG  dwAceRevision,
_In_ ULONG  AceFlags,
_In_ ACCESS_MASK  AccessMask,
_In_opt_ GUID ObjectTypeGuid,
_In_opt_ GUID InheritedObjectTypeGuid,
_In_ PSID  pSid 
)

◆ RtlAddAccessDeniedAce()

NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedAce ( _Inout_ PACL  Acl,
_In_ ULONG  Revision,
_In_ ACCESS_MASK  AccessMask,
_In_ PSID  Sid 
)

◆ RtlAddAccessDeniedAceEx()

NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedAceEx ( _Inout_ PACL  Acl,
_In_ ULONG  Revision,
_In_ ULONG  Flags,
_In_ ACCESS_MASK  AccessMask,
_In_ PSID  Sid 
)

Referenced by AddAccessDeniedAceEx().

◆ RtlAddAccessDeniedObjectAce()

NTSYSAPI NTSTATUS NTAPI RtlAddAccessDeniedObjectAce ( _Inout_ PACL  pAcl,
_In_ ULONG  dwAceRevision,
_In_ ULONG  AceFlags,
_In_ ACCESS_MASK  AccessMask,
_In_opt_ GUID ObjectTypeGuid,
_In_opt_ GUID InheritedObjectTypeGuid,
_In_ PSID  pSid 
)

◆ RtlAddAce()

NTSYSAPI NTSTATUS NTAPI RtlAddAce ( _Inout_ PACL  Acl,
_In_ ULONG  AceRevision,
_In_ ULONG  StartingAceIndex,
_In_reads_bytes_(AceListLength) PVOID  AceList,
_In_ ULONG  AceListLength 
)

◆ RtlAddAtomToAtomTable()

◆ RtlAddAuditAccessAce()

◆ RtlAddAuditAccessAceEx()

NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessAceEx ( _Inout_ PACL  Acl,
_In_ ULONG  Revision,
_In_ ULONG  Flags,
_In_ ACCESS_MASK  AccessMask,
_In_ PSID  Sid,
_In_ BOOLEAN  Success,
_In_ BOOLEAN  Failure 
)

Referenced by AddAuditAccessAceEx().

◆ RtlAddAuditAccessObjectAce()

NTSYSAPI NTSTATUS NTAPI RtlAddAuditAccessObjectAce ( _Inout_ PACL  Acl,
_In_ ULONG  Revision,
_In_ ULONG  Flags,
_In_ ACCESS_MASK  AccessMask,
_In_opt_ GUID ObjectTypeGuid,
_In_opt_ GUID InheritedObjectTypeGuid,
_In_ PSID  Sid,
_In_ BOOLEAN  Success,
_In_ BOOLEAN  Failure 
)

Referenced by AddAuditAccessObjectAce().

◆ RtlAddMandatoryAce()

NTSYSAPI NTSTATUS NTAPI RtlAddMandatoryAce ( _Inout_ PACL  Acl,
_In_ ULONG  Revision,
_In_ ULONG  Flags,
_In_ ULONG  MandatoryFlags,
_In_ UCHAR  AceType,
_In_ PSID  LabelSid 
)

◆ RtlAddRange()

◆ RtlAdjustPrivilege()

◆ RtlAllocateAndInitializeSid()

_Must_inspect_result_ NTSYSAPI NTSTATUS NTAPI RtlAllocateAndInitializeSid ( _In_ PSID_IDENTIFIER_AUTHORITY  IdentifierAuthority,
_In_ UCHAR  SubAuthorityCount,
_In_ ULONG  SubAuthority0,
_In_ ULONG  SubAuthority1,
_In_ ULONG  SubAuthority2,
_In_ ULONG  SubAuthority3,
_In_ ULONG  SubAuthority4,
_In_ ULONG  SubAuthority5,
_In_ ULONG  SubAuthority6,
_In_ ULONG  SubAuthority7,
_Outptr_ PSID Sid 
)

◆ RtlAllocateHandle()

◆ RtlAnsiStringToUnicodeString()

NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString ( PUNICODE_STRING  DestinationString,
PCANSI_STRING  SourceString,
BOOLEAN  AllocateDestinationString 
)

◆ RtlAppendUnicodeStringToString()

NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString ( PUNICODE_STRING  Destination,
PCUNICODE_STRING  Source 
)

◆ RtlAppendUnicodeToString()

NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeToString ( PUNICODE_STRING  Destination,
PCWSTR  Source 
)

◆ RtlAreAllAccessesGranted()

◆ RtlAreAnyAccessesGranted()

NTSYSAPI BOOLEAN NTAPI RtlAreAnyAccessesGranted ( ACCESS_MASK  GrantedAccess,
ACCESS_MASK  DesiredAccess 
)

Referenced by AreAnyAccessesGranted().

◆ RtlCaptureContext()

◆ RtlCharToInteger()

NTSYSAPI NTSTATUS NTAPI RtlCharToInteger ( PCSZ  String,
ULONG  Base,
PULONG  Value 
)

Definition at line 261 of file unicode.c.

265{
266 CHAR chCurrent;
267 int digit;
268 ULONG RunningTotal = 0;
269 char bMinus = 0;
270
271 /* skip leading whitespaces */
272 while (*str != '\0' && *str <= ' ') str++;
273
274 /* Check for +/- */
275 if (*str == '+')
276 {
277 str++;
278 }
279 else if (*str == '-')
280 {
281 bMinus = 1;
282 str++;
283 }
284
285 /* base = 0 means autobase */
286 if (base == 0)
287 {
288 base = 10;
289
290 if (str[0] == '0')
291 {
292 if (str[1] == 'b')
293 {
294 str += 2;
295 base = 2;
296 }
297 else if (str[1] == 'o')
298 {
299 str += 2;
300 base = 8;
301 }
302 else if (str[1] == 'x')
303 {
304 str += 2;
305 base = 16;
306 }
307 }
308 }
309 else if (base != 2 && base != 8 && base != 10 && base != 16)
310 {
312 }
313
314 if (value == NULL) return STATUS_ACCESS_VIOLATION;
315
316 while (*str != '\0')
317 {
318 chCurrent = *str;
319
320 if (chCurrent >= '0' && chCurrent <= '9')
321 {
322 digit = chCurrent - '0';
323 }
324 else if (chCurrent >= 'A' && chCurrent <= 'Z')
325 {
326 digit = chCurrent - 'A' + 10;
327 }
328 else if (chCurrent >= 'a' && chCurrent <= 'z')
329 {
330 digit = chCurrent - 'a' + 10;
331 }
332 else
333 {
334 digit = -1;
335 }
336
337 if (digit < 0 || digit >= (int)base) break;
338
339 RunningTotal = RunningTotal * base + digit;
340 str++;
341 }
342
343 *value = bMinus ? (0 - RunningTotal) : RunningTotal;
344 return STATUS_SUCCESS;
345}
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
const WCHAR * str
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: pdh_main.c:94
char CHAR
Definition: xmlstorage.h:175

◆ RtlCompareUnicodeString()

NTSYSAPI LONG NTAPI RtlCompareUnicodeString ( PCUNICODE_STRING  String1,
PCUNICODE_STRING  String2,
BOOLEAN  CaseInsensitive 
)

Definition at line 31 of file string_lib.cpp.

36{
37 ULONG i;
38
39 if(s1->Length != s2->Length) return (-1);
40 i = memcmp(s1->Buffer, s2->Buffer, (s1->Length) ? (s1->Length) : (s2->Length));
41 return i;
42}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
struct S1 s1
struct S2 s2

◆ RtlCompareUnicodeStrings()

_Must_inspect_result_ NTSYSAPI LONG NTAPI RtlCompareUnicodeStrings ( _In_reads_(String1Length) PCWCH  String1,
_In_ SIZE_T  String1Length,
_In_reads_(String2Length) PCWCH  String2,
_In_ SIZE_T  String2Length,
_In_ BOOLEAN  CaseInSensitive 
)

Referenced by is_matching_string().

◆ RtlCompressBuffer()

NTSYSAPI NTSTATUS NTAPI RtlCompressBuffer ( _In_ USHORT  CompressionFormatAndEngine,
_In_reads_bytes_(UncompressedBufferSize) PUCHAR  UncompressedBuffer,
_In_ ULONG  UncompressedBufferSize,
_Out_writes_bytes_to_(CompressedBufferSize, *FinalCompressedSize) PUCHAR  CompressedBuffer,
_In_ ULONG  CompressedBufferSize,
_In_ ULONG  UncompressedChunkSize,
_Out_ PULONG  FinalCompressedSize,
_In_ PVOID  WorkSpace 
)

◆ RtlComputeCrc32()

NTSYSAPI ULONG NTAPI RtlComputeCrc32 ( _In_ ULONG  InitialCrc,
_In_ const UCHAR Buffer,
_In_ ULONG  Length 
)

Definition at line 89 of file crc32.c.

92{
93 ULONG CrcValue = ~Initial;
94
95 DPRINT("(%u,%p,%u)\n", Initial, Data, Length);
96
97 while (Length > 0)
98 {
99 CrcValue = CrcTable[(CrcValue ^ *Data) & 0xff] ^ (CrcValue >> 8);
100 Data++;
101 Length--;
102 }
103 return ~CrcValue;
104}
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
static const ULONG CrcTable[256]
Definition: crc32.c:26
#define DPRINT
Definition: sndvol32.h:73

◆ RtlComputePrivatizedDllName_U()

NTSYSAPI NTSTATUS NTAPI RtlComputePrivatizedDllName_U ( _In_ PUNICODE_STRING  DllName,
_Inout_ PUNICODE_STRING  RealName,
_Inout_ PUNICODE_STRING  LocalName 
)

Definition at line 586 of file path.c.

590{
591 static const UNICODE_STRING ExtensionChar = RTL_CONSTANT_STRING(L".");
592
594 UNICODE_STRING ImagePathName, DllNameOnly, CopyRealName, CopyLocalName;
595 BOOLEAN HasExtension;
598 C_ASSERT(sizeof(UNICODE_NULL) == sizeof(WCHAR));
599
600 CopyRealName = *RealName;
601 CopyLocalName = *LocalName;
602
603
604 /* Get the image path */
606
607 /* Check if it's not normalized */
608 if (!(RtlGetCurrentPeb()->ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED))
609 {
610 /* Normalize it */
611 ImagePathName.Buffer = (PWSTR)((ULONG_PTR)ImagePathName.Buffer + (ULONG_PTR)RtlGetCurrentPeb()->ProcessParameters);
612 }
613
614
616 DllName, &RtlpPathDividers, &Position)))
617 {
618 DllNameOnly = *DllName;
619 }
620 else
621 {
622 /* Just keep the dll name, ignore path components */
623 Position += sizeof(WCHAR);
624 DllNameOnly.Buffer = DllName->Buffer + Position / sizeof(WCHAR);
625 DllNameOnly.Length = DllName->Length - Position;
626 DllNameOnly.MaximumLength = DllName->MaximumLength - Position;
627 }
628
630 &DllNameOnly, &ExtensionChar, &Position)))
631 {
632 Position = 0;
633 }
634
635 HasExtension = Position > 1;
636
637 /* First we create the c:\path\processname.exe.Local\something.dll path */
638 RequiredSize = ImagePathName.Length + RtlpDotLocal.Length + DllNameOnly.Length +
639 (HasExtension ? 0 : RtlpDefaultExtension.Length) + sizeof(UNICODE_NULL);
640
641 /* This is not going to work out */
644
645 /* We need something extra */
646 if (RequiredSize > CopyLocalName.MaximumLength)
647 {
649 if (CopyLocalName.Buffer == NULL)
650 return STATUS_NO_MEMORY;
651 CopyLocalName.MaximumLength = RequiredSize;
652 }
653 /* Now build the entire path */
654 CopyLocalName.Length = 0;
655 Status = RtlAppendUnicodeStringToString(&CopyLocalName, &ImagePathName);
657 if (NT_SUCCESS(Status))
658 {
661 }
662 if (NT_SUCCESS(Status))
663 {
664 Status = RtlAppendUnicodeStringToString(&CopyLocalName, &DllNameOnly);
666 }
667 /* Do we need to append an extension? */
668 if (NT_SUCCESS(Status) && !HasExtension)
669 {
672 }
673
674 if (NT_SUCCESS(Status))
675 {
676 /* then we create the c:\path\something.dll path */
678 &ImagePathName, &RtlpPathDividers, &Position)))
679 {
680 ImagePathName.Length = Position + sizeof(WCHAR);
681 }
682
683 RequiredSize = ImagePathName.Length + DllNameOnly.Length +
684 (HasExtension ? 0 : RtlpDefaultExtension.Length) + sizeof(UNICODE_NULL);
685
687 {
689 }
690 else
691 {
692 if (RequiredSize > CopyRealName.MaximumLength)
693 {
695 if (CopyRealName.Buffer == NULL)
697 CopyRealName.MaximumLength = RequiredSize;
698 }
699 CopyRealName.Length = 0;
700 if (NT_SUCCESS(Status))
701 {
702 Status = RtlAppendUnicodeStringToString(&CopyRealName, &ImagePathName);
704 }
705 if (NT_SUCCESS(Status))
706 {
707 Status = RtlAppendUnicodeStringToString(&CopyRealName, &DllNameOnly);
709 }
710 if (NT_SUCCESS(Status) && !HasExtension)
711 {
714 }
715 }
716 }
717
718 if (!NT_SUCCESS(Status))
719 {
720 if (CopyRealName.Buffer && CopyRealName.Buffer != RealName->Buffer)
721 RtlpFreeStringMemory(CopyRealName.Buffer, TAG_USTR);
722 if (CopyLocalName.Buffer && CopyLocalName.Buffer != LocalName->Buffer)
723 RtlpFreeStringMemory(CopyLocalName.Buffer, TAG_USTR);
724 return Status;
725 }
726
727 *RealName = CopyRealName;
728 *LocalName = CopyLocalName;
729 return STATUS_SUCCESS;
730}
#define STATUS_NO_MEMORY
Definition: d3dkmdt.h:51
#define TAG_USTR
Definition: libsupp.c:997
#define RtlpAllocateStringMemory(Bytes, Tag)
Definition: libsupp.c:1000
NTSYSAPI PEB *WINAPI RtlGetCurrentPeb(void)
Definition: libsupp.c:65
#define C_ASSERT(e)
Definition: intsafe.h:73
#define ASSERT(a)
Definition: mode.c:44
#define RTL_USER_PROCESS_PARAMETERS_NORMALIZED
Definition: rtltypes.h:41
NTSYSAPI NTSTATUS NTAPI RtlAppendUnicodeStringToString(PUNICODE_STRING Destination, PUNICODE_STRING Source)
#define UNICODE_NULL
#define UNICODE_STRING_MAX_BYTES
#define RTL_FIND_CHAR_IN_UNICODE_STRING_START_AT_END
Definition: rtl.h:25
NTSTATUS NTAPI RtlFindCharInUnicodeString(_In_ ULONG Flags, _In_ PCUNICODE_STRING SearchString, _In_ PCUNICODE_STRING MatchString, _Out_ PUSHORT Position)
#define STATUS_NAME_TOO_LONG
Definition: ntstatus.h:498
#define L(x)
Definition: ntvdm.h:50
#define RtlpFreeStringMemory
Definition: rtlp.h:156
static const UNICODE_STRING RtlpDotLocal
Definition: path.c:51
static const UNICODE_STRING RtlpPathDividers
Definition: path.c:52
static const UNICODE_STRING RtlpDefaultExtension
Definition: path.c:50
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
Definition: btrfs_drv.h:1913
UNICODE_STRING ImagePathName
Definition: btrfs_drv.h:1901
USHORT MaximumLength
Definition: env_spec_w32.h:370
static COORD Position
Definition: mouse.c:34
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14
uint16_t * PWSTR
Definition: typedefs.h:56
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ ULONG _Out_ PVOID _Out_ PULONG RequiredSize
Definition: wdfdevice.h:4439
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by RtlDosApplyFileIsolationRedirection_Ustr(), test_allocations(), and test_dllnames().

◆ RtlConvertExclusiveToShared()

NTSYSAPI VOID NTAPI RtlConvertExclusiveToShared ( _In_ PRTL_RESOURCE  Resource)

◆ RtlConvertSharedToExclusive()

NTSYSAPI VOID NTAPI RtlConvertSharedToExclusive ( _In_ PRTL_RESOURCE  Resource)

◆ RtlCopyLuidAndAttributesArray()

NTSYSAPI VOID NTAPI RtlCopyLuidAndAttributesArray ( ULONG  Count,
PLUID_AND_ATTRIBUTES  Src,
PLUID_AND_ATTRIBUTES  Dest 
)

Definition at line 33 of file luid.c.

36{
37 ULONG i;
38
40
41 for (i = 0; i < Count; i++)
42 {
43 RtlCopyMemory(&Dest[i],
44 &Src[i],
45 sizeof(LUID_AND_ATTRIBUTES));
46 }
47}
#define PAGED_CODE_RTL()
Definition: rtlp.h:16
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263

Referenced by LsarAddPrivilegesToAccount(), LsarRemovePrivilegesFromAccount(), NtQueryInformationToken(), and SeQueryInformationToken().

◆ RtlCopyRangeList()

NTSYSAPI NTSTATUS NTAPI RtlCopyRangeList ( _Out_ PRTL_RANGE_LIST  CopyRangeList,
_In_ PRTL_RANGE_LIST  RangeList 
)

◆ RtlCopySecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlCopySecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  pSourceSecurityDescriptor,
_Out_ PSECURITY_DESCRIPTOR pDestinationSecurityDescriptor 
)

◆ RtlCopySidAndAttributesArray()

NTSYSAPI NTSTATUS NTAPI RtlCopySidAndAttributesArray ( _In_ ULONG  Count,
_In_ PSID_AND_ATTRIBUTES  Src,
_In_ ULONG  SidAreaSize,
_In_ PSID_AND_ATTRIBUTES  Dest,
_In_ PSID  SidArea,
_Out_ PSID RemainingSidArea,
_Out_ PULONG  RemainingSidAreaSize 
)

◆ RtlCopyString()

NTSYSAPI VOID NTAPI RtlCopyString ( _Out_ PSTRING  DestinationString,
_In_opt_ const STRING SourceString 
)

◆ RtlCopyUnicodeString()

NTSYSAPI VOID NTAPI RtlCopyUnicodeString ( PUNICODE_STRING  DestinationString,
PCUNICODE_STRING  SourceString 
)

◆ RtlCreateAcl()

◆ RtlCreateAtomTable()

◆ RtlCreateEnvironment()

NTSYSAPI NTSTATUS NTAPI RtlCreateEnvironment ( _In_ BOOLEAN  Inherit,
_Out_ PWSTR Environment 
)

◆ RtlCreateProcessParameters()

NTSYSAPI NTSTATUS NTAPI RtlCreateProcessParameters ( _Out_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters,
_In_ PUNICODE_STRING  ImagePathName,
_In_opt_ PUNICODE_STRING  DllPath,
_In_opt_ PUNICODE_STRING  CurrentDirectory,
_In_opt_ PUNICODE_STRING  CommandLine,
_In_opt_ PWSTR  Environment,
_In_opt_ PUNICODE_STRING  WindowTitle,
_In_opt_ PUNICODE_STRING  DesktopInfo,
_In_opt_ PUNICODE_STRING  ShellInfo,
_In_opt_ PUNICODE_STRING  RuntimeInfo 
)

◆ RtlCreateQueryDebugBuffer()

NTSYSAPI PRTL_DEBUG_INFORMATION NTAPI RtlCreateQueryDebugBuffer ( _In_ ULONG  Size,
_In_ BOOLEAN  EventPair 
)

Definition at line 66 of file dbgbuffer.c.

68{
72 SIZE_T CommitSize = sizeof(*Buf);
73
74 /* Reserve the memory */
76 if (!NT_SUCCESS(Status))
77 return NULL;
78
79 /* Commit the first data, CommitSize is updated with the actual committed data */
81 if (!NT_SUCCESS(Status))
82 {
84 return NULL;
85 }
86
87 /* Fill out the minimum data required */
88 Buf->ViewBaseClient = Buf;
91 Buf->OffsetFree = sizeof(*Buf);
92
93 return Buf;
94}
NTSTATUS NTAPI RtlDestroyQueryDebugBuffer(_In_ PRTL_DEBUG_INFORMATION Buf)
Definition: dbgbuffer.c:101
#define PAGE_SIZE
Definition: env_spec_w32.h:49
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:323
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID _In_ ULONG_PTR _In_ SIZE_T CommitSize
Definition: mmfuncs.h:406
#define PAGE_READWRITE
Definition: nt_native.h:1304
#define NtCurrentProcess()
Definition: nt_native.h:1657
#define MEM_RESERVE
Definition: nt_native.h:1314
#define MEM_COMMIT
Definition: nt_native.h:1313
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:4492
ULONG_PTR SIZE_T
Definition: typedefs.h:80
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Referenced by Heap32First(), Heap32Next(), START_TEST(), Test_Buffersizes(), Test_ProcessModules(), and TH32CreateSnapshot().

◆ RtlCreateRegistryKey()

NTSYSAPI NTSTATUS NTAPI RtlCreateRegistryKey ( _In_ ULONG  RelativeTo,
_In_ PWSTR  Path 
)

Referenced by DriverEntry().

◆ RtlCreateSecurityDescriptor()

◆ RtlCreateSecurityDescriptorRelative()

◆ RtlCreateTimer()

NTSYSAPI NTSTATUS NTAPI RtlCreateTimer ( _In_ HANDLE  TimerQueue,
_In_ PHANDLE  phNewTimer,
_In_ WAITORTIMERCALLBACKFUNC  Callback,
_In_ PVOID  Parameter,
_In_ ULONG  DueTime,
_In_ ULONG  Period,
_In_ ULONG  Flags 
)

◆ RtlCreateTimerQueue()

NTSYSAPI NTSTATUS NTAPI RtlCreateTimerQueue ( PHANDLE  TimerQueue)

Definition at line 285 of file timerqueue.c.

286{
288 struct timer_queue *q = RtlAllocateHeap(RtlGetProcessHeap(), 0, sizeof *q);
289 if (!q)
290 return STATUS_NO_MEMORY;
291
293 list_init(&q->timers);
294 q->quit = FALSE;
295 q->magic = TIMER_QUEUE_MAGIC;
297 if (status != STATUS_SUCCESS)
298 {
299 RtlFreeHeap(RtlGetProcessHeap(), 0, q);
300 return status;
301 }
303 if (status != STATUS_SUCCESS)
304 {
305 NtClose(q->event);
306 RtlFreeHeap(RtlGetProcessHeap(), 0, q);
307 return status;
308 }
309
310 NtResumeThread(q->thread, NULL);
311 *NewTimerQueue = q;
312 return STATUS_SUCCESS;
313}
static void list_init(struct list_entry *head)
Definition: list.h:51
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:590
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:608
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
#define EVENT_ALL_ACCESS
Definition: isotest.c:82
NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
Definition: obhandle.c:3402
@ SynchronizationEvent
NTSTATUS NTAPI NtCreateEvent(OUT PHANDLE EventHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN EVENT_TYPE EventType, IN BOOLEAN InitialState)
Definition: event.c:96
NTSTATUS NTAPI NtResumeThread(IN HANDLE ThreadHandle, OUT PULONG SuspendCount OPTIONAL)
Definition: state.c:290
static DWORD WINAPI timer_queue_thread_proc(LPVOID p)
Definition: timerqueue.c:215
#define TIMER_QUEUE_MAGIC
Definition: timerqueue.c:65
PRTL_START_POOL_THREAD RtlpStartThreadFunc
Definition: workitem.c:45

Referenced by BasepCreateDefaultTimerQueue(), CreateTimerQueue(), and get_timer_queue().

◆ RtlCreateUnicodeString()

NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeString ( PUNICODE_STRING  DestinationString,
PCWSTR  SourceString 
)

◆ RtlCreateUnicodeStringFromAsciiz()

NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz ( _Out_ PUNICODE_STRING  Destination,
_In_ PCSZ  Source 
)

Referenced by AccessCheckAndAuditAlarmA(), AddDelBackupEntryA(), AddDesktopItemA(), AddItemA(), AdvInstallFileA(), AppendMenuA(), AsciiToUnicode(), BeginUpdateResourceA(), BuildCommDCBAndTimeoutsA(), capCreateCaptureWindowA(), ChangeDisplaySettingsExA(), CmpSetSystemValues(), CopyMetaFileA(), CopyProfileDirectoryA(), CreateDesktopA(), CreateGroupA(), CreateWindowStationA(), DecryptFileA(), DeleteDesktopItemA(), DeleteGroupA(), DeleteItemA(), DeleteProfileA(), DelNodeA(), DelNodeRunDLL32A(), DoInfInstall(), EncryptFileA(), EnumDisplayDevicesA(), EnumDisplaySettingsExA(), ExecuteCabA(), ExpInitializeExecutive(), FD31_MapOfnStructA(), FileEncryptionStatusA(), FileSaveRestoreA(), FileSaveRestoreOnINFA(), get_res_nameA(), GetClassInfoExA(), GetDefaultCommConfigA(), GetFileSecurityA(), GetFileTitleA(), GetFileVersionInfoExA(), GetFileVersionInfoSizeExA(), GetPrinterDriverDirectoryA(), GetPrivateProfileIntA(), GetPrivateProfileSectionA(), GetPrivateProfileSectionNamesA(), GetPrivateProfileStringA(), GetPrivateProfileStructA(), GetPropA(), GetVersionFromFileExA(), HandleDumpAttributes(), init_funcs(), InitFunctionPtrs(), InsertMenuA(), InsertMenuItemA(), InstallHinfSectionA(), LaunchINFSectionA(), LaunchINFSectionExA(), LogonUserExA(), LookupAccountNameA(), LookupPrivilegeDisplayNameA(), LookupPrivilegeNameA(), LookupPrivilegeValueA(), MapFile(), MCIWndCreateA(), MCIWndProc(), MessageBoxIndirectA(), MessageBoxTimeoutA(), ModifyMenuA(), MsgiAnsiToUnicodeMessage(), ObjectCloseAuditAlarmA(), ObjectDeleteAuditAlarmA(), ObjectOpenAuditAlarmA(), ObjectPrivilegeAuditAlarmA(), OpenDesktopA(), OpenINFEngineA(), OpenWindowStationA(), PathCreateFromUrlA(), PlaySound_AllocAndGetMMIO(), PrivilegedServiceAuditAlarmA(), RealSystemParametersInfoA(), RebootCheckOnInstallA(), RegConnectRegistryA(), RegCopyTreeA(), RegCreateKeyExA(), RegDeleteKeyExA(), RegDeleteKeyValueA(), RegDeleteTreeA(), RegDeleteValueA(), RegInstallA(), RegisterClipboardFormatA(), RegisterOCX(), RegisterWindowMessageA(), RegLoadKeyA(), RegLoadMUIStringA(), RegOpenKeyExA(), RegQueryValueExA(), RegReplaceKeyA(), RegRestoreAllA(), RegRestoreKeyA(), RegSaveKeyA(), RegSaveKeyExA(), RegSaveRestoreA(), RegSaveRestoreOnINFA(), RegSetKeyValueA(), RegSetValueExA(), RegUnLoadKeyA(), RemovePropA(), ROpenSCManagerA(), ROpenServiceA(), RosSymCreateFromFile(), RosSymCreateFromMem(), RpcNetworkIsProtseqValidA(), RunSetupCommandA(), SCardAddReaderToGroupA(), SECUR32_findPackageA(), SeiFindHookModuleInfoForImportDescriptor(), SetClassLongA(), SetComputerNameExA(), SetFileSecurityA(), SetMenuItemInfoA(), SetNamedSecurityInfoA(), SetPropA(), SetupFindFirstLineA(), SetupFindNextMatchLineA(), SetupGetLineByIndexA(), SetupGetLineCountA(), SetupInstallFileA(), SetupInstallFilesFromInfSectionA(), SetupInstallFromInfSectionA(), SetupInstallServicesFromInfSectionExA(), SetupLdrLoadNlsData(), SetupOpenInfFileA(), SetupQueueCopySectionA(), SetupQueueDeleteSectionA(), SetupQueueRenameSectionA(), SetupSetDirectoryIdA(), StartServiceCtrlDispatcherA(), StopWatchA(), thunk_AcquireCredentialsHandleA(), thunk_AddCredentialsA(), thunk_ImportSecurityContextA(), thunk_InitializeSecurityContextA(), TranslateInfStringA(), TranslateInfStringExA(), TreeResetNamedSecurityInfoA(), UnregisterClassA(), UpdateResourceA(), UrlCreateFromPathA(), UrlEscapeA(), User32CreateWindowEx(), UserInstStubWrapperA(), UserUnInstStubWrapperA(), WritePrivateProfileSectionA(), WritePrivateProfileStringA(), and WritePrivateProfileStructA().

◆ RtlCreateUserProcess()

NTSYSAPI NTSTATUS NTAPI RtlCreateUserProcess ( _In_ PUNICODE_STRING  ImageFileName,
_In_ ULONG  Attributes,
_In_ PRTL_USER_PROCESS_PARAMETERS  ProcessParameters,
_In_opt_ PSECURITY_DESCRIPTOR  ProcessSecutityDescriptor,
_In_opt_ PSECURITY_DESCRIPTOR  ThreadSecurityDescriptor,
_In_opt_ HANDLE  ParentProcess,
_In_ BOOLEAN  CurrentDirectory,
_In_opt_ HANDLE  DebugPort,
_In_opt_ HANDLE  ExceptionPort,
_Out_ PRTL_USER_PROCESS_INFORMATION  ProcessInfo 
)

◆ RtlCreateUserThread()

◆ RtlCutoverTimeToSystemTime()

NTSYSAPI BOOLEAN NTAPI RtlCutoverTimeToSystemTime ( _In_ PTIME_FIELDS  CutoverTimeFields,
_Out_ PLARGE_INTEGER  SystemTime,
_In_ PLARGE_INTEGER  CurrentTime,
_In_ BOOLEAN  ThisYearsCutoverOnly 
)

Referenced by ExpGetTimeZoneId().

◆ RtlDeleteAce()

NTSYSAPI NTSTATUS NTAPI RtlDeleteAce ( PACL  Acl,
ULONG  AceIndex 
)

Referenced by DeleteAce(), and START_TEST().

◆ RtlDeleteAtomFromAtomTable()

◆ RtlDeleteCriticalSection()

◆ RtlDeleteOwnersRanges()

NTSYSAPI NTSTATUS NTAPI RtlDeleteOwnersRanges ( _Inout_ PRTL_RANGE_LIST  RangeList,
_In_ _Maybenull_ PVOID  Owner 
)

◆ RtlDeleteRange()

NTSYSAPI NTSTATUS NTAPI RtlDeleteRange ( _Inout_ PRTL_RANGE_LIST  RangeList,
_In_ ULONGLONG  Start,
_In_ ULONGLONG  End,
_In_ PVOID  Owner 
)

◆ RtlDeleteResource()

◆ RtlDeleteSecurityObject()

NTSYSAPI NTSTATUS NTAPI RtlDeleteSecurityObject ( _In_ PSECURITY_DESCRIPTOR ObjectDescriptor)

◆ RtlDeleteTimer()

NTSYSAPI NTSTATUS NTAPI RtlDeleteTimer ( _In_ HANDLE  TimerQueue,
_In_ HANDLE  Timer,
_In_ HANDLE  CompletionEvent 
)

◆ RtlDeleteTimerQueue()

NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueue ( HANDLE  TimerQueue)

Definition at line 595 of file timerqueue.c.

596{
598}
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
NTSTATUS WINAPI RtlDeleteTimerQueueEx(HANDLE TimerQueue, HANDLE CompletionEvent)
Definition: timerqueue.c:331

◆ RtlDeleteTimerQueueEx()

NTSYSAPI NTSTATUS NTAPI RtlDeleteTimerQueueEx ( _In_ HANDLE  TimerQueue,
_In_opt_ HANDLE  CompletionEvent 
)

◆ RtlDeNormalizeProcessParams()

NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlDeNormalizeProcessParams ( _In_ PRTL_USER_PROCESS_PARAMETERS  ProcessParameters)

Referenced by ExpLoadInitialProcess().

◆ RtlDeregisterWait()

NTSYSAPI NTSTATUS NTAPI RtlDeregisterWait ( _In_ HANDLE  hWaitHandle)

Referenced by test_RtlRegisterWait().

◆ RtlDeregisterWaitEx()

NTSYSAPI NTSTATUS NTAPI RtlDeregisterWaitEx ( _In_ HANDLE  hWaitHandle,
_In_opt_ HANDLE  hCompletionEvent 
)

◆ RtlDestroyAtomTable()

NTSYSAPI NTSTATUS NTAPI RtlDestroyAtomTable ( IN PRTL_ATOM_TABLE  AtomTable)

Definition at line 203 of file atom.c.

205{
206 PRTL_ATOM_TABLE_ENTRY *CurrentBucket, *LastBucket;
207 PRTL_ATOM_TABLE_ENTRY CurrentEntry, NextEntry;
208
209 DPRINT("RtlDestroyAtomTable (AtomTable %p)\n", AtomTable);
210
211 if (!RtlpLockAtomTable(AtomTable))
212 {
214 }
215
216 /* delete all atoms */
217 LastBucket = AtomTable->Buckets + AtomTable->NumberOfBuckets;
218 for (CurrentBucket = AtomTable->Buckets;
219 CurrentBucket != LastBucket;
220 CurrentBucket++)
221 {
222 NextEntry = *CurrentBucket;
223 *CurrentBucket = NULL;
224
225 while (NextEntry != NULL)
226 {
227 CurrentEntry = NextEntry;
228 NextEntry = NextEntry->HashLink;
229
230 /* no need to delete the atom handle, the handles will all be freed
231 up when destroying the atom handle table! */
232
233 RtlpFreeAtomTableEntry(CurrentEntry);
234 }
235 }
236
238
239 RtlpUnlockAtomTable(AtomTable);
240
241 RtlpDestroyAtomTableLock(AtomTable);
242
243 RtlpFreeAtomTable(AtomTable);
244
245 return STATUS_SUCCESS;
246}
BOOLEAN RtlpLockAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:376
VOID RtlpFreeAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:417
VOID RtlpDestroyAtomHandleTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:403
VOID RtlpUnlockAtomTable(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:384
VOID RtlpDestroyAtomTableLock(PRTL_ATOM_TABLE AtomTable)
Definition: libsupp.c:369
VOID RtlpFreeAtomTableEntry(PRTL_ATOM_TABLE_ENTRY Entry)
Definition: libsupp.c:433
Definition: rtltypes.h:1672
struct _RTL_ATOM_TABLE_ENTRY * HashLink
Definition: rtltypes.h:1673

Referenced by IntWinStaObjectDelete(), and main().

◆ RtlDestroyEnvironment()

◆ RtlDestroyHandleTable()

NTSYSAPI VOID NTAPI RtlDestroyHandleTable ( _Inout_ PRTL_HANDLE_TABLE  HandleTable)

◆ RtlDestroyProcessParameters()

NTSYSAPI NTSTATUS NTAPI RtlDestroyProcessParameters ( _In_ PRTL_USER_PROCESS_PARAMETERS  ProcessParameters)

◆ RtlDestroyQueryDebugBuffer()

◆ RtlDetermineDosPathNameType_U()

◆ RtlDispatchException()

NTSYSAPI BOOLEAN NTAPI RtlDispatchException ( _In_ PEXCEPTION_RECORD  ExceptionRecord,
_In_ PCONTEXT  Context 
)

Definition at line 43 of file except.c.

46{
48
49 /* Perform vectored exception handling for user mode */
51 {
52 /* Exception handled, now call vectored continue handlers */
54
55 /* Continue execution */
56 return TRUE;
57 }
58
59 /* Call the internal unwind routine */
60 Handled = RtlpUnwindInternal(NULL, // TargetFrame
61 NULL, // TargetIp
62 ExceptionRecord,
63 0, // ReturnValue
65 NULL, // HistoryTable
67
68 /* In user mode, call any registered vectored continue handlers */
70
71 return Handled;
72}
_IRQL_requires_same_ _In_ PVOID _Inout_ struct _CONTEXT * ContextRecord
Definition: ntbasedef.h:662
VOID NTAPI RtlCallVectoredContinueHandlers(_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context)
Definition: libsupp.c:822
BOOLEAN NTAPI RtlCallVectoredExceptionHandlers(_In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PCONTEXT Context)
Definition: libsupp.c:813
@ UNW_FLAG_EHANDLER
Definition: rsym64.h:109
BOOLEAN NTAPI RtlpUnwindInternal(_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue, _In_ PCONTEXT ContextRecord, _In_opt_ struct _UNWIND_HISTORY_TABLE *HistoryTable, _In_ ULONG Flags)
Definition: unwind.c:665
_In_ BOOLEAN Handled
Definition: ketypes.h:349

Referenced by KiDispatchException(), KiUserExceptionDispatcher(), RtlRaiseException(), and RtlRaiseStatus().

◆ RtlDoesFileExists_U()

NTSYSAPI BOOLEAN NTAPI RtlDoesFileExists_U ( _In_ PCWSTR  FileName)

Referenced by START_TEST().

◆ RtlDosPathNameToNtPathName_U()

NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U ( _In_opt_z_ PCWSTR  DosPathName,
_Out_ PUNICODE_STRING  NtPathName,
_Out_opt_ PCWSTR NtFileNamePart,
_Out_opt_ PRTL_RELATIVE_NAME_U  DirectoryInfo 
)

◆ RtlDosPathNameToRelativeNtPathName_U()

◆ RtlDosSearchPath_U()

NTSYSAPI ULONG NTAPI RtlDosSearchPath_U ( _In_ PCWSTR  Path,
_In_ PCWSTR  FileName,
_In_ PCWSTR  Extension,
_In_ ULONG  BufferSize,
_Out_ PWSTR  Buffer,
_Out_ PWSTR PartName 
)

◆ RtlDosSearchPath_Ustr()

NTSYSAPI NTSTATUS NTAPI RtlDosSearchPath_Ustr ( _In_ ULONG  Flags,
_In_ PUNICODE_STRING  PathString,
_In_ PUNICODE_STRING  FileNameString,
_In_ PUNICODE_STRING  ExtensionString,
_In_ PUNICODE_STRING  CallerBuffer,
_Inout_opt_ PUNICODE_STRING  DynamicString,
_Out_opt_ PUNICODE_STRING FullNameOut,
_Out_opt_ PSIZE_T  FilePartSize,
_Out_opt_ PSIZE_T  LengthNeeded 
)

Referenced by SearchPathW(), and START_TEST().

◆ RtlDowncaseUnicodeChar()

NTSYSAPI WCHAR NTAPI RtlDowncaseUnicodeChar ( IN WCHAR  Source)

Definition at line 131 of file nls.c.

132{
134
136}
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
WCHAR NTAPI RtlpDowncaseUnicodeChar(IN WCHAR Source)
Definition: nls.c:89

◆ RtlDumpResource()

NTSYSAPI VOID NTAPI RtlDumpResource ( _In_ PRTL_RESOURCE  Resource)

◆ RtlEnterCriticalSection()

NTSYSAPI NTSTATUS NTAPI RtlEnterCriticalSection ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

Referenced by AddBSMRequest(), AllocConsole(), AttachConsole(), AVrfDllLoadNotification(), AVrfDllUnloadNotification(), BaseComputeProcessDllPath(), BasepIsProcessAllowed(), BasepReplaceProcessThreadTokens(), BaseSrvBSMThread(), BaseSrvCleanupVDMResources(), BaseSrvNLSInit(), ClearUserApiHook(), CloseDefaultKeys(), CON_API(), ConsoleControlDispatcher(), ConSrvFreeHandlesTable(), ConSrvGetObject(), ConSrvInheritHandlesTable(), ConSrvInitProcessHandles(), ConSrvRemoveObject(), CSR_API(), EndUserApiHook(), EngAcquireSemaphore(), FindClose(), FindNextFileW(), FindNextStreamW(), FreeConsole(), get_registry_locale_info(), GetConsoleInputExeNameW(), GetCurrentExeName(), GetDllDirectoryA(), GetDllDirectoryW(), GetPrivateProfileSectionNamesW(), GetPrivateProfileSectionW(), GetPrivateProfileStringW(), GetPrivateProfileStructW(), Imm32FindImeDpi(), Imm32GetImeMenuItemWInterProcess(), Imm32InitTLS(), Imm32InternalLockIMC(), Imm32LoadCtfIme(), Imm32LoadImeDpi(), Imm32ReleaseIME(), ImmFreeLayout(), ImmLockImeDpi(), ImmUnlockImeDpi(), InitUserApiHook(), InternalSleep(), IntGetCodePageEntry(), IntGetLoadedCodePageEntry(), LdrLockLoaderLock(), LdrpGetProcedureAddress(), LdrpLoadDll(), LdrQueryProcessModuleInformationEx(), LdrShutdownProcess(), LdrShutdownThread(), LdrUnloadDll(), LoadTheSpoolerDrv(), LsarOpenPolicy(), MapDefaultKey(), NLS_GetFormats(), queue_get_timeout(), queue_timer_expire(), RegDisablePredefinedCache(), RegDisablePredefinedCacheEx(), RegOverridePredefKey(), RtlAcquirePebLock(), RtlAcquireResourceExclusive(), RtlAcquireResourceShared(), RtlConvertExclusiveToShared(), RtlConvertSharedToExclusive(), RtlCreateTimer(), RtlDeleteTimer(), RtlDeleteTimerQueueEx(), RtlEnterHeapLock(), RtlGetProcessHeaps(), RtlpAddHeapToProcessList(), RtlpAddVectoredHandler(), RtlpCallVectoredHandlers(), RtlPcToFileHeader(), RtlpExecuteIoWorkItem(), RtlpIoWorkerThreadProc(), RtlpLockAtomTable(), RtlpRemoveHeapFromProcessList(), RtlpRemoveVectoredHandler(), RtlpWorkerThreadProc(), RtlQueueWorkItem(), RtlReleaseResource(), RtlUpdateTimer(), SetConsoleCtrlHandler(), SetConsoleInputExeNameW(), SetDllDirectoryA(), SetDllDirectoryW(), SetLocaleInfoW(), SmpAllocateSessionId(), SmpCheckDuplicateMuSessionId(), SmpDeleteSession(), SmpDereferenceSubsystem(), SmpLoadSubSystem(), SmpLocateKnownSubSysByCid(), SmpLocateKnownSubSysByType(), Test_Acquire(), test_RtlLeaveCriticalSection(), ThreadProc1(), ThreadProc2(), timer_cleanup_callback(), timer_queue_thread_proc(), WritePrivateProfileSectionW(), WritePrivateProfileStringW(), and WritePrivateProfileStructW().

◆ RtlEqualPrefixSid()

NTSYSAPI BOOLEAN NTAPI RtlEqualPrefixSid ( PSID  Sid1,
PSID  Sid2 
)

Referenced by EqualPrefixSid().

◆ RtlEqualSid()

◆ RtlEqualUnicodeString()

NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString ( PCUNICODE_STRING  String1,
PCUNICODE_STRING  String2,
BOOLEAN  CaseInsensitive 
)

◆ RtlEraseUnicodeString()

NTSYSAPI VOID NTAPI RtlEraseUnicodeString ( _Inout_ PUNICODE_STRING  String)

Referenced by LsaApLogonUserEx2().

◆ RtlExitUserThread()

◆ RtlFindActivationContextSectionGuid()

NTSYSAPI NTSTATUS NTAPI RtlFindActivationContextSectionGuid ( ULONG  flags,
const GUID extguid,
ULONG  section_kind,
const GUID guid,
void ptr 
)

Definition at line 5946 of file actctx.c.

5948{
5949 ACTCTX_SECTION_KEYED_DATA *data = ptr;
5951
5952 TRACE("%08x %s %u %s %p\n", flags, debugstr_guid(extguid), section_kind, debugstr_guid(guid), data);
5953
5954 if (extguid)
5955 {
5956 FIXME("expected extguid == NULL\n");
5958 }
5959
5960 if (flags & ~FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX)
5961 {
5962 FIXME("unknown flags %08x\n", flags);
5964 }
5965
5966 if (!data || data->cbSize < FIELD_OFFSET(ACTCTX_SECTION_KEYED_DATA, ulAssemblyRosterIndex) || !guid)
5968
5969 if (NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame)
5970 {
5971 ACTIVATION_CONTEXT *actctx = check_actctx(NtCurrentTeb()->ActivationContextStackPointer->ActiveFrame->ActivationContext);
5972 if (actctx) status = find_guid( actctx, section_kind, guid, flags, data );
5973 }
5974
5975 if (status != STATUS_SUCCESS)
5976 status = find_guid( process_actctx, section_kind, guid, flags, data );
5977
5978 if (status != STATUS_SUCCESS)
5979 status = find_guid( implicit_actctx, section_kind, guid, flags, data );
5980
5981 return status;
5982}
#define FIXME(fmt,...)
Definition: precomp.h:53
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLbitfield flags
Definition: glext.h:7161
#define NtCurrentTeb
#define debugstr_guid
Definition: kernel32.h:35
#define actctx
Definition: kernel32.h:8
const GUID * guid
static PVOID ptr
Definition: dispmode.c:27
#define STATUS_SXS_KEY_NOT_FOUND
Definition: ntstatus.h:1389
static ACTIVATION_CONTEXT * implicit_actctx
Definition: actctx.c:771
static ACTIVATION_CONTEXT * process_actctx
Definition: actctx.c:770
static NTSTATUS find_guid(ACTIVATION_CONTEXT *actctx, ULONG section_kind, const GUID *guid, DWORD flags, PACTCTX_SECTION_KEYED_DATA data)
Definition: actctx.c:5140
static ACTIVATION_CONTEXT * check_actctx(HANDLE h)
Definition: actctx.c:1207
#define TRACE(s)
Definition: solgame.cpp:4
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255

Referenced by FindActCtxSectionGuid().

◆ RtlFindMessage()

◆ RtlFindRange()

NTSYSAPI NTSTATUS NTAPI RtlFindRange ( _In_ PRTL_RANGE_LIST  RangeList,
_In_ ULONGLONG  Minimum,
_In_ ULONGLONG  Maximum,
_In_ ULONG  Length,
_In_ ULONG  Alignment,
_In_ ULONG  Flags,
_In_ UCHAR  AttributeAvailableMask,
_In_opt_ PVOID  Context,
_In_opt_ PRTL_CONFLICT_RANGE_CALLBACK  Callback,
_Out_ PULONGLONG  Start 
)

◆ RtlFirstFreeAce()

NTSYSAPI BOOLEAN NTAPI RtlFirstFreeAce ( PACL  Acl,
PACE Ace 
)

Referenced by FindFirstFreeAce(), and START_TEST().

◆ RtlFormatCurrentUserKeyPath()

NTSYSAPI NTSTATUS NTAPI RtlFormatCurrentUserKeyPath ( _Out_ _At_(KeyPath->Buffer, __drv_allocatesMem(Mem) _Post_bytecap_(KeyPath->MaximumLength) _Post_bytecount_(KeyPath->Length)) PUNICODE_STRING  KeyPath)

Referenced by InitFunctionPtrs(), and SdbpOpenKey().

◆ RtlFreeHandle()

◆ RtlFreeRangeList()

NTSYSAPI VOID NTAPI RtlFreeRangeList ( _In_ PRTL_RANGE_LIST  RangeList)

◆ RtlFreeSid()

◆ RtlGetAce()

◆ RtlGetCompressionWorkSpaceSize()

NTSYSAPI NTSTATUS NTAPI RtlGetCompressionWorkSpaceSize ( _In_ USHORT  CompressionFormatAndEngine,
_Out_ PULONG  CompressBufferWorkSpaceSize,
_Out_ PULONG  CompressFragmentWorkSpaceSize 
)

◆ RtlGetControlSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlGetControlSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_Out_ PSECURITY_DESCRIPTOR_CONTROL  Control,
_Out_ PULONG  Revision 
)

◆ RtlGetCurrentDirectory_U()

NTSYSAPI ULONG NTAPI RtlGetCurrentDirectory_U ( _In_ ULONG  MaximumLength,
_Out_bytecap_(MaximumLength) PWSTR  Buffer 
)

Definition at line 1661 of file path.c.

1664{
1666 PCURDIR CurDir;
1667 PWSTR CurDirName;
1668 DPRINT("RtlGetCurrentDirectory %lu %p\n", MaximumLength, Buffer);
1669
1670 /* Lock the PEB to get the current directory */
1672 CurDir = &NtCurrentPeb()->ProcessParameters->CurrentDirectory;
1673
1674 /* Get the buffer and character length */
1675 CurDirName = CurDir->DosPath.Buffer;
1676 Length = CurDir->DosPath.Length / sizeof(WCHAR);
1677 ASSERT((CurDirName != NULL) && (Length > 0));
1678
1679 /*
1680 * DosPath.Buffer should always have a trailing slash. There is an assert
1681 * below which checks for this.
1682 *
1683 * This function either returns x:\ for a root (keeping the original buffer)
1684 * or it returns x:\path\foo for a directory (replacing the trailing slash
1685 * with a NULL.
1686 */
1687 Bytes = Length * sizeof(WCHAR);
1688 if ((Length <= 1) || (CurDirName[Length - 2] == L':'))
1689 {
1690 /* Check if caller does not have enough space */
1691 if (MaximumLength <= Bytes)
1692 {
1693 /* Call has no space for it, fail, add the trailing slash */
1695 return Bytes + sizeof(OBJ_NAME_PATH_SEPARATOR);
1696 }
1697 }
1698 else
1699 {
1700 /* Check if caller does not have enough space */
1701 if (MaximumLength < Bytes)
1702 {
1703 /* Call has no space for it, fail */
1705 return Bytes;
1706 }
1707 }
1708
1709 /* Copy the buffer since we seem to have space */
1710 RtlCopyMemory(Buffer, CurDirName, Bytes);
1711
1712 /* The buffer should end with a path separator */
1714
1715 /* Again check for our two cases (drive root vs path) */
1716 if ((Length <= 1) || (Buffer[Length - 2] != L':'))
1717 {
1718 /* Replace the trailing slash with a null */
1719 Buffer[Length - 1] = UNICODE_NULL;
1720 --Length;
1721 }
1722 else
1723 {
1724 /* Append the null char since there's no trailing slash */
1726 }
1727
1728 /* Release PEB lock */
1730 DPRINT("CurrentDirectory %S\n", Buffer);
1731 return Length * sizeof(WCHAR);
1732}
#define OBJ_NAME_PATH_SEPARATOR
Definition: arcname_tests.c:25
Definition: bufpool.h:45
NTSYSAPI void WINAPI RtlReleasePebLock(void)
Definition: libsupp.c:84
NTSYSAPI void WINAPI RtlAcquirePebLock(void)
Definition: libsupp.c:74
_In_ UINT Bytes
Definition: mmcopy.h:9
UNICODE_STRING DosPath
Definition: rtltypes.h:1368
_In_ WDFDMATRANSACTION _In_ size_t MaximumLength

Referenced by GetCurrentDirectoryA(), GetCurrentDirectoryW(), and GetDriveTypeW().

◆ RtlGetCurrentPeb()

NTSYSAPI PPEB NTAPI RtlGetCurrentPeb ( VOID  )

Definition at line 65 of file libsupp.c.

66{
67 return NtCurrentPeb();
68}

◆ RtlGetCurrentProcessorNumber()

NTSYSAPI ULONG NTAPI RtlGetCurrentProcessorNumber ( VOID  )

Definition at line 491 of file process.c.

492{
493 /* Forward to kernel */
495}
NTSYSAPI ULONG WINAPI NtGetCurrentProcessorNumber(void)
Definition: sysinfo.c:3055

◆ RtlGetDaclSecurityDescriptor()

◆ RtlGetDefaultCodePage()

NTSYSAPI VOID NTAPI RtlGetDefaultCodePage ( _Out_ PUSHORT  AnsiCodePage,
_Out_ PUSHORT  OemCodePage 
)

◆ RtlGetFirstRange()

NTSYSAPI NTSTATUS NTAPI RtlGetFirstRange ( _In_ PRTL_RANGE_LIST  RangeList,
_Out_ PRTL_RANGE_LIST_ITERATOR  Iterator,
_Outptr_ PRTL_RANGE Range 
)

Referenced by ExpectRangeEntryList().

◆ RtlGetFrame()

NTSYSAPI PTEB_ACTIVE_FRAME NTAPI RtlGetFrame ( VOID  )

Definition at line 421 of file debug.c.

422{
423 /* Return the frame that's currently active */
424 return NtCurrentTeb()->ActiveFrame;
425}

◆ RtlGetFullPathName_U()

NTSYSAPI ULONG NTAPI RtlGetFullPathName_U ( _In_ PCWSTR  FileName,
_In_ ULONG  Size,
_Out_z_bytecap_(Size) PWSTR  Buffer,
_Out_opt_ PWSTR ShortName 
)

Definition at line 1987 of file path.c.

1992{
1994
1995 /* Call the extended function */
1997 Size,
1998 Buffer,
1999 ShortName,
2000 &PathType);
2001}
static IN ULONG IN PWSTR OUT PCWSTR OUT PBOOLEAN OUT PATH_TYPE_AND_UNKNOWN * PathType
IN PDCB IN POEM_STRING IN PUNICODE_STRING IN OUT POEM_STRING ShortName
Definition: fatprocs.h:1307
enum _RTL_PATH_TYPE RTL_PATH_TYPE
ULONG NTAPI RtlGetFullPathName_UEx(_In_ PWSTR FileName, _In_ ULONG BufferLength, _Out_writes_bytes_(BufferLength) PWSTR Buffer, _Out_opt_ PWSTR *FilePart, _Out_opt_ RTL_PATH_TYPE *InputPathType)
Definition: path.c:1942

Referenced by GetFullPathNameA(), GetFullPathNameW(), lookup_assembly(), RtlDosSearchPath_U(), RunTestCases(), and START_TEST().

◆ RtlGetFullPathName_UEx()

NTSYSAPI NTSTATUS NTAPI RtlGetFullPathName_UEx ( _In_ PWSTR  FileName,
_In_ ULONG  BufferLength,
_Out_ PWSTR  Buffer,
_Out_opt_ PWSTR FilePart,
_Out_opt_ RTL_PATH_TYPE InputPathType 
)

◆ RtlGetFullPathName_UstrEx()

NTSTATUS NTAPI RtlGetFullPathName_UstrEx ( _In_ PUNICODE_STRING  FileName,
_In_opt_ PUNICODE_STRING  StaticString,
_In_opt_ PUNICODE_STRING  DynamicString,
_Out_opt_ PUNICODE_STRING StringUsed,
_Out_opt_ PSIZE_T  FilePartSize,
_Out_opt_ PBOOLEAN  NameInvalid,
_Out_ RTL_PATH_TYPE PathType,
_Out_opt_ PSIZE_T  LengthNeeded 
)

Referenced by CreateProcessInternalW().

◆ RtlGetGroupSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlGetGroupSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_Out_ PSID Group,
_Out_ PBOOLEAN  GroupDefaulted 
)

◆ RtlGetLengthWithoutTrailingPathSeperators()

NTSYSAPI NTSTATUS NTAPI RtlGetLengthWithoutTrailingPathSeperators ( _Reserved_ ULONG  Flags,
_In_ PCUNICODE_STRING  PathString,
_Out_ PULONG  Length 
)

Referenced by START_TEST().

◆ RtlGetLongestNtPathLength()

NTSYSAPI ULONG NTAPI RtlGetLongestNtPathLength ( VOID  )

Definition at line 1555 of file path.c.

1556{
1557 /*
1558 * The longest NT path is a DOS path that actually sits on a UNC path (ie:
1559 * a mapped network drive), which is accessed through the DOS Global?? path.
1560 * This is, and has always been equal to, 269 characters, except in Wine
1561 * which claims this is 277. Go figure.
1562 */
1563 return MAX_PATH + RtlpDosDevicesUncPrefix.Length / sizeof(WCHAR) + sizeof(ANSI_NULL);
1564}
#define MAX_PATH
Definition: compat.h:34
#define ANSI_NULL
const UNICODE_STRING RtlpDosDevicesUncPrefix
Definition: path.c:36

◆ RtlGetNextRange()

NTSYSAPI NTSTATUS NTAPI RtlGetNextRange ( _Inout_ PRTL_RANGE_LIST_ITERATOR  Iterator,
_Outptr_ PRTL_RANGE Range,
_In_ BOOLEAN  MoveForwards 
)

Referenced by ExpectRangeEntryList().

◆ RtlGetNtGlobalFlags()

NTSYSAPI ULONG NTAPI RtlGetNtGlobalFlags ( VOID  )

Definition at line 95 of file libsupp.c.

96{
97 PPEB pPeb = NtCurrentPeb();
98 return pPeb->NtGlobalFlag;
99}
ULONG NtGlobalFlag
Definition: ntddk_ex.h:270

◆ RtlGetOwnerSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlGetOwnerSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_Out_ PSID Owner,
_Out_ PBOOLEAN  OwnerDefaulted 
)

◆ RtlGetSaclSecurityDescriptor()

◆ RtlGetSecurityDescriptorRMControl()

NTSYSAPI BOOLEAN NTAPI RtlGetSecurityDescriptorRMControl ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_Out_ PUCHAR  RMControl 
)

◆ RtlHashUnicodeString()

◆ RtlIdentifierAuthoritySid()

◆ RtlImageNtHeader()

NTSYSAPI PIMAGE_NT_HEADERS NTAPI RtlImageNtHeader ( _In_ PVOID  BaseAddress)

◆ RtlImageNtHeaderEx()

NTSYSAPI NTSTATUS NTAPI RtlImageNtHeaderEx ( _In_ ULONG  Flags,
_In_ PVOID  BaseAddress,
_In_ ULONGLONG  Size,
_Out_ PIMAGE_NT_HEADERS NtHeader 
)

◆ RtlImageRvaToSection()

NTSYSAPI PIMAGE_SECTION_HEADER NTAPI RtlImageRvaToSection ( _In_ PIMAGE_NT_HEADERS  NtHeader,
_In_ PVOID  BaseAddress,
_In_ ULONG  Rva 
)

◆ RtlImageRvaToVa()

NTSYSAPI PVOID NTAPI RtlImageRvaToVa ( _In_ PIMAGE_NT_HEADERS  NtHeader,
_In_ PVOID  BaseAddress,
_In_ ULONG  Rva,
_Inout_opt_ PIMAGE_SECTION_HEADER SectionHeader 
)

◆ RtlImpersonateSelf()

NTSYSAPI NTSTATUS NTAPI RtlImpersonateSelf ( IN SECURITY_IMPERSONATION_LEVEL  ImpersonationLevel)

Definition at line 45 of file priv.c.

46{
47 HANDLE ProcessToken;
48 HANDLE ImpersonationToken;
50 OBJECT_ATTRIBUTES ObjAttr;
52
54
57 &ProcessToken);
58 if (!NT_SUCCESS(Status))
59 {
60 DPRINT1("NtOpenProcessToken() failed (Status %lx)\n", Status);
61 return Status;
62 }
63
66 Sqos.ContextTrackingMode = 0;
67 Sqos.EffectiveOnly = FALSE;
68
70 NULL,
71 0,
72 NULL,
73 NULL);
74
75 ObjAttr.SecurityQualityOfService = &Sqos;
76
77 Status = ZwDuplicateToken(ProcessToken,
79 &ObjAttr,
80 Sqos.EffectiveOnly, /* why both here _and_ in Sqos? */
82 &ImpersonationToken);
83 if (!NT_SUCCESS(Status))
84 {
85 DPRINT1("NtDuplicateToken() failed (Status %lx)\n", Status);
86 NtClose(ProcessToken);
87 return Status;
88 }
89
90 Status = ZwSetInformationThread(NtCurrentThread(),
92 &ImpersonationToken,
93 sizeof(HANDLE));
94 if (!NT_SUCCESS(Status))
95 {
96 DPRINT1("NtSetInformationThread() failed (Status %lx)\n", Status);
97 }
98
99 ZwClose(ImpersonationToken);
100 ZwClose(ProcessToken);
101
102 return Status;
103}
@ ThreadImpersonationToken
Definition: compat.h:940
struct _SECURITY_QUALITY_OF_SERVICE SECURITY_QUALITY_OF_SERVICE
@ TokenImpersonation
Definition: imports.h:274
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
PVOID SecurityQualityOfService
Definition: umtypes.h:188
SECURITY_CONTEXT_TRACKING_MODE ContextTrackingMode
Definition: lsa.idl:66
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
Definition: lsa.idl:65
_Out_ PBOOLEAN _Out_ PBOOLEAN _Out_ PSECURITY_IMPERSONATION_LEVEL ImpersonationLevel
Definition: psfuncs.h:156
#define TOKEN_DUPLICATE
Definition: setypes.h:926
#define TOKEN_IMPERSONATE
Definition: setypes.h:927
NTSYSAPI NTSTATUS NTAPI ZwOpenProcessToken(_In_ HANDLE ProcessHandle, _In_ ACCESS_MASK DesiredAccess, _Out_ PHANDLE TokenHandle)
#define NtCurrentThread()

Referenced by ImpersonateSelf(), InsertTokenToProcessCommon(), and START_TEST().

◆ RtlInitializeConditionVariable()

NTSYSAPI VOID NTAPI RtlInitializeConditionVariable ( _Out_ PRTL_CONDITION_VARIABLE  ConditionVariable)

◆ RtlInitializeContext()

NTSYSAPI VOID NTAPI RtlInitializeContext ( _In_ HANDLE  ProcessHandle,
_Out_ PCONTEXT  ThreadContext,
_In_opt_ PVOID  ThreadStartParam,
_In_ PTHREAD_START_ROUTINE  ThreadStartAddress,
_In_ PINITIAL_TEB  InitialTeb 
)

◆ RtlInitializeCriticalSection()

◆ RtlInitializeCriticalSectionAndSpinCount()

NTSYSAPI NTSTATUS NTAPI RtlInitializeCriticalSectionAndSpinCount ( _In_ PRTL_CRITICAL_SECTION  CriticalSection,
_In_ ULONG  SpinCount 
)

◆ RtlInitializeHandleTable()

NTSYSAPI VOID NTAPI RtlInitializeHandleTable ( _In_ ULONG  TableSize,
_In_ ULONG  HandleSize,
_In_ PRTL_HANDLE_TABLE  HandleTable 
)

◆ RtlInitializeRangeList()

◆ RtlInitializeResource()

◆ RtlInitNlsTables()

NTSYSAPI VOID NTAPI RtlInitNlsTables ( _In_ PUSHORT  AnsiTableBase,
_In_ PUSHORT  OemTableBase,
_In_ PUSHORT  CaseTableBase,
_Out_ PNLSTABLEINFO  NlsTable 
)

◆ RtlIntegerToChar()

NTSYSAPI NTSTATUS NTAPI RtlIntegerToChar ( _In_ ULONG  Value,
_In_ ULONG  Base,
_In_ ULONG  Length,
_Out_ PCHAR  String 
)

◆ RtlIntegerToUnicode()

NTSYSAPI NTSTATUS NTAPI RtlIntegerToUnicode ( _In_ ULONG  Value,
_In_opt_ ULONG  Base,
_In_opt_ ULONG  Length,
_Inout_ LPWSTR  String 
)

◆ RtlInvertRangeList()

NTSYSAPI NTSTATUS NTAPI RtlInvertRangeList ( _Out_ PRTL_RANGE_LIST  InvertedRangeList,
_In_ PRTL_RANGE_LIST  RangeList 
)

◆ RtlIpv4AddressToStringA()

NTSYSAPI PSTR NTAPI RtlIpv4AddressToStringA ( _In_ const struct in_addr Addr,
_Out_writes_(16) PCHAR  S 
)

◆ RtlIpv4AddressToStringExA()

NTSYSAPI NTSTATUS NTAPI RtlIpv4AddressToStringExA ( _In_ const struct in_addr Address,
_In_ USHORT  Port,
_Out_writes_to_ *, *AddressStringLength PCHAR  AddressString,
_Inout_ PULONG  AddressStringLength 
)

Definition at line 186 of file network.c.

191{
195 PSTR End;
196
197 if (!Address || !AddressString || !AddressStringLength)
199
202 &End,
203 NULL,
204 0,
205 Port ? "%u.%u.%u.%u:%u"
206 : "%u.%u.%u.%u",
207 Address->S_un.S_un_b.s_b1,
208 Address->S_un.S_un_b.s_b2,
209 Address->S_un.S_un_b.s_b3,
210 Address->S_un.S_un_b.s_b4,
211 WN2H(Port));
213 if (!NT_SUCCESS(Status))
215
216 Length = End - Buffer;
217 if (*AddressStringLength > Length)
218 {
219 Status = RtlStringCchCopyA(AddressString,
220 *AddressStringLength,
221 Buffer);
223 *AddressStringLength = Length + 1;
224 return STATUS_SUCCESS;
225 }
226
227 *AddressStringLength = Length + 1;
229}
#define RTL_NUMBER_OF(x)
Definition: RtlRegistry.c:12
CPPORT Port[4]
Definition: headless.c:35
NTSTRSAFEAPI RtlStringCchCopyA(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCSTR pszSrc)
Definition: ntstrsafe.h:110
NTSTRSAFEVAPI RtlStringCchPrintfExA(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PSTR pszDest, _In_ size_t cchDest, _Outptr_opt_result_buffer_(*pcchRemaining) NTSTRSAFE_PSTR *ppszDestEnd, _Out_opt_ size_t *pcchRemaining, _In_ STRSAFE_DWORD dwFlags, _In_ _Printf_format_string_ NTSTRSAFE_PCSTR pszFormat,...)
Definition: ntstrsafe.h:1218
#define IPV4_PORT_STRING_MAX_LEN
Definition: network.c:20
#define IPV4_ADDR_STRING_MAX_LEN
Definition: network.c:17
#define WN2H(w)
Definition: network.c:29
char * PSTR
Definition: typedefs.h:51

Referenced by inet_ntop().

◆ RtlIpv4AddressToStringExW()

NTSTATUS NTAPI RtlIpv4AddressToStringExW ( _In_ const struct in_addr Address,
_In_ USHORT  Port,
_Out_writes_to_ *, *AddressStringLength PWCHAR  AddressString,
_Inout_ PULONG  AddressStringLength 
)

Definition at line 268 of file network.c.

273{
277 PWSTR End;
278
279 if (!Address || !AddressString || !AddressStringLength)
281
284 &End,
285 NULL,
286 0,
287 Port ? L"%u.%u.%u.%u:%u"
288 : L"%u.%u.%u.%u",
289 Address->S_un.S_un_b.s_b1,
290 Address->S_un.S_un_b.s_b2,
291 Address->S_un.S_un_b.s_b3,
292 Address->S_un.S_un_b.s_b4,
293 WN2H(Port));
295 if (!NT_SUCCESS(Status))
297
298 Length = End - AddressString;
299 if (*AddressStringLength > Length)
300 {
301 Status = RtlStringCchCopyW(AddressString,
302 *AddressStringLength,
303 Buffer);
305 *AddressStringLength = Length + 1;
306 return STATUS_SUCCESS;
307 }
308
309 *AddressStringLength = Length + 1;
311}
NTSTRSAFEAPI RtlStringCchCopyW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _In_ NTSTRSAFE_PCWSTR pszSrc)
Definition: ntstrsafe.h:127
NTSTRSAFEVAPI RtlStringCchPrintfExW(_Out_writes_(cchDest) _Always_(_Post_z_) NTSTRSAFE_PWSTR pszDest, _In_ size_t cchDest, _Outptr_opt_result_buffer_(*pcchRemaining) NTSTRSAFE_PWSTR *ppszDestEnd, _Out_opt_ size_t *pcchRemaining, _In_ STRSAFE_DWORD dwFlags, _In_ _Printf_format_string_ NTSTRSAFE_PCWSTR pszFormat,...)
Definition: ntstrsafe.h:1246

Referenced by InetNtopW().

◆ RtlIpv4AddressToStringW()

NTSYSAPI PWSTR NTAPI RtlIpv4AddressToStringW ( _In_ const struct in_addr Addr,
_Out_writes_(16) PWCHAR  S 
)

Referenced by DisplayDnsRecord().

◆ RtlIpv4StringToAddressA()

NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressA ( _In_ PCSTR  String,
_In_ BOOLEAN  Strict,
_Out_ PCSTR Terminator,
_Out_ struct in_addr Addr 
)

Definition at line 318 of file network.c.

323{
325 ANSI_STRING AddressA;
326 UNICODE_STRING AddressW;
327 PCWSTR TerminatorW = NULL;
328
329 Status = RtlInitAnsiStringEx(&AddressA, String);
330 if (!NT_SUCCESS(Status))
331 return Status;
332
333 Status = RtlAnsiStringToUnicodeString(&AddressW, &AddressA, TRUE);
334 if (!NT_SUCCESS(Status))
335 return Status;
336
338 Strict,
339 &TerminatorW,
340 Addr);
341
342 ASSERT(TerminatorW >= AddressW.Buffer);
343 *Terminator = String + (TerminatorW - AddressW.Buffer);
344
345 RtlFreeUnicodeString(&AddressW);
346
347 return Status;
348}
NTSYSAPI NTSTATUS WINAPI RtlInitAnsiStringEx(PANSI_STRING, PCSZ)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
NTSTATUS NTAPI RtlIpv4StringToAddressW(_In_ PCWSTR String, _In_ BOOLEAN Strict, _Out_ PCWSTR *Terminator, _Out_ struct in_addr *Addr)
Definition: network.c:385
const uint16_t * PCWSTR
Definition: typedefs.h:57
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433

Referenced by inet_pton(), ParseIpv4Address(), and TestUM().

◆ RtlIpv4StringToAddressExA()

NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressExA ( _In_ PCSTR  AddressString,
_In_ BOOLEAN  Strict,
_Out_ struct in_addr Address,
_Out_ PUSHORT  Port 
)

Definition at line 355 of file network.c.

360{
362 ANSI_STRING AddressA;
363 UNICODE_STRING AddressW;
364
365 Status = RtlInitAnsiStringEx(&AddressA, AddressString);
366 if (!NT_SUCCESS(Status))
367 return Status;
368
369 Status = RtlAnsiStringToUnicodeString(&AddressW, &AddressA, TRUE);
370 if (!NT_SUCCESS(Status))
371 return Status;
372
373 Status = RtlIpv4StringToAddressExW(AddressW.Buffer, Strict, Address, Port);
374
375 RtlFreeUnicodeString(&AddressW);
376
377 return Status;
378}
NTSTATUS NTAPI RtlIpv4StringToAddressExW(_In_ PCWSTR AddressString, _In_ BOOLEAN Strict, _Out_ struct in_addr *Address, _Out_ PUSHORT Port)
Definition: network.c:430

◆ RtlIpv4StringToAddressExW()

NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressExW ( _In_ PCWSTR  AddressString,
_In_ BOOLEAN  Strict,
_Out_ struct in_addr Address,
_Out_ PUSHORT  Port 
)

Definition at line 430 of file network.c.

435{
436 PCWSTR CurrentChar;
437 ULONG ConvertedPort;
439
440 if (!AddressString || !Address || !Port)
442
443 Status = RtlIpv4StringToAddressW(AddressString,
444 Strict,
445 &CurrentChar,
446 Address);
447 if (!NT_SUCCESS(Status))
448 return Status;
449
450 if (!*CurrentChar)
451 {
452 *Port = 0;
453 return STATUS_SUCCESS;
454 }
455
456 if (*CurrentChar != L':')
458 ++CurrentChar;
459
460 Status = RtlpStringToUlong(CurrentChar,
461 FALSE,
462 &CurrentChar,
463 &ConvertedPort);
464 if (!NT_SUCCESS(Status))
465 return Status;
466
467 if (*CurrentChar || !ConvertedPort || ConvertedPort > 0xffff)
469
470 *Port = WN2H(ConvertedPort);
471 return STATUS_SUCCESS;
472}
static NTSTATUS RtlpStringToUlong(_In_ PCWSTR String, _In_ BOOLEAN Strict, _Out_ PCWSTR *Terminator, _Out_ PULONG Out)
Definition: network.c:80

Referenced by RtlIpv4StringToAddressExA().

◆ RtlIpv4StringToAddressW()

NTSYSAPI NTSTATUS NTAPI RtlIpv4StringToAddressW ( _In_ PCWSTR  String,
_In_ BOOLEAN  Strict,
_Out_ PCWSTR Terminator,
_Out_ struct in_addr Addr 
)

Definition at line 385 of file network.c.

390{
392 ULONG Values[4];
394 INT Parts = 0;
395 INT i;
396
398 Strict,
399 Terminator,
400 Values,
401 &Parts);
402 if (Strict && Parts < 4)
404
405 if (!NT_SUCCESS(Status))
406 return Status;
407
408 /* Combine the parts */
409 Result = Values[Parts - 1];
410 for (i = 0; i < Parts - 1; i++)
411 {
412 INT Shift = CHAR_BIT * (3 - i);
413
414 if (Values[i] > 0xFF || (Result & (0xFF << Shift)) != 0)
415 {
417 }
418 Result |= Values[i] << Shift;
419 }
420
421 Addr->S_un.S_addr = RtlUlongByteSwap(Result);
422 return Status;
423}
#define RtlUlongByteSwap(_x)
Definition: compat.h:815
#define CHAR_BIT
Definition: urlcache.c:62
NTSTATUS NTAPI RtlpIpv4StringToAddressParserW(_In_ PCWSTR String, _In_ BOOLEAN Strict, _Out_ PCWSTR *Terminator, _Out_writes_(4) ULONG *Values, _Out_ INT *Parts)
Definition: network.c:116
int32_t INT
Definition: typedefs.h:58
_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
_In_ ULONG Shift
Definition: rtlfuncs.h:2698

Referenced by InetPtonW(), ParseIpv4Address(), RtlIpv4StringToAddressA(), RtlIpv4StringToAddressExW(), and TestTcpConnect().

◆ RtlIpv6AddressToStringA()

NTSYSAPI PSTR NTAPI RtlIpv6AddressToStringA ( _In_ const struct in6_addr Addr,
_Out_writes_(46) PSTR  S 
)

◆ RtlIpv6AddressToStringExA()

NTSYSAPI NTSTATUS NTAPI RtlIpv6AddressToStringExA ( _In_ const struct in6_addr Address,
_In_ ULONG  ScopeId,
_In_ USHORT  Port,
_Out_writes_to_ *, *AddressStringLength PSTR  AddressString,
_Inout_ PULONG  AddressStringLength 
)

Definition at line 510 of file network.c.

516{
519
520 if (!Address || !AddressString || !AddressStringLength)
522
523 Status = RtlIpv6AddressToStringExW(Address, ScopeId, Port, Buffer, AddressStringLength);
524 if (!NT_SUCCESS(Status))
525 return Status;
526
527 Status = RtlUnicodeToMultiByteN(AddressString, RTLIPV6A2SEX_MAX_LEN, NULL, Buffer, (*AddressStringLength + 1) * sizeof(WCHAR));
528 if (!NT_SUCCESS(Status))
530
531 return STATUS_SUCCESS;
532}
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteN(_Out_ PCHAR MbString, _In_ ULONG MbSize, _Out_opt_ PULONG ResultSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:107
#define RTLIPV6A2SEX_MAX_LEN
Definition: network.c:26
NTSTATUS NTAPI RtlIpv6AddressToStringExW(_In_ const struct in6_addr *Address, _In_ ULONG ScopeId, _In_ USHORT Port, _Out_writes_to_(*AddressStringLength, *AddressStringLength) PWCHAR AddressString, _Inout_ PULONG AddressStringLength)
Definition: network.c:649

Referenced by inet_ntop().

◆ RtlIpv6AddressToStringExW()

NTSYSAPI NTSTATUS NTAPI RtlIpv6AddressToStringExW ( _In_ const struct in6_addr Address,
_In_ ULONG  ScopeId,
_In_ USHORT  Port,
_Out_writes_to_ *, *AddressStringLength PWCHAR  AddressString,
_Inout_ PULONG  AddressStringLength 
)

Definition at line 649 of file network.c.

655{
657 PWCHAR S = Buffer;
660 size_t Remaining;
661
662 if (!Address || !AddressString || !AddressStringLength)
664
665 if (Port)
666 *S++ = L'[';
667
669 ASSERT(S != (PCWSTR)~0);
670 if (S == (PCWSTR)~0)
672
673 ASSERT(S >= Buffer);
675 Remaining = RTL_NUMBER_OF(Buffer) - (S - Buffer);
677
678 if (ScopeId)
679 {
681 Remaining,
682 &S,
683 &Remaining,
684 0,
685 L"%%%u",
686 ScopeId);
688 if (!NT_SUCCESS(Status))
690 }
691
692 if (Port)
693 {
695 Remaining,
696 &S,
697 &Remaining,
698 0,
699 L"]:%u",
700 WN2H(Port));
702 if (!NT_SUCCESS(Status))
704 }
705
706 Length = S - Buffer;
708 if (*AddressStringLength > Length)
709 {
710 Status = RtlStringCchCopyW(AddressString, *AddressStringLength, Buffer);
712 *AddressStringLength = Length + 1;
713 return STATUS_SUCCESS;
714 }
715
716 *AddressStringLength = Length + 1;
718}
PWSTR NTAPI RtlIpv6AddressToStringW(_In_ const struct in6_addr *Addr, _Out_writes_(RTLIPV6A2S_MAX_LEN) PWSTR S)
Definition: network.c:539
#define RTLIPV6A2S_MAX_LEN
Definition: network.c:23
Definition: movable.cpp:9
uint16_t * PWCHAR
Definition: typedefs.h:56

Referenced by InetNtopW(), and RtlIpv6AddressToStringExA().

◆ RtlIpv6AddressToStringW()

NTSYSAPI PWSTR NTAPI RtlIpv6AddressToStringW ( _In_ const struct in6_addr Addr,
_Out_writes_(46) PWSTR  S 
)

Referenced by DisplayDnsRecord().

◆ RtlIpv6StringToAddressA()

NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressA ( _In_ PCSTR  String,
_Out_ PCSTR Terminator,
_Out_ struct in6_addr Addr 
)

Definition at line 725 of file network.c.

729{
731 ANSI_STRING StringA;
733 PCWSTR TerminatorW = NULL;
734
735 Status = RtlInitAnsiStringEx(&StringA, String);
736 if (!NT_SUCCESS(Status))
737 return Status;
738
740 if (!NT_SUCCESS(Status))
741 return Status;
742
743 Status = RtlIpv6StringToAddressW(StringW.Buffer, &TerminatorW, Addr);
744 /* on windows the terminator is not always written, so we mimic that behavior. */
745 if (TerminatorW)
746 *Terminator = String + (TerminatorW - StringW.Buffer);
747
749 return Status;
750}
static const WCHAR StringW[]
Definition: global.c:49
NTSTATUS NTAPI RtlIpv6StringToAddressW(_In_ PCWSTR String, _Out_ PCWSTR *Terminator, _Out_ struct in6_addr *Addr)
Definition: network.c:1005

Referenced by Dns_Ip6StringToAddress_A(), inet_pton(), and ParseIpv6Address().

◆ RtlIpv6StringToAddressExA()

NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressExA ( _In_ PCSTR  AddressString,
_Out_ struct in6_addr Address,
_Out_ PULONG  ScopeId,
_Out_ PUSHORT  Port 
)

Definition at line 757 of file network.c.

762{
764 ANSI_STRING AddressA;
765 UNICODE_STRING AddressW;
766
767 Status = RtlInitAnsiStringEx(&AddressA, AddressString);
768 if (!NT_SUCCESS(Status))
769 return Status;
770
771 Status = RtlAnsiStringToUnicodeString(&AddressW, &AddressA, TRUE);
772 if (!NT_SUCCESS(Status))
773 return Status;
774
775 Status = RtlIpv6StringToAddressExW(AddressW.Buffer, Address, ScopeId, Port);
776
777 RtlFreeUnicodeString(&AddressW);
778 return Status;
779}
NTSTATUS NTAPI RtlIpv6StringToAddressExW(_In_ PCWSTR AddressString, _Out_ struct in6_addr *Address, _Out_ PULONG ScopeId, _Out_ PUSHORT Port)
Definition: network.c:1021

Referenced by Dns_StringToDnsAddrEx().

◆ RtlIpv6StringToAddressExW()

NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressExW ( _In_ PCWSTR  AddressString,
_Out_ struct in6_addr Address,
_Out_ PULONG  ScopeId,
_Out_ PUSHORT  Port 
)

Definition at line 1021 of file network.c.

1026{
1027 if (!AddressString || !Address || !ScopeId || !Port)
1029
1030 return ipv6_string_to_address(AddressString, TRUE, NULL, Address, ScopeId, Port);
1031}
static NTSTATUS ipv6_string_to_address(const WCHAR *str, BOOL ex, const WCHAR **terminator, IN6_ADDR *address, ULONG *scope, USHORT *port)
Definition: network.c:860

Referenced by Dns_StringToDnsAddrEx(), and RtlIpv6StringToAddressExA().

◆ RtlIpv6StringToAddressW()

NTSYSAPI NTSTATUS NTAPI RtlIpv6StringToAddressW ( _In_ PCWSTR  String,
_Out_ PCWSTR Terminator,
_Out_ struct in6_addr Addr 
)

Definition at line 1005 of file network.c.

1009{
1010 if (!String || !Terminator || !Addr)
1012
1013 return ipv6_string_to_address(String, FALSE, Terminator, Addr, NULL, NULL);
1014}

Referenced by Dns_Ip6StringToAddress_W(), InetPtonW(), ParseIpv6Address(), and RtlIpv6StringToAddressA().

◆ RtlIsCriticalSectionLocked()

NTSYSAPI ULONG NTAPI RtlIsCriticalSectionLocked ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

◆ RtlIsCriticalSectionLockedByThread()

NTSYSAPI ULONG NTAPI RtlIsCriticalSectionLockedByThread ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

Referenced by wined3d_cs_create().

◆ RtlIsDosDeviceName_U()

◆ RtlIsDosDeviceName_Ustr()

NTSYSAPI ULONG NTAPI RtlIsDosDeviceName_Ustr ( _In_ PCUNICODE_STRING  Name)

◆ RtlIsRangeAvailable()

NTSYSAPI NTSTATUS NTAPI RtlIsRangeAvailable ( _In_ PRTL_RANGE_LIST  RangeList,
_In_ ULONGLONG  Start,
_In_ ULONGLONG  End,
_In_ ULONG  Flags,
_In_ UCHAR  AttributeAvailableMask,
_In_opt_ PVOID  Context,
_In_opt_ PRTL_CONFLICT_RANGE_CALLBACK  Callback,
_Out_ PBOOLEAN  Available 
)

Referenced by TestIsAvailable().

◆ RtlIsTextUnicode()

◆ RtlIsThreadWithinLoaderCallout()

NTSYSAPI BOOLEAN NTAPI RtlIsThreadWithinLoaderCallout ( VOID  )

Definition at line 347 of file libsupp.c.

348{
350}
PTEB LdrpTopLevelDllBeingLoadedTeb
Definition: libsupp.c:20

Referenced by CtfImmTIMActivate(), ForceResetUserApiHook(), and LoadUserApiHook().

◆ RtlIsValidHandle()

NTSYSAPI BOOLEAN NTAPI RtlIsValidHandle ( _In_ PRTL_HANDLE_TABLE  HandleTable,
_In_ PRTL_HANDLE_TABLE_ENTRY  Handle 
)

◆ RtlLargeIntegerToChar()

NTSYSAPI NTSTATUS NTAPI RtlLargeIntegerToChar ( _In_ PLARGE_INTEGER  Value,
_In_ ULONG  Base,
_In_ ULONG  Length,
_Out_ PCHAR  String 
)

◆ RtlLeaveCriticalSection()

NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

Referenced by AddBSMRequest(), AllocConsole(), AttachConsole(), AVrfDllLoadNotification(), AVrfDllUnloadNotification(), BaseComputeProcessDllPath(), BasepIsProcessAllowed(), BasepReplaceProcessThreadTokens(), BaseSrvBSMThread(), BaseSrvCleanupVDMResources(), BaseSrvNLSInit(), ClearUserApiHook(), CloseDefaultKeys(), CON_API(), ConsoleControlDispatcher(), ConSrvFreeHandlesTable(), ConSrvGetObject(), ConSrvInheritHandlesTable(), ConSrvInitProcessHandles(), ConSrvRemoveObject(), CSR_API(), EndUserApiHook(), EngReleaseSemaphore(), FindClose(), FindNextFileW(), FindNextStreamW(), FreeConsole(), get_registry_locale_info(), GetConsoleInputExeNameW(), GetCurrentExeName(), GetDllDirectoryA(), GetDllDirectoryW(), GetPrivateProfileSectionNamesW(), GetPrivateProfileSectionW(), GetPrivateProfileStringW(), GetPrivateProfileStructW(), Imm32FindImeDpi(), Imm32GetImeMenuItemWInterProcess(), Imm32InitTLS(), Imm32InternalLockIMC(), Imm32LoadCtfIme(), Imm32LoadImeDpi(), Imm32ReleaseIME(), ImmFreeLayout(), ImmLockImeDpi(), ImmUnlockImeDpi(), InitUserApiHook(), InternalSleep(), IntGetCodePageEntry(), IntGetLoadedCodePageEntry(), LdrpGetProcedureAddress(), LdrpLoadDll(), LdrQueryProcessModuleInformationEx(), LdrShutdownProcess(), LdrShutdownThread(), LdrUnloadDll(), LdrUnlockLoaderLock(), LoadTheSpoolerDrv(), LsarOpenPolicy(), MapDefaultKey(), NLS_GetFormats(), queue_get_timeout(), queue_timer_expire(), RegDisablePredefinedCache(), RegDisablePredefinedCacheEx(), RegOverridePredefKey(), RtlAcquireResourceExclusive(), RtlAcquireResourceShared(), RtlConvertExclusiveToShared(), RtlConvertSharedToExclusive(), RtlCreateTimer(), RtlDeleteTimer(), RtlDeleteTimerQueueEx(), RtlGetProcessHeaps(), RtlLeaveHeapLock(), RtlpAddHeapToProcessList(), RtlpAddVectoredHandler(), RtlpCallVectoredHandlers(), RtlPcToFileHeader(), RtlpExecuteIoWorkItem(), RtlpIoWorkerThreadProc(), RtlpRemoveHeapFromProcessList(), RtlpRemoveVectoredHandler(), RtlpUnlockAtomTable(), RtlpWorkerThreadProc(), RtlQueueWorkItem(), RtlReleasePebLock(), RtlReleaseResource(), RtlUpdateTimer(), SetConsoleCtrlHandler(), SetConsoleInputExeNameW(), SetDllDirectoryA(), SetDllDirectoryW(), SetLocaleInfoW(), SmpAllocateSessionId(), SmpCheckDuplicateMuSessionId(), SmpDeleteSession(), SmpDereferenceSubsystem(), SmpLoadSubSystem(), SmpLocateKnownSubSysByCid(), SmpLocateKnownSubSysByType(), Test_Acquire(), test_RtlLeaveCriticalSection(), ThreadProc1(), ThreadProc2(), timer_cleanup_callback(), timer_queue_thread_proc(), WritePrivateProfileSectionW(), WritePrivateProfileStringW(), and WritePrivateProfileStructW().

◆ RtlLengthRequiredSid()

◆ RtlLengthSid()

NTSYSAPI ULONG NTAPI RtlLengthSid ( IN PSID  Sid)

Definition at line 150 of file sid.c.

151{
152 PISID Sid = Sid_;
154
155 /* The offset to the last index + 1 (since it's a count) is the length */
156 return (ULONG)FIELD_OFFSET(SID,
157 SubAuthority[Sid->SubAuthorityCount]);
158}
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1145
BYTE SubAuthorityCount
Definition: ms-dtyp.idl:200

Referenced by _IRQL_requires_max_(), AccessCheckEmptyMappingTest(), AccessGrantedMultipleObjectsTests(), AccessGrantedTests(), BuildUserInfoBuffer(), CheckSid__(), CheckTokenMembership(), CmpQuerySecurityDescriptor(), CopySystemProfile(), CreateBaseAcls(), CreateNewDefaultDacl(), CsrCreateLocalSystemSD(), CsrSetProcessSecurity(), DenyAccessTests(), DsEnumerateDomainTrustsA(), GetAccountDomainSid(), GetDosDevicesProtection(), GetLengthSid(), GetSiteSidFromToken(), GetUserSid(), GetUserSidStringFromToken(), GrantedAccessTests(), IntCreateServiceSecurity(), K32CreateDBMonMutex(), LsapAddAuthorityToDomainsList(), LsapAddDefaultGroups(), LsapAddDomainToDomainsList(), LsapAddTokenDefaultDacl(), LsapCopyLocalGroups(), LsapCreateAccountSd(), LsapCreateDatabaseObjects(), LsapCreatePolicySd(), LsapCreateSecretSd(), LsapCreateTokenSd(), LsapGetLogonSessionData(), LsapSetLogonSessionData(), LsapSetTokenOwner(), LsarSetAccountDomain(), LsarSetPrimaryDomain(), MiCreateMemoryEvent(), NetLocalGroupGetMembers(), NetUserModalsGet(), NtCreatePagingFile(), NtQueryInformationToken(), NtSetInformationToken(), ObpCreateKernelObjectsSD(), ObpGetDosDevicesProtection(), RtlCopySid(), RtlCopySidAndAttributesArray(), RtlDefaultNpAcl(), RtlEqualSid(), RtlLengthSecurityDescriptor(), RtlLengthSidAndAttributes(), RtlpAddKnownAce(), RtlpAddKnownObjectAce(), RtlpQuerySecurityDescriptor(), RtlpSetSecurityObject(), RtlpSysVolCreateSecurityDescriptor(), RtlSelfRelativeToAbsoluteSD(), RtlValidAcl(), RtlValidRelativeSecurityDescriptor(), RtlxAddAuditAccessAceEx(), RtlxAddMandatoryLabelAceEx(), SampAddMemberToAlias(), SampCreateAccountDomainSD(), SampCreateAliasSD(), SampCreateBuiltinDomainSD(), SampCreateGroupSD(), SampCreateServerSD(), SampCreateUserSD(), SampSetupAddMemberToAlias(), SampSetupCreateDomain(), ScmCreateAcls(), SeCaptureSidAndAttributesArray(), SepComputeAvailableDynamicSpace(), SepCreateImpersonationTokenDacl(), SepCreateToken(), SepDuplicateToken(), SepInitDACLs(), SepInitializationPhase1(), SepPerformTokenFiltering(), SepPropagateAcl(), SepRebuildDynamicPartOfToken(), SeQueryInformationToken(), SeSetWorldSecurityDescriptor(), SmpCreateSecurityDescriptors(), TestSeAssignSecurity(), TiCreateSecurityDescriptor(), and uid_to_sid().

◆ RtlLogStackBackTrace()

NTSYSAPI USHORT NTAPI RtlLogStackBackTrace ( VOID  )

◆ RtlLookupAtomInAtomTable()

NTSYSAPI NTSTATUS NTAPI RtlLookupAtomInAtomTable ( _In_ PRTL_ATOM_TABLE  AtomTable,
_In_ PWSTR  AtomName,
_Out_ PRTL_ATOM  Atom 
)

◆ RtlMakeSelfRelativeSD()

◆ RtlMapGenericMask()

◆ RtlMapSecurityErrorToNtStatus()

NTSYSAPI NTSTATUS NTAPI RtlMapSecurityErrorToNtStatus ( _In_ ULONG  SecurityError)

◆ RtlMergeRangeLists()

NTSYSAPI NTSTATUS NTAPI RtlMergeRangeLists ( _Out_ PRTL_RANGE_LIST  MergedRangeList,
_In_ PRTL_RANGE_LIST  RangeList1,
_In_ PRTL_RANGE_LIST  RangeList2,
_In_ ULONG  Flags 
)

◆ RtlNewSecurityObject()

NTSYSAPI NTSTATUS NTAPI RtlNewSecurityObject ( _In_ PSECURITY_DESCRIPTOR  ParentDescriptor,
_In_ PSECURITY_DESCRIPTOR  CreatorDescriptor,
_Out_ PSECURITY_DESCRIPTOR NewDescriptor,
_In_ BOOLEAN  IsDirectoryObject,
_In_ HANDLE  Token,
_In_ PGENERIC_MAPPING  GenericMapping 
)

◆ RtlNormalizeProcessParams()

NTSYSAPI PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams ( _In_ PRTL_USER_PROCESS_PARAMETERS  ProcessParameters)

◆ RtlNtPathNameToDosPathName()

NTSYSAPI NTSTATUS NTAPI RtlNtPathNameToDosPathName ( _In_ ULONG  Flags,
_Inout_ PRTL_UNICODE_STRING_BUFFER  Path,
_Out_opt_ PULONG  PathType,
_Out_opt_ PULONG  Unknown 
)

Referenced by SdbGetMatchingExe().

◆ RtlOemStringToUnicodeString()

◆ RtlOpenCurrentUser()

◆ RtlpEnsureBufferSize()

NTSYSAPI NTSTATUS NTAPI RtlpEnsureBufferSize ( _In_ ULONG  Flags,
_Inout_ PRTL_BUFFER  Buffer,
_In_ SIZE_T  RequiredSize 
)

◆ RtlPinAtomInAtomTable()

NTSYSAPI NTSTATUS NTAPI RtlPinAtomInAtomTable ( _In_ PRTL_ATOM_TABLE  AtomTable,
_In_ RTL_ATOM  Atom 
)

Referenced by IntAddGlobalAtom(), and main().

◆ RtlPopFrame()

NTSYSAPI VOID NTAPI RtlPopFrame ( _In_ PTEB_ACTIVE_FRAME  Frame)

◆ RtlpUnWaitCriticalSection()

NTSYSAPI VOID NTAPI RtlpUnWaitCriticalSection ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

◆ RtlPushFrame()

NTSYSAPI VOID NTAPI RtlPushFrame ( _In_ PTEB_ACTIVE_FRAME  Frame)

◆ RtlpWaitForCriticalSection()

NTSYSAPI NTSTATUS NTAPI RtlpWaitForCriticalSection ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

◆ RtlQueryAtomInAtomTable()

NTSYSAPI NTSTATUS NTAPI RtlQueryAtomInAtomTable ( _In_ PRTL_ATOM_TABLE  AtomTable,
_In_ RTL_ATOM  Atom,
_Out_opt_ PULONG  RefCount,
_Out_opt_ PULONG  PinCount,
_Out_opt_z_bytecap_ *NameLength PWSTR  AtomName,
_Inout_opt_ PULONG  NameLength 
)

◆ RtlQueryEnvironmentVariable_U()

◆ RtlQueryProcessDebugInformation()

NTSYSAPI NTSTATUS NTAPI RtlQueryProcessDebugInformation ( _In_ ULONG  ProcessId,
_In_ ULONG  DebugInfoClassMask,
_Inout_ PRTL_DEBUG_INFORMATION  DebugBuffer 
)

◆ RtlQuerySecurityObject()

NTSYSAPI NTSTATUS NTAPI RtlQuerySecurityObject ( _In_ PSECURITY_DESCRIPTOR  ObjectDescriptor,
_In_ SECURITY_INFORMATION  SecurityInformation,
_Out_ PSECURITY_DESCRIPTOR  ResultantDescriptor,
_In_ ULONG  DescriptorLength,
_Out_ PULONG  ReturnLength 
)

◆ RtlQueryTimeZoneInformation()

NTSYSAPI NTSTATUS NTAPI RtlQueryTimeZoneInformation ( _Out_ PRTL_TIME_ZONE_INFORMATION  TimeZoneInformation)

◆ RtlQueueWorkItem()

◆ RtlRaiseException()

◆ RtlRaiseStatus()

◆ RtlRandom()

◆ RtlRegisterWait()

NTSYSAPI NTSTATUS NTAPI RtlRegisterWait ( _In_ PHANDLE  phNewWaitObject,
_In_ HANDLE  hObject,
_In_ WAITORTIMERCALLBACKFUNC  Callback,
_In_ PVOID  pvContext,
_In_ ULONG  ulMilliseconds,
_In_ ULONG  ulFlags 
)

◆ RtlReleasePebLock()

NTSYSAPI VOID NTAPI RtlReleasePebLock ( VOID  )

Definition at line 84 of file libsupp.c.

85{
88}
NTSYSAPI NTSTATUS NTAPI RtlLeaveCriticalSection(_In_ PRTL_CRITICAL_SECTION CriticalSection)

◆ RtlReleasePrivilege()

◆ RtlReleaseRelativeName()

◆ RtlReleaseResource()

NTSYSAPI VOID NTAPI RtlReleaseResource ( _In_ PRTL_RESOURCE  Resource)

Referenced by DirectSoundDevice_AddBuffer(), DirectSoundDevice_Release(), DirectSoundDevice_RemoveBuffer(), DSOUND_MixToPrimary(), DSOUND_timer(), ElfrFlushEL(), ElfrGetLogInformation(), ElfrNumberOfRecords(), ElfrOldestRecord(), IDirectSoundBufferImpl_GetCurrentPosition(), IDirectSoundBufferImpl_GetStatus(), IDirectSoundBufferImpl_Lock(), IDirectSoundBufferImpl_Play(), IDirectSoundBufferImpl_SetCurrentPosition(), IDirectSoundBufferImpl_SetFrequency(), IDirectSoundBufferImpl_SetPan(), IDirectSoundBufferImpl_SetVolume(), IDirectSoundBufferImpl_Stop(), IDirectSoundBufferImpl_Unlock(), LoadJobs(), LogfBackupFile(), LogfClearFile(), LogfReadEvents(), LogfWriteRecord(), LsapNotifyPolicyChange(), LsapRegisterNotification(), NetrJobAdd(), NetrJobDel(), NetrJobEnum(), NetrJobGetInfo(), primarybuffer_SetFormat(), RpcServerAssoc_ReleaseContextHandle(), SamrAddMemberToAlias(), SamrAddMemberToGroup(), SamrChangePasswordUser(), SamrCloseHandle(), SamrConnect5(), SamrCreateAliasInDomain(), SamrCreateGroupInDomain(), SamrCreateUser2InDomain(), SamrCreateUserInDomain(), SamrDeleteAlias(), SamrDeleteGroup(), SamrDeleteUser(), SamrEnumerateAliasesInDomain(), SamrEnumerateDomainsInSamServer(), SamrEnumerateGroupsInDomain(), SamrEnumerateUsersInDomain(), SamrGetAliasMembership(), SamrGetGroupsForUser(), SamrGetMembersInAlias(), SamrGetMembersInGroup(), SamrGetUserDomainPasswordInformation(), SamrLookupDomainInSamServer(), SamrLookupIdsInDomain(), SamrLookupNamesInDomain(), SamrOpenAlias(), SamrOpenDomain(), SamrOpenGroup(), SamrOpenUser(), SamrQueryDisplayInformation3(), SamrQueryInformationAlias(), SamrQueryInformationDomain2(), SamrQueryInformationGroup(), SamrQueryInformationUser2(), SamrQuerySecurityObject(), SamrRemoveMemberFromAlias(), SamrRemoveMemberFromForeignDomain(), SamrRemoveMemberFromGroup(), SamrSetInformationAlias(), SamrSetInformationDomain(), SamrSetInformationGroup(), SamrSetInformationUser2(), SamrSetMemberAttributesOfGroup(), SamrShutdownSamServer(), SchedServiceMain(), and ScmUnlockDatabase().

◆ RtlRemoteCall()

NTSYSAPI NTSTATUS NTAPI RtlRemoteCall ( _In_ HANDLE  Process,
_In_ HANDLE  Thread,
_In_ PVOID  CallSite,
_In_ ULONG  ArgumentCount,
_In_ PULONG  Arguments,
_In_ BOOLEAN  PassContext,
_In_ BOOLEAN  AlreadySuspended 
)

◆ RtlRemovePrivileges()

NTSYSAPI NTSTATUS NTAPI RtlRemovePrivileges ( _In_ HANDLE  TokenHandle,
_In_reads_opt_(PrivilegeCount) _When_(PrivilegeCount !=0, _Notnull_) PULONG  PrivilegesToKeep,
_In_ ULONG  PrivilegeCount 
)

Removes all privileges in the specified access token.

Parameters
[in]TokenHandleA handle to the access token that contains the privileges to be removed.
[in]PrivilegesToKeepA pointer to an array of privilege values (defined as SE_XXX_PRIVILEGE) that specify the privileges to keep in the token.
[in]PrivilegeCountSpecifies the number of entries in the PrivilegesToKeep array.
Returns
Returns STATUS_SUCCESS if privileges removed successfully. STATUS_INVALID_PARAMETER is returned if input privilege value greater than SE_MAX_WELL_KNOWN_PRIVILEGE. STATUS_NOT_ALL_ASSIGNED is returned if The token does not have one or more of the privileges specified in the PrivilegesToKeep parameter, and no privileges were removed. A failure NTSTATUS code is returned otherwise.

Definition at line 515 of file priv.c.

520{
522 UINT64 PrivilegesToKeepBitmap;
527
529
530 DPRINT("RtlRemovePrivileges(%p, %p, %u)\n", TokenHandle, PrivilegesToKeep, PrivilegeCount);
531
532 /* Save privileges that should be keep */
533 PrivilegesToKeepBitmap = 0;
534 if (PrivilegeCount)
535 {
536 for (i = 0; i < PrivilegeCount; i++)
537 {
538 if (PrivilegesToKeep[i] > SE_MAX_WELL_KNOWN_PRIVILEGE)
539 {
541 }
542 PrivilegesToKeepBitmap |= (1ULL << PrivilegesToKeep[i]);
543 }
544 }
545
546 /* Get token privileges information */
547 Status = ZwQueryInformationToken(TokenHandle,
549 Buffer,
550 sizeof(Buffer),
551 &ReturnLength);
552 if (!NT_SUCCESS(Status))
553 {
554 return Status;
555 }
556
557 /* Remove all privileges that we don't need to keep */
559 for (i = 0; i < Privileges->PrivilegeCount; i++)
560 {
561 LARGE_INTEGER Privilege = *(LARGE_INTEGER*)&Privileges->Privileges[i].Luid;
563 if (PrivilegesToKeepBitmap & (1ULL << Privilege.QuadPart))
564 {
565 PrivilegesToKeepBitmap &= ~(1ULL << Privilege.QuadPart);
566 }
567 else
568 {
569 Privileges->Privileges[i].Attributes = SE_PRIVILEGE_REMOVED;
570 }
571 }
572
573 if (PrivilegesToKeepBitmap)
574 {
576 }
577 else
578 {
580 FALSE,
582 sizeof(Buffer),
583 NULL,
584 NULL);
585 }
586
587 return Status;
588}
unsigned long long UINT64
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:43
#define SE_MIN_WELL_KNOWN_PRIVILEGE
Definition: security.c:655
#define SE_MAX_WELL_KNOWN_PRIVILEGE
Definition: security.c:685
_In_ ACCESS_MASK _In_ ULONG _Out_ PHANDLE TokenHandle
Definition: psfuncs.h:726
_Must_inspect_result_ NTSYSAPI NTSTATUS NTAPI ZwAdjustPrivilegesToken(_In_ HANDLE TokenHandle, _In_ BOOLEAN DisableAllPrivileges, _In_opt_ PTOKEN_PRIVILEGES NewState, _In_ ULONG BufferLength, _Out_writes_bytes_to_opt_(BufferLength, *ReturnLength) PTOKEN_PRIVILEGES PreviousState, _When_(PreviousState !=NULL, _Out_) PULONG ReturnLength)
#define STATUS_NOT_ALL_ASSIGNED
Definition: ntstatus.h:85
BOOL Privilege(LPTSTR pszPrivilege, BOOL bEnable)
Definition: user_lib.cpp:531
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
Definition: sefuncs.h:17
struct _TOKEN_PRIVILEGES TOKEN_PRIVILEGES
@ TokenPrivileges
Definition: setypes.h:968
struct _TOKEN_PRIVILEGES * PTOKEN_PRIVILEGES
#define SE_PRIVILEGE_REMOVED
Definition: setypes.h:64
unsigned char UCHAR
Definition: xmlstorage.h:181

Referenced by START_TEST().

◆ RtlResetRtlTranslations()

◆ RtlSecondsSince1970ToTime()

◆ RtlSelfRelativeToAbsoluteSD2()

NTSYSAPI NTSTATUS NTAPI RtlSelfRelativeToAbsoluteSD2 ( _Inout_ PSECURITY_DESCRIPTOR  SelfRelativeSD,
_Out_ PULONG  BufferSize 
)

◆ RtlSetAttributesSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlSetAttributesSecurityDescriptor ( _Inout_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ SECURITY_DESCRIPTOR_CONTROL  Control,
_Out_ PULONG  Revision 
)

◆ RtlSetControlSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlSetControlSecurityDescriptor ( _In_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ SECURITY_DESCRIPTOR_CONTROL  ControlBitsOfInterest,
_In_ SECURITY_DESCRIPTOR_CONTROL  ControlBitsToSet 
)

◆ RtlSetCurrentDirectory_U()

◆ RtlSetEnvironmentVariable()

◆ RtlSetIoCompletionCallback()

NTSYSAPI NTSTATUS NTAPI RtlSetIoCompletionCallback ( _In_ HANDLE  FileHandle,
_In_ PIO_APC_ROUTINE  Callback,
_In_ ULONG  Flags 
)

◆ RtlSetProcessIsCritical()

NTSYSAPI NTSTATUS __cdecl RtlSetProcessIsCritical ( _In_ BOOLEAN  NewValue,
_Out_opt_ PBOOLEAN  OldValue,
_In_ BOOLEAN  NeedBreaks 
)

◆ RtlSetSaclSecurityDescriptor()

NTSYSAPI NTSTATUS NTAPI RtlSetSaclSecurityDescriptor ( _Inout_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ BOOLEAN  SaclPresent,
_In_ PACL  Sacl,
_In_ BOOLEAN  SaclDefaulted 
)

◆ RtlSetSecurityDescriptorRMControl()

NTSYSAPI VOID NTAPI RtlSetSecurityDescriptorRMControl ( _Inout_ PSECURITY_DESCRIPTOR  SecurityDescriptor,
_In_ PUCHAR  RMControl 
)

◆ RtlSetSecurityObject()

NTSYSAPI NTSTATUS NTAPI RtlSetSecurityObject ( _In_ SECURITY_INFORMATION  SecurityInformation,
_In_ PSECURITY_DESCRIPTOR  ModificationDescriptor,
_Out_ PSECURITY_DESCRIPTOR ObjectsSecurityDescriptor,
_In_ PGENERIC_MAPPING  GenericMapping,
_In_ HANDLE  Token 
)

◆ RtlSetThreadIsCritical()

NTSYSAPI NTSTATUS __cdecl RtlSetThreadIsCritical ( _In_ BOOLEAN  NewValue,
_Out_opt_ PBOOLEAN  OldValue,
_In_ BOOLEAN  NeedBreaks 
)

Referenced by _main(), SmpApiLoop(), and WinMain().

◆ RtlSetThreadPoolStartFunc()

NTSTATUS NTAPI RtlSetThreadPoolStartFunc ( _In_ PRTL_START_POOL_THREAD  StartPoolThread,
_In_ PRTL_EXIT_POOL_THREAD  ExitPoolThread 
)

Referenced by DllMain().

◆ RtlSetTimeZoneInformation()

NTSYSAPI NTSTATUS NTAPI RtlSetTimeZoneInformation ( _In_ PRTL_TIME_ZONE_INFORMATION  TimeZoneInformation)

Referenced by SetTimeZoneInformation().

◆ RtlSizeHeap()

◆ RtlSleepConditionVariableCS()

NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableCS ( _Inout_ PRTL_CONDITION_VARIABLE  ConditionVariable,
_Inout_ PRTL_CRITICAL_SECTION  CriticalSection,
_In_opt_ PLARGE_INTEGER  TimeOut 
)

◆ RtlSleepConditionVariableSRW()

NTSYSAPI NTSTATUS NTAPI RtlSleepConditionVariableSRW ( _Inout_ PRTL_CONDITION_VARIABLE  ConditionVariable,
_Inout_ PRTL_SRWLOCK  SRWLock,
_In_opt_ PLARGE_INTEGER  TimeOut,
_In_ ULONG  Flags 
)

◆ RtlSubAuthorityCountSid()

NTSYSAPI PUCHAR NTAPI RtlSubAuthorityCountSid ( _In_ PSID  Sid)

◆ RtlSubAuthoritySid()

◆ RtlSystemTimeToLocalTime()

NTSYSAPI NTSTATUS NTAPI RtlSystemTimeToLocalTime ( _In_ PLARGE_INTEGER  SystemTime,
_Out_ PLARGE_INTEGER  LocalTime 
)

Referenced by MsvpCheckLogonHours().

◆ RtlTimeToTimeFields()

NTSYSAPI VOID NTAPI RtlTimeToTimeFields ( PLARGE_INTEGER  Time,
PTIME_FIELDS  TimeFields 
)

◆ RtlTryEnterCriticalSection()

NTSYSAPI BOOLEAN NTAPI RtlTryEnterCriticalSection ( _In_ PRTL_CRITICAL_SECTION  CriticalSection)

◆ RtlUnicodeStringToAnsiString()

NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString ( PANSI_STRING  DestinationString,
PCUNICODE_STRING  SourceString,
BOOLEAN  AllocateDestinationString 
)

◆ RtlUnicodeStringToOemString()

◆ RtlUnicodeToMultiByteN()

NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteN ( PCHAR  MbString,
ULONG  MbSize,
PULONG  ResultSize,
PCWCH  UnicodeString,
ULONG  UnicodeSize 
)

◆ RtlUnicodeToMultiByteSize()

NTSYSAPI NTSTATUS NTAPI RtlUnicodeToMultiByteSize ( PULONG  MbSize,
PCWCH  UnicodeString,
ULONG  UnicodeSize 
)

◆ RtlUnicodeToOemN()

NTSYSAPI NTSTATUS NTAPI RtlUnicodeToOemN ( PCHAR  OemString,
ULONG  OemSize,
PULONG  ResultSize,
PCWCH  UnicodeString,
ULONG  UnicodeSize 
)

◆ RtlUniform()

◆ RtlUnwind()

NTSYSAPI VOID NTAPI RtlUnwind ( _In_opt_ PVOID  TargetFrame,
_In_opt_ PVOID  TargetIp,
_In_opt_ PEXCEPTION_RECORD  ExceptionRecord,
_In_ PVOID  ReturnValue 
)

Definition at line 918 of file unwind.c.

923{
925
926 RtlUnwindEx(TargetFrame,
927 TargetIp,
928 ExceptionRecord,
930 &Context,
931 NULL);
932}
UINT32 void void ** ReturnValue
Definition: acevents.h:216
VOID NTAPI RtlUnwindEx(_In_opt_ PVOID TargetFrame, _In_opt_ PVOID TargetIp, _In_opt_ PEXCEPTION_RECORD ExceptionRecord, _In_ PVOID ReturnValue, _In_ PCONTEXT ContextRecord, _In_opt_ struct _UNWIND_HISTORY_TABLE *HistoryTable)
Definition: unwind.c:875

Referenced by _local_unwind(), and _SEH2GlobalUnwind().

◆ RtlUpcaseUnicodeChar()

NTSYSAPI WCHAR NTAPI RtlUpcaseUnicodeChar ( WCHAR  Source)

◆ RtlUpcaseUnicodeString()

◆ RtlUpcaseUnicodeStringToOemString()

NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeStringToOemString ( POEM_STRING  DestinationString,
PCUNICODE_STRING  SourceString,
BOOLEAN  AllocateDestinationString 
)

◆ RtlUpcaseUnicodeToMultiByteN()

NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToMultiByteN ( PCHAR  MbString,
ULONG  MbSize,
PULONG  ResultSize,
PCWCH  UnicodeString,
ULONG  UnicodeSize 
)

◆ RtlUpcaseUnicodeToOemN()

NTSYSAPI NTSTATUS NTAPI RtlUpcaseUnicodeToOemN ( PCHAR  OemString,
ULONG  OemSize,
PULONG  ResultSize,
PCWCH  UnicodeString,
ULONG  UnicodeSize 
)

◆ RtlUpdateTimer()

NTSYSAPI NTSTATUS NTAPI RtlUpdateTimer ( _In_ HANDLE  TimerQueue,
_In_ HANDLE  Timer,
_In_ ULONG  DueTime,
_In_ ULONG  Period 
)

Referenced by ChangeTimerQueueTimer().

◆ RtlUpperChar()

NTSYSAPI CHAR NTAPI RtlUpperChar ( CHAR  Source)

◆ RtlValidAcl()

◆ RtlValidateUnicodeString()

NTSYSAPI NTSTATUS NTAPI RtlValidateUnicodeString ( _In_ ULONG  Flags,
_In_ PCUNICODE_STRING  String 
)

Definition at line 2605 of file unicode.c.

2608{
2609 /* In Windows <= 2003 no flags are supported yet! */
2610 if (Flags != 0)
2612
2613 /* NOTE: a NULL Unicode string pointer is considered to be a valid one! */
2614 if (String == NULL)
2615 {
2616 return STATUS_SUCCESS;
2617 }
2618 else if (!((String->Buffer == NULL) && (String->Length != 0 || String->MaximumLength != 0)) &&
2619 (String->Length % sizeof(WCHAR) == 0) &&
2620 (String->MaximumLength % sizeof(WCHAR) == 0) &&
2621 (String->Length <= String->MaximumLength))
2622 {
2623 return STATUS_SUCCESS;
2624 }
2625 else
2626 {
2628 }
2629}
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170

Referenced by LsaApLogonUserEx2(), LsapSetLogonSessionData(), MsvpChangePassword(), NtlmFixupAndValidateUStr(), SeReportSecurityEvent(), and START_TEST().

◆ RtlValidSecurityDescriptor()

NTSYSAPI BOOLEAN NTAPI RtlValidSecurityDescriptor ( IN PSECURITY_DESCRIPTOR  SecurityDescriptor)

Definition at line 1054 of file sd.c.

1055{
1057 PSID Owner, Group;
1058 PACL Sacl, Dacl;
1060
1061 _SEH2_TRY
1062 {
1063 /* Fail on bad revisions */
1065
1066 /* Owner SID must be valid if present */
1068 if ((Owner) && (!RtlValidSid(Owner))) _SEH2_YIELD(return FALSE);
1069
1070 /* Group SID must be valid if present */
1072 if ((Group) && (!RtlValidSid(Group))) _SEH2_YIELD(return FALSE);
1073
1074 /* DACL must be valid if present */
1076 if ((Dacl) && (!RtlValidAcl(Dacl))) _SEH2_YIELD(return FALSE);
1077
1078 /* SACL must be valid if present */
1080 if ((Sacl) && (!RtlValidAcl(Sacl))) _SEH2_YIELD(return FALSE);
1081 }
1083 {
1084 /* Access fault, bail out */
1085 _SEH2_YIELD(return FALSE);
1086 }
1087 _SEH2_END;
1088
1089 /* All good */
1090 return TRUE;
1091}
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL Dacl
Definition: rtlfuncs.h:1605
_In_opt_ PSID Group
Definition: rtlfuncs.h:1658
NTSYSAPI BOOLEAN NTAPI RtlValidAcl(PACL Acl)
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1609
NTSYSAPI BOOLEAN NTAPI RtlValidSid(IN PSID Sid)
Definition: sid.c:21
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL Sacl
Definition: rtlfuncs.h:1607
FORCEINLINE PSID SepGetOwnerFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:109
FORCEINLINE PSID SepGetGroupFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:89
FORCEINLINE PACL SepGetDaclFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:129
FORCEINLINE PACL SepGetSaclFromDescriptor(_Inout_ PSECURITY_DESCRIPTOR _Descriptor)
Definition: se.h:151
#define _SEH2_YIELD(__stmt)
Definition: pseh2_64.h:168
_In_ USHORT _In_ ULONG _In_ PSOCKADDR _In_ PSOCKADDR _Reserved_ ULONG _In_opt_ PVOID _In_opt_ const WSK_CLIENT_CONNECTION_DISPATCH _In_opt_ PEPROCESS _In_opt_ PETHREAD _In_opt_ PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: wsk.h:191
struct _SECURITY_DESCRIPTOR * PISECURITY_DESCRIPTOR
#define SECURITY_DESCRIPTOR_REVISION
Definition: setypes.h:58

Referenced by IsValidSecurityDescriptor(), LsarSetSecurityObject(), RSetServiceObjectSecurity(), SamrSetSecurityObject(), and UDFReadSecurity().

◆ RtlValidSid()

NTSYSAPI BOOLEAN NTAPI RtlValidSid ( IN PSID  Sid)

Definition at line 21 of file sid.c.

22{
23 PISID Sid = Sid_;
25
26 /* Use SEH in case any pointer is invalid */
28 {
29 /* Validate the revision and subauthority count */
30 if ((Sid) &&
31 (((Sid->Revision & 0xF) != SID_REVISION) ||
33 {
34 /* It's not, fail */
35 _SEH2_YIELD(return FALSE);
36 }
37 }
39 {
40 /* Access violation, SID is not valid */
41 _SEH2_YIELD(return FALSE);
42 }
44
45 /* All good */
46 return TRUE;
47}
BYTE Revision
Definition: ms-dtyp.idl:199
#define SID_MAX_SUB_AUTHORITIES
Definition: setypes.h:482
#define SID_REVISION
Definition: setypes.h:481

Referenced by CheckSid__(), CmpHiveRootSecurityDescriptor(), ConvertSidToStringSidW(), IsValidSid(), LsarAddAccountRights(), LsarCreateAccount(), LsarOpenAccount(), LsarRemoveAccountRights(), pSetSecurityInfoCheck(), RtlConvertSidToUnicodeString(), RtlpAddKnownAce(), RtlpAddKnownObjectAce(), RtlpSetSecurityObject(), RtlValidRelativeSecurityDescriptor(), RtlValidSecurityDescriptor(), SeCaptureSecurityDescriptor(), SeCaptureSidAndAttributesArray(), SeReportSecurityEvent(), and TestsSeQueryInformationToken().

◆ RtlWakeAllConditionVariable()

NTSYSAPI VOID NTAPI RtlWakeAllConditionVariable ( _Inout_ PRTL_CONDITION_VARIABLE  ConditionVariable)

◆ RtlWakeConditionVariable()

NTSYSAPI VOID NTAPI RtlWakeConditionVariable ( _Inout_ PRTL_CONDITION_VARIABLE  ConditionVariable)

Referenced by WakeConditionVariable().

◆ RtlWalkFrameChain()

NTSYSAPI ULONG NTAPI RtlWalkFrameChain ( _Out_writes_(Count -(Flags > > RTL_STACK_WALKING_MODE_FRAMES_TO_SKIP_SHIFT)) PVOID Callers,
_In_ ULONG  Count,
_In_ ULONG  Flags 
)

◆ RtlxAnsiStringToUnicodeSize()

NTSYSAPI ULONG NTAPI RtlxAnsiStringToUnicodeSize ( PCANSI_STRING  AnsiString)

◆ RtlxOemStringToUnicodeSize()

NTSYSAPI ULONG NTAPI RtlxOemStringToUnicodeSize ( IN PCOEM_STRING  OemString)

Definition at line 2124 of file unicode.c.

2125{
2126 ULONG Size;
2127
2128 /* Convert the Mb String to Unicode Size */
2130 OemString->Buffer,
2131 OemString->Length);
2132
2133 /* Return the size + null-char */
2134 return (Size + sizeof(WCHAR));
2135}
_Use_decl_annotations_ NTSTATUS NTAPI RtlMultiByteToUnicodeSize(_Out_ PULONG UnicodeSize, _In_ PCCH MbString, _In_ ULONG MbSize)
Definition: nlsboot.c:93
*BytesInOemString PCHAR OemString
Definition: rtlfuncs.h:1577

◆ RtlxUnicodeStringToAnsiSize()

NTSYSAPI ULONG NTAPI RtlxUnicodeStringToAnsiSize ( IN PCUNICODE_STRING  UnicodeString)

Definition at line 2177 of file unicode.c.

2178{
2179 ULONG Size;
2181
2182 ASSERT(!(UnicodeString->Length & 1));
2183
2184 /* Convert the Unicode String to Mb Size */
2186 UnicodeString->Buffer,
2187 UnicodeString->Length);
2188
2189 /* Return the size + null-char */
2190 return (Size + sizeof(CHAR));
2191}
_Use_decl_annotations_ NTSTATUS NTAPI RtlUnicodeToMultiByteSize(_Out_ PULONG MbSize, _In_ PCWCH UnicodeString, _In_ ULONG UnicodeSize)
Definition: nlsboot.c:145

Referenced by RtlUnicodeStringToAnsiString(), and START_TEST().

◆ RtlxUnicodeStringToOemSize()

NTSYSAPI ULONG NTAPI RtlxUnicodeStringToOemSize ( IN PCUNICODE_STRING  UnicodeString)

Definition at line 1091 of file unicode.c.

1092{
1093 ULONG Size;
1094
1095 /* Convert the Unicode String to Mb Size */
1097 UnicodeString->Buffer,
1098 UnicodeString->Length);
1099
1100 /* Return the size + the null char */
1101 return (Size + sizeof(CHAR));
1102}

Referenced by Ext2UnicodeToOEMSize(), and START_TEST().

Variable Documentation

◆ AbsoluteSecurityDescriptor

◆ AbsoluteSecurityDescriptorSize

_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG AbsoluteSecurityDescriptorSize

Definition at line 1604 of file rtlfuncs.h.

◆ AccessMask

Definition at line 1143 of file rtlfuncs.h.

◆ AceFlags

_In_ ULONG _In_ ULONG AceFlags

Definition at line 1154 of file rtlfuncs.h.

◆ AllocateDestinationString

◆ Base

Definition at line 2451 of file rtlfuncs.h.

Referenced by _Function_class_(), AcpiExConvertToAscii(), AcpiExConvertToString(), AcpiExDigitsNeeded(), AcpiUtExplicitStrtoul64(), AcpiUtFormatNumber(), AcpiUtInsertDigit(), AcpiUtPutNumber(), AcpiUtStrtoul64(), AcpiUtStrtoulMultiply64(), BuildPath(), CheckSize(), CRYPT_AsnDecodeExcludedSubtree(), CRYPT_AsnDecodePermittedSubtree(), CRYPT_AsnDecodeSubtree(), CustomBaseAllocation(), DbgLoadImageSymbols(), DbgUnLoadImageSymbols(), DetectParallelPorts(), DetectSerialPointerPeripheral(), DetectSerialPorts(), Dns_PtrArrayToOffsetArray(), DumpBase(), DumpExFat(), DumpFat(), DumpNtfs(), ExpAllocateLowLevelTable(), Ext2AddMcbExtent(), Ext2ExpandBlock(), Ext2ExpandIndirect(), Ext2ExpandLast(), Ext2GetBlock(), Ext2MapIndirect(), Ext2RemoveMcbExtent(), Ext2TruncateBlock(), Ext2TruncateIndirect(), FAST486_OPCODE_HANDLER(), FindEntry(), FindIoDescriptor(), FixList(), FixupDll(), FltEnumerateVolumes(), GetNlsSectionName(), HaliScanForMPConfigTable(), IOAPICRead(), IOAPICWrite(), IsValidNumericString(), KdpDeleteBreakpointRange(), KeAddSystemServiceTable(), KeRemoveSystemServiceTable(), KeSetBaseGdtSelector(), KiInitGdtEntry(), KiSetGdtDescriptorBase(), KiSetGdtEntry(), KiSetGdtEntryEx(), LdrpCheckForLoadedDllHandle(), LlbEnvGetMemoryInformation(), LlbEnvGetRamDiskInformation(), LlbHwBuildMemoryMap(), LlbHwLoadOsLoaderFromRam(), LpcGetIoBase(), LpcGetIoBaseMPU(), LsapFreeHeap(), main(), match_mod(), MiCheckSecuredVad(), MiFillSystemPageDirectory(), MiFindEmptyAddressRangeDownBasedTree(), MiFindEmptyAddressRangeDownTree(), MiFindEmptyAddressRangeInTree(), MiInsertInSystemSpace(), MiLoadImageSection(), MiMapViewInSystemSpace(), MiRemoveFromSystemSpace(), MmBuildMdlForNonPagedPool(), MmCommitSessionMappedView(), MmCreateMdl(), MmFreePagesFromMdl(), MmMapLockedPagesSpecifyCache(), MmProbeAndLockPages(), MmSizeOfMdl(), MmUnlockPages(), MmUnmapLockedPages(), MmUnmapReservedMapping(), MockMmCreateMdl(), modify_dword_dlgproc(), MPChecksum(), NdisReadConfiguration(), NICTestRAM(), NvGetBytesPerPixel(), NvGetCrtc(), PciBridgeIoBase(), PciBridgePrefetchMemoryBase(), PciSize(), PdoGetRangeLength(), PdoQueryResourceRequirements(), PdoQueryResources(), PnpDecodeFixedMemory(), PPBridge_SaveCurrentSettings(), PspIsDescriptorValid(), Rs232PortInUse(), RtlImageNtHeader(), RtlImageNtHeaderEx(), RtlInt64ToUnicodeString(), RtlIntegerToUnicode(), RtlIntegerToUnicodeString(), RtlLargeIntegerToChar(), RtlpDphAllocateVm(), RtlpDphFreeVm(), RtlpDphGrowVirtual(), RtlpDphProtectVm(), RtlpDphSetProtectionBeforeUse(), RtlpImageNtHeaderEx(), RtlpPageHeapCreate(), RtlpSecMemFreeVirtualMemory(), RtlpStringToUlong(), RtlpStringToUlongBase(), SimpleAllocation(), SimpleErrorChecks(), StressTesting(), strtoul(), SumBase(), SumExFat(), SumFat(), SumNtfs(), SystemProcessTestWorker(), test_pack_IMAGE_EXPORT_DIRECTORY(), VfatCommonRead(), VfatWrite(), VidInitialize(), vsnprintf(), and WriteProcessMemory().

◆ BufferLength

◆ BytesInMultiByteString

*BytesInMultiByteString PCHAR _In_ ULONG _Out_opt_ PULONG BytesInMultiByteString

Definition at line 2587 of file rtlfuncs.h.

Referenced by EngMultiByteToWideChar(), and EngWideCharToMultiByte().

◆ BytesInOemString

*BytesInOemString PCHAR _In_ ULONG _Out_opt_ PULONG BytesInOemString

Definition at line 2049 of file rtlfuncs.h.

◆ BytesInUnicodeString

_In_ ULONG _Out_opt_ PULONG _In_ ULONG BytesInUnicodeString

Definition at line 2047 of file rtlfuncs.h.

◆ CaseInsensitive

◆ CaseInSensitive

◆ CodePageTable

◆ CompressedBufferSize

_In_ ULONG _In_ ULONG CompressedBufferSize

Definition at line 3294 of file rtlfuncs.h.

Referenced by RtlCompressBuffer(), and RtlDecompressBuffer().

◆ ConditionMask

_In_ ULONG _In_ ULONGLONG ConditionMask

Definition at line 4687 of file rtlfuncs.h.

Referenced by RtlpVerGetCondition(), RtlVerifyVersionInfo(), and VerSetConditionMask().

◆ Context

◆ Dacl

Definition at line 1605 of file rtlfuncs.h.

Referenced by _IRQL_requires_max_(), AccessCheckEmptyMappingTest(), AccessGrantedMultipleObjectsTests(), AccessGrantedTests(), AllowDesktopAccessToUser(), AllowWinstaAccessToUser(), BuildUserInfoBuffer(), ChangeUserDacl(), CheckDirectorySecurity__(), CheckKeySecurity__(), CheckTokenMembership(), CmpQuerySecurityDescriptor(), CreateApplicationDesktopSecurity(), CreateBaseAcls(), CreateDefaultProcessSecurityCommon(), CreateDefaultSecurityDescriptor(), CreateDeviceSecurityDescriptor(), CreateDhcpPipeSecurity(), CreateNewDefaultDacl(), CreateNlsDirectorySecurity(), CreateNlsSecurityDescriptor(), CreatePnpInstallEventSecurity(), CreatePowrProfSemaphoreSecurity(), CreateScreenSaverSecurity(), CreateWinlogonDesktopSecurity(), CreateWinstaSecurity(), CSR_API(), CsrCreateLocalSystemSD(), CsrSetProcessSecurity(), DenyAccessTests(), FreeDosDevicesProtection(), GetAccountFlags(), GetDosDevicesProtection(), GetUserDacl(), GrantedAccessTests(), IEffectivePermission_fnGetEffectivePermission(), IoCreateDevice(), IopCreateDefaultDeviceSecurityDescriptor(), IopCreateSecurityDescriptorPerType(), LsapAddTokenDefaultDacl(), LsapCreateAccountSd(), LsapCreatePolicySd(), LsapCreateSecretSd(), LsapCreateTokenSd(), MiCreateMemoryEvent(), NtCreatePagingFile(), ObpCreateKernelObjectsSD(), ObpFreeDosDevicesProtection(), ObpGetDosDevicesProtection(), PrintFileDacl(), QueryOriginalDefaultDacl(), QueryTokenDefaultDaclTests(), ReloadPrincipalsList(), RtlCopySecurityDescriptor(), RtlGetDaclSecurityDescriptor(), RtlLengthSecurityDescriptor(), RtlMakeSelfRelativeSD(), RtlpQuerySecurityDescriptor(), RtlpSysVolCheckOwnerAndSecurity(), RtlpSysVolCreateSecurityDescriptor(), RtlSelfRelativeToAbsoluteSD(), RtlSetDaclSecurityDescriptor(), RtlValidRelativeSecurityDescriptor(), RtlValidSecurityDescriptor(), SampCreateAccountDomainSD(), SampCreateAliasSD(), SampCreateBuiltinDomainSD(), SampCreateGroupSD(), SampCreateServerSD(), SampCreateUserSD(), SeFastTraverseCheck(), SepAccessCheckWorker(), SepAnalyzeAcesFromDacl(), SepCreateImpersonationTokenDacl(), SepDumpSdDebugInfo(), SepInitializationPhase1(), SepOpenThreadToken(), SeSetWorldSecurityDescriptor(), SetUserInfo(), test_pack_SECURITY_DESCRIPTOR(), test_pack_SECURITY_DESCRIPTOR_RELATIVE(), test_token_attr(), TestSeAssignSecurity(), and TiCreateSecurityDescriptor().

◆ DaclDefaulted

◆ DaclPresent

◆ DaclSize

◆ Destination

static void Destination

Definition at line 3016 of file rtlfuncs.h.

Referenced by __movsb(), __movsd(), __movsw(), __sidt(), _InterlockedCompareExchange(), _InterlockedCompareExchange16(), _InterlockedCompareExchange64(), _InterlockedCompareExchange8(), _InterlockedCompareExchangePointer(), _sgdt(), _When_(), AcpiRsConvertAmlToResource(), AcpiRsConvertResourceToAml(), AcpiRsMoveData(), AcpiRsStrcpy(), ApphelpDuplicateUnicodeString(), CdConvertBigToLittleEndian(), CheckBufferRead(), CheckBufferReadWrite(), CmpCopyCompressedName(), CmpCopyName(), ControlClass(), CopyResourceList(), DcCopyPacket(), Dns_StringCopy(), DuplicateString(), DuplicateUnicodeString(), ExpandEnvironmentStringsW(), FAST486_OPCODE_HANDLER(), file_Copy(), file_Move(), filesys_CopyFile(), filesys_CopyFolder(), filesys_MoveFile(), filesys_MoveFolder(), FlatBuf_Arg_CopyMemory(), FlatBuf_Arg_WriteString(), FxDuplicateUnicodeString(), GetIndexEntryVCN(), GreenPnp(), IntCloneMenuItems(), InterlockedCompareExchange(), InterlockedExchange(), InternalSetResidentAttributeLength(), KdpMoveMemory(), KdpZeroMemory(), LISTVIEW_FindItemW(), LpcpMoveMessage(), MemFastMoveMemory(), MmInitializeProcessAddressSpace(), NdisCopyFromPacketToPacket(), NdisCopyFromPacketToPacketSafe(), NtProcessStartup(), NvNetCopyPacket(), PrintRoutes(), QueryStringCallback(), RamdiskReadWriteReal(), RouteGetRouteToDestination(), RouterGetRoute(), RtlAppendAsciizToString(), RtlAppendStringToString(), RtlAppendUnicodeStringToString(), RtlAppendUnicodeToString(), RtlCopyMappedMemory(), RtlCreateUnicodeStringFromAsciiz(), RtlExpandEnvironmentStrings_U(), RtlFillMemory(), RtlFillMemoryUlong(), RtlInterlockedCompareExchange64(), RtlMoveMemory(), RtlpCallQueryRegistryRoutine(), RtlpCopyParameterString(), RtlpSafeCopyMemory(), RtlUpperChar(), RtlZeroMemory(), ScsiPortMoveMemory(), SerenumInitMultiSzString(), SetIndexEntryVCN(), SetResidentAttributeDataLength(), SetupDiSetDeviceInstallParamsW(), SmLookupSubsystem(), SmpInvokeAutoChk(), StorPortMoveMemory(), and WriteAttribute().

◆ DestinationString

◆ Directory

Definition at line 3951 of file rtlfuncs.h.

◆ dwAceRevision

◆ ElapsedSeconds

_Out_ PULONG ElapsedSeconds

Definition at line 4657 of file rtlfuncs.h.

Referenced by RtlTimeToElapsedTimeFields().

◆ EntryContext

◆ Environment

◆ FinalUncompressedSize

_In_ ULONG _In_ ULONG _Out_ PULONG FinalUncompressedSize

Definition at line 3295 of file rtlfuncs.h.

Referenced by RtlDecompressBuffer().

◆ Group

◆ GroupDefaulted

◆ Handle

Definition at line 3922 of file rtlfuncs.h.

◆ IdentifierAuthority

◆ Index

Definition at line 3921 of file rtlfuncs.h.

◆ Length

◆ MappedAsImage

_In_ BOOLEAN MappedAsImage

◆ MaxBytesInUnicodeString

_In_ ULONG MaxBytesInUnicodeString

Definition at line 2046 of file rtlfuncs.h.

◆ NameContainsSpaces

◆ OemName

Definition at line 3101 of file rtlfuncs.h.

◆ Owner

Definition at line 1609 of file rtlfuncs.h.

Referenced by $if(), _IRQL_requires_max_(), BaseControlWindowImpl_get_Owner(), BaseControlWindowImpl_put_Owner(), CcSetBcbOwnerPointer(), CheckDirectorySecurity__(), CheckKeySecurity__(), CmpAcquireKcbLockExclusiveByIndex(), CmpQuerySecurityDescriptor(), CmpReleaseTwoKcbLockByKey(), co_IntFindChildWindowToOwner(), FxTagTracker::CreateAndInitialize(), ExAcquireResourceSharedLite(), ExAcquireSharedStarveExclusive(), ExAcquireSharedWaitForExclusive(), ExIsResourceAcquiredSharedLite(), ExpExpandResourceOwnerTable(), ExpFindEntryForThread(), ExpFindFreeEntry(), ExpWaitForResource(), ExReinitializeResourceLite(), ExReleaseResourceForThreadLite(), ExSetResourceOwnerPointer(), FxMdlAllocate(), FxMdlAllocateDebug(), IntCreateWindow(), IntFindChildWindowToOwner(), IntValidateOwnerDepth(), LsarSetSecurityObject(), QueryTokenOwnerTests(), RSetServiceObjectSecurity(), RtlAddRange(), RtlCopySecurityDescriptor(), RtlDeleteOwnersRanges(), RtlDeleteRange(), RtlGetOwnerSecurityDescriptor(), RtlLengthSecurityDescriptor(), RtlMakeSelfRelativeSD(), RtlpQuerySecurityDescriptor(), RtlSelfRelativeToAbsoluteSD(), RtlSetOwnerSecurityDescriptor(), RtlValidRelativeSecurityDescriptor(), RtlValidSecurityDescriptor(), SamrSetSecurityObject(), SepCreateSystemProcessToken(), SepCreateToken(), SepPropagateAcl(), SepSelectAcl(), SetupCommitFileQueueW(), test_pack_SECURITY_DESCRIPTOR(), test_pack_SECURITY_DESCRIPTOR_RELATIVE(), test_pack_TOKEN_OWNER(), TestSeAssignSecurity(), TestSharedFlag(), TestStartEqualsEnd(), UserDestroyObjectsForOwner(), VideoWindow_get_Owner(), VideoWindow_put_Owner(), and WinPosDoOwnedPopups().

◆ OwnerDefaulted

◆ OwnerSize

◆ Path

_In_ PCWSTR Path

Definition at line 4185 of file rtlfuncs.h.

◆ PrimaryGroup

◆ PrimaryGroupSize

◆ pSid

Definition at line 1156 of file rtlfuncs.h.

◆ QueryTable

◆ RequiredInformation

_In_ ULONG _In_ SECURITY_INFORMATION RequiredInformation

Definition at line 1727 of file rtlfuncs.h.

Referenced by RtlValidRelativeSecurityDescriptor().

◆ Revision

◆ Sacl

◆ SaclSize

◆ SecurityDescriptorLength

_In_ ULONG SecurityDescriptorLength

◆ SelfRelativeSecurityDescriptor

Definition at line 1132 of file rtlfuncs.h.

Referenced by RtlAbsoluteToSelfRelativeSD().

◆ Sid

Definition at line 1144 of file rtlfuncs.h.

Referenced by AccpCalcNeededAceSize(), AccRewriteGetExplicitEntriesFromAcl(), AceHeaderToSID(), AddPrincipalToList(), BuildTokenGroups(), CheckSid__(), CmpHiveRootSecurityDescriptor(), ComputeStringSidSize(), ConvertSidToStringSidA(), ConvertSidToStringSidW(), ConvertStringSidToSidA(), ConvertStringSidToSidW(), CreateWellKnownSid(), DetermineSIDSize(), DumpSid(), FindSidInPrincipalsListAddAce(), GetAccountDomainSid(), GetBuiltinDomainSid(), GetNtAuthorityDomainSid(), GetUserAndDomainName(), InitializeSid(), InstallPrivileges(), IsWellKnownSid(), LookupAccountNameA(), LookupAccountNameW(), LsapAddAuthorityToDomainsList(), LsapAddDomainToDomainsList(), LsapAppendSidToGroups(), LsapCreateRandomDomainSid(), LsapGetRelativeIdFromSid(), LsapIsPrefixSid(), LsapLookupAccountNames(), LsapLookupBuiltinNames(), LsapLookupFullyQualifiedWellKnownNames(), LsapLookupIsolatedAccountNames(), LsapLookupIsolatedBuiltinNames(), LsapLookupIsolatedNames(), LsapLookupWellKnownSid(), LsapSetLogonSessionData(), LsarEnumerateAccountsWithUserRight(), NtQueryInformationToken(), PrintFileDacl(), ReloadPrincipalsList(), RtlAddAccessAllowedAce(), RtlAddAccessAllowedAceEx(), RtlAddAccessAllowedObjectAce(), RtlAddAccessDeniedAce(), RtlAddAccessDeniedAceEx(), RtlAddAccessDeniedObjectAce(), RtlAddAuditAccessAce(), RtlAddAuditAccessAceEx(), RtlAddAuditAccessObjectAce(), RtlAllocateAndInitializeSid(), RtlConvertSidToUnicodeString(), RtlCopySidAndAttributesArray(), RtlDefaultNpAcl(), RtlFormatCurrentUserKeyPath(), RtlFreeSid(), RtlIdentifierAuthoritySid(), RtlInitializeSid(), RtlLengthSid(), RtlLengthSidAndAttributes(), RtlpAddKnownAce(), RtlpAddKnownObjectAce(), RtlSubAuthorityCountSid(), RtlSubAuthoritySid(), RtlValidAcl(), RtlValidSid(), RtlxAddAuditAccessAceEx(), RtlxAddMandatoryLabelAceEx(), SampGetRidFromSid(), ScAllocateAndInitializeSid(), ScCreateWellKnownSids(), SeCaptureSidAndAttributesArray(), SepAnalyzeAcesFromDacl(), SepCaptureSid(), SepCreateSystemAnonymousLogonToken(), SepCreateSystemProcessToken(), SepCreateToken(), SepGetSidFromAce(), SepPropagateAcl(), SepSidInToken(), SepSidInTokenEx(), SepTokenIsOwner(), SeQueryInformationToken(), SeReportSecurityEvent(), SeValidSecurityDescriptor(), SidLookupCompletion(), SidToUserName(), START_TEST(), test_LsaLookupNames2(), test_pack_SID_AND_ATTRIBUTES(), and VCheckAcl__().

◆ Size

Definition at line 3952 of file rtlfuncs.h.

◆ Source

Definition at line 2429 of file rtlfuncs.h.

◆ SourceLuid

_In_ PLUID SourceLuid

Definition at line 1328 of file rtlfuncs.h.

◆ SourceSid

_In_ PSID SourceSid

Definition at line 1370 of file rtlfuncs.h.

Referenced by ScDomainIdToSid().

◆ SourceString

◆ String2

◆ SubAuthorityCount

◆ Time

Definition at line 4648 of file rtlfuncs.h.

◆ TypeMask

_In_ ULONG TypeMask

Definition at line 4686 of file rtlfuncs.h.

Referenced by RtlpVerGetCondition(), RtlVerifyVersionInfo(), and VerSetConditionMask().

◆ UncompressedBufferSize

_In_ ULONG UncompressedBufferSize

Definition at line 3292 of file rtlfuncs.h.

Referenced by RtlCompressBuffer(), and RtlDecompressBuffer().

◆ UnicodeString

Definition at line 2045 of file rtlfuncs.h.

◆ Value

Definition at line 2452 of file rtlfuncs.h.

◆ ValueLength

◆ ValueName

Definition at line 4232 of file rtlfuncs.h.

◆ ValueType

Definition at line 4233 of file rtlfuncs.h.