Process Hacker
|
#include <ntwin.h>
#include <ntbasic.h>
#include <phnt.h>
#include <phsup.h>
#include <ref.h>
#include <fastlock.h>
#include <queuedlock.h>
Go to the source code of this file.
Data Structures | |
struct | _PH_EVENT |
A fast event object. More... | |
struct | _PH_BARRIER |
struct | _PH_RUNDOWN_PROTECT |
struct | _PH_RUNDOWN_WAIT_BLOCK |
struct | _PH_INITONCE |
struct | _PH_STRINGREF |
struct | _PH_BYTESREF |
struct | _PH_RELATIVE_BYTESREF |
struct | _PH_STRING |
A 16-bit string object, which supports UTF-16. More... | |
struct | _PH_BYTES |
An 8-bit string object, which supports ASCII, UTF-8 and Windows multi-byte encodings, as well as binary data. More... | |
struct | _PH_UNICODE_DECODER |
struct | _PH_STRING_BUILDER |
A string builder structure. More... | |
struct | _PH_BYTES_BUILDER |
A byte string builder structure. More... | |
struct | _PH_LIST |
A list structure. More... | |
struct | _PH_POINTER_LIST |
A pointer list structure. More... | |
struct | _PH_HASH_ENTRY |
struct | _PH_HASHTABLE_ENTRY |
struct | _PH_HASHTABLE |
A hashtable structure. More... | |
struct | _PH_HASHTABLE_ENUM_CONTEXT |
struct | _PH_KEY_VALUE_PAIR |
struct | _PH_FREE_LIST |
struct | _PH_FREE_LIST_ENTRY |
struct | _PH_CALLBACK_REGISTRATION |
A callback registration structure. More... | |
struct | _PH_CALLBACK |
A callback structure. More... | |
struct | _PH_FORMAT |
Describes an element to be formatted to a string. More... | |
struct | _PH_AVL_LINKS |
struct | _PH_AVL_TREE |
struct | _PH_HANDLE_TABLE_ENTRY |
struct | _PH_HANDLE_TABLE_BASIC_INFORMATION |
struct | _PH_HANDLE_TABLE_FLAGS_INFORMATION |
struct | _PH_WORK_QUEUE |
struct | _PH_WORK_QUEUE_ITEM |
Macros | |
#define | UNICODE |
#define | PHLIBAPI |
#define | _User_set_ |
#define | WINDOWS_ANCIENT 0 |
#define | WINDOWS_XP 51 |
#define | WINDOWS_SERVER_2003 52 |
#define | WINDOWS_VISTA 60 |
#define | WINDOWS_7 61 |
#define | WINDOWS_8 62 |
#define | WINDOWS_8_1 63 |
#define | WINDOWS_10 100 |
#define | WINDOWS_NEW MAXLONG |
#define | WINDOWS_HAS_CONSOLE_HOST (WindowsVersion >= WINDOWS_7) |
#define | WINDOWS_HAS_CYCLE_TIME (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_IFILEDIALOG (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_IMAGE_FILE_NAME_BY_PROCESS_ID (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_IMMERSIVE (WindowsVersion >= WINDOWS_8) |
#define | WINDOWS_HAS_LIMITED_ACCESS (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_PSSUSPENDRESUMEPROCESS (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_SERVICE_TAGS (WindowsVersion >= WINDOWS_VISTA) |
#define | WINDOWS_HAS_UAC (WindowsVersion >= WINDOWS_VISTA) |
#define | dprintf(format,...) |
#define | PHLIB_INIT_MODULE_RESERVED1 0x1 |
#define | PHLIB_INIT_MODULE_RESERVED2 0x2 |
#define | PHLIB_INIT_MODULE_WORK_QUEUE 0x4 |
Needed to use work queues. | |
#define | PHLIB_INIT_MODULE_HANDLE_TABLE 0x8 |
Needed to use handle tables. | |
#define | PHLIB_INIT_MODULE_IO_SUPPORT 0x10 |
Needed to use file streams. | |
#define | PHLIB_INIT_MODULE_SYMBOL_PROVIDER 0x20 |
Needed to use symbol providers. | |
#define | PHLIB_INIT_MODULE_RESERVED3 0x40 |
#define | PHLIB_INIT_TOKEN_INFO 0x100000 |
Retrieves token information (e.g. | |
#define | PH_EVENT_SET 0x1 |
#define | PH_EVENT_SET_SHIFT 0 |
#define | PH_EVENT_REFCOUNT_SHIFT 1 |
#define | PH_EVENT_REFCOUNT_INC 0x2 |
#define | PH_EVENT_REFCOUNT_MASK (((ULONG_PTR)1 << 15) - 1) |
#define | PH_EVENT_INIT { { PH_EVENT_REFCOUNT_INC }, NULL } |
#define | PhSetEvent PhfSetEvent |
#define | PhResetEvent PhfResetEvent |
#define | PH_BARRIER_COUNT_SHIFT 0 |
#define | PH_BARRIER_COUNT_MASK (((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 / 2 - 1)) - 1) |
#define | PH_BARRIER_COUNT_INC ((LONG_PTR)1 << PH_BARRIER_COUNT_SHIFT) |
#define | PH_BARRIER_TARGET_SHIFT (sizeof(ULONG_PTR) * 8 / 2) |
#define | PH_BARRIER_TARGET_MASK (((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 / 2 - 1)) - 1) |
#define | PH_BARRIER_TARGET_INC ((LONG_PTR)1 << PH_BARRIER_TARGET_SHIFT) |
#define | PH_BARRIER_WAKING ((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 - 1)) |
#define | PH_BARRIER_MASTER 1 |
#define | PH_BARRIER_SLAVE 2 |
#define | PH_BARRIER_OBSERVER 3 |
#define | PH_BARRIER_INIT(Target) { (ULONG_PTR)(Target) << PH_BARRIER_TARGET_SHIFT, PH_QUEUED_LOCK_INIT } |
#define | PhWaitForBarrier PhfWaitForBarrier |
#define | PH_RUNDOWN_ACTIVE 0x1 |
#define | PH_RUNDOWN_REF_SHIFT 1 |
#define | PH_RUNDOWN_REF_INC 0x2 |
#define | PH_RUNDOWN_PROTECT_INIT { 0 } |
#define | PH_INITONCE_SHIFT 31 |
#define | PH_INITONCE_INITIALIZING (0x1 << PH_INITONCE_SHIFT) |
#define | PH_INITONCE_INITIALIZING_SHIFT PH_INITONCE_SHIFT |
#define | PH_INITONCE_INIT { PH_EVENT_INIT } |
#define | PhInitializeInitOnce PhfInitializeInitOnce |
#define | PhEndInitOnce PhfEndInitOnce |
#define | PH_STRINGREF_INIT(String) { sizeof(String) - sizeof(WCHAR), (String) } |
#define | PH_BYTESREF_INIT(String) { sizeof(String) - sizeof(CHAR), (String) } |
#define | PH_SPLIT_AT_CHAR_SET 0x0 |
#define | PH_SPLIT_AT_STRING 0x1 |
#define | PH_SPLIT_AT_RANGE 0x2 |
#define | PH_SPLIT_CASE_INSENSITIVE 0x1000 |
#define | PH_SPLIT_COMPLEMENT_CHAR_SET 0x2000 |
#define | PH_SPLIT_START_AT_END 0x4000 |
#define | PH_SPLIT_CHAR_SET_IS_UPPERCASE 0x8000 |
#define | PH_TRIM_START_ONLY 0x1 |
#define | PH_TRIM_END_ONLY 0x2 |
#define | PH_CONCAT_STRINGS_LENGTH_CACHE_SIZE 16 |
#define | PH_UNICODE_BYTE_ORDER_MARK 0xfeff |
#define | PH_UNICODE_MAX_CODE_POINT 0x10ffff |
#define | PH_UNICODE_UTF16_TO_HIGH_SURROGATE(CodePoint) ((USHORT)((CodePoint) >> 10) + 0xd7c0) |
#define | PH_UNICODE_UTF16_TO_LOW_SURROGATE(CodePoint) ((USHORT)((CodePoint) & 0x3ff) + 0xdc00) |
#define | PH_UNICODE_UTF16_IS_HIGH_SURROGATE(CodeUnit) ((CodeUnit) >= 0xd800 && (CodeUnit) <= 0xdbff) |
#define | PH_UNICODE_UTF16_IS_LOW_SURROGATE(CodeUnit) ((CodeUnit) >= 0xdc00 && (CodeUnit) <= 0xdfff) |
#define | PH_UNICODE_UTF16_TO_CODE_POINT(HighSurrogate, LowSurrogate) (((ULONG)(HighSurrogate) << 10) + (ULONG)(LowSurrogate) - 0x35fdc00) |
#define | PH_UNICODE_UTF8 0 |
#define | PH_UNICODE_UTF16 1 |
#define | PH_UNICODE_UTF32 2 |
#define | PH_IS_LIST_POINTER_VALID(Pointer) (!((ULONG_PTR)(Pointer) & 0x1)) |
#define | PH_HASH_SET_INIT { 0 } |
#define | PH_HASH_SET_SIZE(Buckets) (sizeof(Buckets) / sizeof(PPH_HASH_ENTRY)) |
#define | PH_HASHTABLE_POWER_OF_TWO_SIZE |
#define | PH_HASHTABLE_ENTRY_SIZE(InnerSize) (FIELD_OFFSET(PH_HASHTABLE_ENTRY, Body) + (InnerSize)) |
#define | PH_HASHTABLE_GET_ENTRY(Hashtable, Index) |
#define | PH_HASHTABLE_GET_ENTRY_INDEX(Hashtable, Entry) |
#define | PH_CALLBACK_DECLARE(Name) PH_CALLBACK Name = { &Name.ListHead, &Name.ListHead, PH_QUEUED_LOCK_INIT, PH_QUEUED_LOCK_INIT } |
#define | PH_TIMESPAN_STR_LEN 30 |
#define | PH_TIMESPAN_STR_LEN_1 (PH_TIMESPAN_STR_LEN + 1) |
#define | PH_TIMESPAN_HMS 0 |
#define | PH_TIMESPAN_HMSM 1 |
#define | PH_TIMESPAN_DHMS 2 |
#define | PhInitFormatC(f, v) do { (f)->Type = CharFormatType; (f)->u.Char = (v); } while (0) |
#define | PhInitFormatS(f, v) do { (f)->Type = StringFormatType; PhInitializeStringRef(&(f)->u.String, (v)); } while (0) |
#define | PhInitFormatSR(f, v) do { (f)->Type = StringFormatType; (f)->u.String = (v); } while (0) |
#define | PhInitFormatMultiByteS(f, v) do { (f)->Type = MultiByteStringFormatType; PhInitializeBytesRef(&(f)->u.MultiByteString, (v)); } while (0) |
#define | PhInitFormatD(f, v) do { (f)->Type = Int32FormatType; (f)->u.Int32 = (v); } while (0) |
#define | PhInitFormatU(f, v) do { (f)->Type = UInt32FormatType; (f)->u.UInt32 = (v); } while (0) |
#define | PhInitFormatX(f, v) do { (f)->Type = UInt32FormatType | FormatUseRadix; (f)->u.UInt32 = (v); (f)->Radix = 16; } while (0) |
#define | PhInitFormatI64D(f, v) do { (f)->Type = Int64FormatType; (f)->u.Int64 = (v); } while (0) |
#define | PhInitFormatI64U(f, v) do { (f)->Type = UInt64FormatType; (f)->u.UInt64 = (v); } while (0) |
#define | PhInitFormatI64X(f, v) do { (f)->Type = UInt64FormatType | FormatUseRadix; (f)->u.UInt64 = (v); (f)->Radix = 16; } while (0) |
#define | PhInitFormatIU(f, v) do { (f)->Type = UIntPtrFormatType; (f)->u.UIntPtr = (v); } while (0) |
#define | PhInitFormatIX(f, v) do { (f)->Type = UIntPtrFormatType | FormatUseRadix; (f)->u.UIntPtr = (v); (f)->Radix = 16; } while (0) |
#define | PhInitFormatF(f, v, p) do { (f)->Type = DoubleFormatType | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define | PhInitFormatE(f, v, p) do { (f)->Type = DoubleFormatType | FormatStandardForm | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define | PhInitFormatA(f, v, p) do { (f)->Type = DoubleFormatType | FormatHexadecimalForm | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define | PhInitFormatSize(f, v) do { (f)->Type = SizeFormatType; (f)->u.Size = (v); } while (0) |
#define | PhIsLeftChildElement(Links) ((Links)->Parent->Left == (Links)) |
#define | PhIsRightChildElement(Links) ((Links)->Parent->Right == (Links)) |
#define | PH_AVL_TREE_INIT(CompareFunction) { { NULL, NULL, NULL, 0 }, 0, CompareFunction } |
#define | PhRootElementAvlTree(Tree) ((Tree)->Root.Right) |
#define | PH_HANDLE_TABLE_SAFE |
#define | PH_HANDLE_TABLE_FREE_COUNT 64 |
#define | PH_HANDLE_TABLE_STRICT_FIFO 0x1 |
#define | PH_HANDLE_TABLE_VALID_FLAGS 0x1 |
Enumerations | |
enum | _PH_FORMAT_TYPE { CharFormatType, StringFormatType, StringZFormatType, MultiByteStringFormatType, MultiByteStringZFormatType, Int32FormatType, Int64FormatType, IntPtrFormatType, UInt32FormatType, UInt64FormatType, UIntPtrFormatType, DoubleFormatType, SizeFormatType, FormatTypeMask = 0x3f, FormatUsePrecision = 0x40, FormatUsePad = 0x80, FormatUseRadix = 0x100, FormatUseParameter = 0x200, FormatStandardForm = 0x1000, FormatHexadecimalForm = 0x2000, FormatForceDecimalPoint = 0x4000, FormatCropZeros = 0x8000, FormatGroupDigits = 0x10000, FormatPrefixSign = 0x20000, FormatPadZeros = 0x40000, FormatLeftAlign = 0x80000000, FormatRightAlign = 0x40000000, FormatUpperCase = 0x20000000 } |
enum | _PH_TREE_ENUMERATION_ORDER { TreeEnumerateInOrder, TreeEnumerateInReverseOrder } |
enum | _PH_HANDLE_TABLE_INFORMATION_CLASS { HandleTableBasicInformation, HandleTableFlagsInformation, MaxHandleTableInfoClass } |
Functions | |
NTSTATUS | PhInitializePhLib (VOID) |
NTSTATUS | PhInitializePhLibEx (_In_ ULONG Flags, _In_opt_ SIZE_T HeapReserveSize, _In_opt_ SIZE_T HeapCommitSize) |
BOOLEAN | PhIsExecutingInWow64 (VOID) |
BOOLEAN | PhInitializeBase (_In_ ULONG Flags) |
Initializes the base support module. | |
PHLIBAPI HANDLE NTAPI | PhCreateThread (_In_opt_ SIZE_T StackSize, _In_ PUSER_THREAD_START_ROUTINE StartAddress, _In_opt_ PVOID Parameter) |
Creates a thread. | |
FORCEINLINE PVOID | PhGetDllHandle (_In_ PWSTR DllName) |
FORCEINLINE PVOID | PhGetProcedureAddress (_In_ PVOID DllHandle, _In_opt_ PSTR ProcedureName, _In_opt_ ULONG ProcedureNumber) |
PHLIBAPI VOID NTAPI | PhQuerySystemTime (_Out_ PLARGE_INTEGER SystemTime) |
Gets the current system time (UTC). | |
PHLIBAPI VOID NTAPI | PhQueryTimeZoneBias (_Out_ PLARGE_INTEGER TimeZoneBias) |
Gets the offset of the current time zone from UTC. | |
PHLIBAPI VOID NTAPI | PhSystemTimeToLocalTime (_In_ PLARGE_INTEGER SystemTime, _Out_ PLARGE_INTEGER LocalTime) |
Converts system time to local time. | |
PHLIBAPI VOID NTAPI | PhLocalTimeToSystemTime (_In_ PLARGE_INTEGER LocalTime, _Out_ PLARGE_INTEGER SystemTime) |
Converts local time to system time. | |
_May_raise_ _Check_return_ _Ret_notnull_ | _Post_writable_byte_size_ (Size) PHLIBAPI PVOID NTAPI PhAllocate(_In_ SIZE_T Size) |
PHLIBAPI PVOID NTAPI | PhAllocateSafe (_In_ SIZE_T Size) |
Allocates a block of memory. | |
PHLIBAPI PVOID NTAPI | PhAllocateExSafe (_In_ SIZE_T Size, _In_ ULONG Flags) |
Allocates a block of memory. | |
PHLIBAPI VOID NTAPI | PhFree (_Frees_ptr_opt_ PVOID Memory) |
Frees a block of memory allocated with PhAllocate(). | |
PHLIBAPI PVOID NTAPI | PhReAllocateSafe (_In_ PVOID Memory, _In_ SIZE_T Size) |
Re-allocates a block of memory originally allocated with PhAllocate(). | |
_Check_return_ _Ret_maybenull_ PHLIBAPI PVOID NTAPI | PhAllocatePage (_In_ SIZE_T Size, _Out_opt_ PSIZE_T NewSize) |
Allocates pages of memory. | |
PHLIBAPI VOID NTAPI | PhFreePage (_Frees_ptr_opt_ PVOID Memory) |
Frees pages of memory allocated with PhAllocatePage(). | |
FORCEINLINE PVOID | PhAllocateCopy (_In_ PVOID Data, _In_ SIZE_T Size) |
C_ASSERT (sizeof(PH_EVENT)==sizeof(ULONG_PTR)+sizeof(HANDLE)) | |
PHLIBAPI VOID FASTCALL | PhfInitializeEvent (_Out_ PPH_EVENT Event) |
Initializes an event object. | |
PHLIBAPI VOID FASTCALL | PhfSetEvent (_Inout_ PPH_EVENT Event) |
Sets an event object. | |
PHLIBAPI BOOLEAN FASTCALL | PhfWaitForEvent (_Inout_ PPH_EVENT Event, _In_opt_ PLARGE_INTEGER Timeout) |
Waits for an event object to be set. | |
FORCEINLINE BOOLEAN | PhWaitForEvent (_Inout_ PPH_EVENT Event, _In_opt_ PLARGE_INTEGER Timeout) |
PHLIBAPI VOID FASTCALL | PhfResetEvent (_Inout_ PPH_EVENT Event) |
Resets an event's state. | |
FORCEINLINE VOID | PhInitializeEvent (_Out_ PPH_EVENT Event) |
FORCEINLINE BOOLEAN | PhTestEvent (_In_ PPH_EVENT Event) |
Determines whether an event object is set. | |
PHLIBAPI VOID FASTCALL | PhfInitializeBarrier (_Out_ PPH_BARRIER Barrier, _In_ ULONG_PTR Target) |
PHLIBAPI BOOLEAN FASTCALL | PhfWaitForBarrier (_Inout_ PPH_BARRIER Barrier, _In_ BOOLEAN Spin) |
Waits until all threads are blocking on the barrier, and resets the state of the barrier. | |
FORCEINLINE VOID | PhInitializeBarrier (_Out_ PPH_BARRIER Barrier, _In_ ULONG_PTR Target) |
PHLIBAPI VOID FASTCALL | PhfInitializeRundownProtection (_Out_ PPH_RUNDOWN_PROTECT Protection) |
PHLIBAPI BOOLEAN FASTCALL | PhfAcquireRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
PHLIBAPI VOID FASTCALL | PhfReleaseRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
PHLIBAPI VOID FASTCALL | PhfWaitForRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
FORCEINLINE VOID | PhInitializeRundownProtection (_Out_ PPH_RUNDOWN_PROTECT Protection) |
FORCEINLINE BOOLEAN | PhAcquireRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
FORCEINLINE VOID | PhReleaseRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
FORCEINLINE VOID | PhWaitForRundownProtection (_Inout_ PPH_RUNDOWN_PROTECT Protection) |
C_ASSERT (PH_INITONCE_SHIFT >=FIELD_OFFSET(PH_EVENT, AvailableForUse)*8) | |
PHLIBAPI VOID FASTCALL | PhfInitializeInitOnce (_Out_ PPH_INITONCE InitOnce) |
PHLIBAPI BOOLEAN FASTCALL | PhfBeginInitOnce (_Inout_ PPH_INITONCE InitOnce) |
PHLIBAPI VOID FASTCALL | PhfEndInitOnce (_Inout_ PPH_INITONCE InitOnce) |
FORCEINLINE BOOLEAN | PhBeginInitOnce (_Inout_ PPH_INITONCE InitOnce) |
FORCEINLINE BOOLEAN | PhTestInitOnce (_In_ PPH_INITONCE InitOnce) |
PHLIBAPI SIZE_T NTAPI | PhCountStringZ (_In_ PWSTR String) |
Determines the length of the specified string, in characters. | |
PHLIBAPI PSTR NTAPI | PhDuplicateBytesZ (_In_ PSTR String) |
Allocates space for and copies a byte string. | |
PHLIBAPI PSTR NTAPI | PhDuplicateBytesZSafe (_In_ PSTR String) |
Allocates space for and copies a byte string. | |
PHLIBAPI PWSTR NTAPI | PhDuplicateStringZ (_In_ PWSTR String) |
Allocates space for and copies a 16-bit string. | |
PHLIBAPI BOOLEAN NTAPI | PhCopyBytesZ (_In_ PSTR InputBuffer, _In_ SIZE_T InputCount, _Out_writes_opt_z_(OutputCount) PSTR OutputBuffer, _In_ SIZE_T OutputCount, _Out_opt_ PSIZE_T ReturnCount) |
Copies a string with optional null termination and a maximum number of characters. | |
PHLIBAPI BOOLEAN NTAPI | PhCopyStringZ (_In_ PWSTR InputBuffer, _In_ SIZE_T InputCount, _Out_writes_opt_z_(OutputCount) PWSTR OutputBuffer, _In_ SIZE_T OutputCount, _Out_opt_ PSIZE_T ReturnCount) |
Copies a string with optional null termination and a maximum number of characters. | |
PHLIBAPI BOOLEAN NTAPI | PhCopyStringZFromBytes (_In_ PSTR InputBuffer, _In_ SIZE_T InputCount, _Out_writes_opt_z_(OutputCount) PWSTR OutputBuffer, _In_ SIZE_T OutputCount, _Out_opt_ PSIZE_T ReturnCount) |
Copies a string with optional null termination and a maximum number of characters. | |
PHLIBAPI BOOLEAN NTAPI | PhCopyStringZFromMultiByte (_In_ PSTR InputBuffer, _In_ SIZE_T InputCount, _Out_writes_opt_z_(OutputCount) PWSTR OutputBuffer, _In_ SIZE_T OutputCount, _Out_opt_ PSIZE_T ReturnCount) |
Copies a string with optional null termination and a maximum number of characters. | |
PHLIBAPI LONG NTAPI | PhCompareStringZNatural (_In_ PWSTR A, _In_ PWSTR B, _In_ BOOLEAN IgnoreCase) |
Compares two strings in natural sort order. | |
FORCEINLINE BOOLEAN | PhAreCharactersDifferent (_In_ WCHAR Char1, _In_ WCHAR Char2) |
FORCEINLINE BOOLEAN | PhIsDigitCharacter (_In_ WCHAR Char) |
FORCEINLINE LONG | PhCompareBytesZ (_In_ PSTR String1, _In_ PSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhEqualBytesZ (_In_ PSTR String1, _In_ PSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE LONG | PhCompareStringZ (_In_ PWSTR String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhEqualStringZ (_In_ PWSTR String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE VOID | PhInitializeStringRef (_Out_ PPH_STRINGREF String, _In_ PWSTR Buffer) |
FORCEINLINE VOID | PhInitializeStringRefLongHint (_Out_ PPH_STRINGREF String, _In_ PWSTR Buffer) |
FORCEINLINE VOID | PhInitializeBytesRef (_Out_ PPH_BYTESREF Bytes, _In_ PSTR Buffer) |
FORCEINLINE VOID | PhInitializeEmptyStringRef (_Out_ PPH_STRINGREF String) |
FORCEINLINE BOOLEAN | PhStringRefToUnicodeString (_In_ PPH_STRINGREF String, _Out_ PUNICODE_STRING UnicodeString) |
FORCEINLINE VOID | PhUnicodeStringToStringRef (_In_ PUNICODE_STRING UnicodeString, _Out_ PPH_STRINGREF String) |
PHLIBAPI LONG NTAPI | PhCompareStringRef (_In_ PPH_STRINGREF String1, _In_ PPH_STRINGREF String2, _In_ BOOLEAN IgnoreCase) |
Compares two strings. | |
PHLIBAPI BOOLEAN NTAPI | PhEqualStringRef (_In_ PPH_STRINGREF String1, _In_ PPH_STRINGREF String2, _In_ BOOLEAN IgnoreCase) |
Determines if two strings are equal. | |
PHLIBAPI ULONG_PTR NTAPI | PhFindCharInStringRef (_In_ PPH_STRINGREF String, _In_ WCHAR Character, _In_ BOOLEAN IgnoreCase) |
Locates a character in a string. | |
PHLIBAPI ULONG_PTR NTAPI | PhFindLastCharInStringRef (_In_ PPH_STRINGREF String, _In_ WCHAR Character, _In_ BOOLEAN IgnoreCase) |
Locates a character in a string, searching backwards. | |
PHLIBAPI ULONG_PTR NTAPI | PhFindStringInStringRef (_In_ PPH_STRINGREF String, _In_ PPH_STRINGREF SubString, _In_ BOOLEAN IgnoreCase) |
Locates a string in a string. | |
PHLIBAPI BOOLEAN NTAPI | PhSplitStringRefAtChar (_In_ PPH_STRINGREF Input, _In_ WCHAR Separator, _Out_ PPH_STRINGREF FirstPart, _Out_ PPH_STRINGREF SecondPart) |
Splits a string. | |
PHLIBAPI BOOLEAN NTAPI | PhSplitStringRefAtLastChar (_In_ PPH_STRINGREF Input, _In_ WCHAR Separator, _Out_ PPH_STRINGREF FirstPart, _Out_ PPH_STRINGREF SecondPart) |
Splits a string at the last occurrence of a character. | |
PHLIBAPI BOOLEAN NTAPI | PhSplitStringRefAtString (_In_ PPH_STRINGREF Input, _In_ PPH_STRINGREF Separator, _In_ BOOLEAN IgnoreCase, _Out_ PPH_STRINGREF FirstPart, _Out_ PPH_STRINGREF SecondPart) |
Splits a string. | |
PHLIBAPI BOOLEAN NTAPI | PhSplitStringRefEx (_In_ PPH_STRINGREF Input, _In_ PPH_STRINGREF Separator, _In_ ULONG Flags, _Out_ PPH_STRINGREF FirstPart, _Out_ PPH_STRINGREF SecondPart, _Out_opt_ PPH_STRINGREF SeparatorPart) |
Splits a string. | |
PHLIBAPI VOID NTAPI | PhTrimStringRef (_Inout_ PPH_STRINGREF String, _In_ PPH_STRINGREF CharSet, _In_ ULONG Flags) |
FORCEINLINE LONG | PhCompareStringRef2 (_In_ PPH_STRINGREF String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhEqualStringRef2 (_In_ PPH_STRINGREF String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhStartsWithStringRef (_In_ PPH_STRINGREF String, _In_ PPH_STRINGREF Prefix, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhStartsWithStringRef2 (_In_ PPH_STRINGREF String, _In_ PWSTR Prefix, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhEndsWithStringRef (_In_ PPH_STRINGREF String, _In_ PPH_STRINGREF Suffix, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE BOOLEAN | PhEndsWithStringRef2 (_In_ PPH_STRINGREF String, _In_ PWSTR Suffix, _In_ BOOLEAN IgnoreCase) |
FORCEINLINE VOID | PhSkipStringRef (_Inout_ PPH_STRINGREF String, _In_ LONG_PTR Length) |
FORCEINLINE VOID | PhReverseStringRef (_In_ PPH_STRINGREF String) |
PHLIBAPI PPH_STRING NTAPI | PhCreateString (_In_ PWSTR Buffer) |
Creates a string object from an existing null-terminated string. | |
PHLIBAPI PPH_STRING NTAPI | PhCreateStringEx (_In_opt_ PWCHAR Buffer, _In_ SIZE_T Length) |
Creates a string object using a specified length. | |
FORCEINLINE PPH_STRING | PhCreateString2 (_In_ PPH_STRINGREF String) |
FORCEINLINE PPH_STRING | PhCreateStringFromUnicodeString (_In_ PUNICODE_STRING UnicodeString) |
PHLIBAPI PPH_STRING NTAPI | PhReferenceEmptyString (VOID) |
Obtains a reference to a zero-length string. | |
PHLIBAPI PPH_STRING NTAPI | PhConcatStrings (_In_ ULONG Count,...) |
Concatenates multiple strings. | |
PHLIBAPI PPH_STRING NTAPI | PhConcatStrings_V (_In_ ULONG Count, _In_ va_list ArgPtr) |
Concatenates multiple strings. | |
PHLIBAPI PPH_STRING NTAPI | PhConcatStrings2 (_In_ PWSTR String1, _In_ PWSTR String2) |
Concatenates two strings. | |
PHLIBAPI PPH_STRING NTAPI | PhConcatStringRef2 (_In_ PPH_STRINGREF String1, _In_ PPH_STRINGREF String2) |
Concatenates two strings. | |
PPH_STRING NTAPI | PhConcatStringRef3 (_In_ PPH_STRINGREF String1, _In_ PPH_STRINGREF String2, _In_ PPH_STRINGREF String3) |
Concatenates three strings. | |
PHLIBAPI PPH_STRING NTAPI | PhFormatString (_In_ _Printf_format_string_ PWSTR Format,...) |
Creates a string using format specifiers. | |
PHLIBAPI PPH_STRING NTAPI | PhFormatString_V (_In_ _Printf_format_string_ PWSTR Format, _In_ va_list ArgPtr) |
Creates a string using format specifiers. | |
FORCEINLINE PWSTR | PhGetString (_In_opt_ PPH_STRING String) |
Retrieves a pointer to a string object's buffer or returns NULL. | |
FORCEINLINE PH_STRINGREF | PhGetStringRef (_In_opt_ PPH_STRING String) |
FORCEINLINE PWSTR | PhGetStringOrEmpty (_In_opt_ PPH_STRING String) |
Retrieves a pointer to a string object's buffer or returns an empty string. | |
FORCEINLINE PWSTR | PhGetStringOrDefault (_In_opt_ PPH_STRING String, _In_ PWSTR DefaultString) |
Retrieves a pointer to a string object's buffer or returns the specified alternative string. | |
FORCEINLINE BOOLEAN | PhIsNullOrEmptyString (_In_opt_ PPH_STRING String) |
Determines whether a string is null or empty. | |
FORCEINLINE PPH_STRING | PhDuplicateString (_In_ PPH_STRING String) |
Duplicates a string. | |
FORCEINLINE LONG | PhCompareString (_In_ PPH_STRING String1, _In_ PPH_STRING String2, _In_ BOOLEAN IgnoreCase) |
Compares two strings. | |
FORCEINLINE LONG | PhCompareString2 (_In_ PPH_STRING String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
Compares two strings. | |
FORCEINLINE LONG | PhCompareStringWithNull (_In_opt_ PPH_STRING String1, _In_opt_ PPH_STRING String2, _In_ BOOLEAN IgnoreCase) |
Compares two strings, handling NULL strings. | |
FORCEINLINE BOOLEAN | PhEqualString (_In_ PPH_STRING String1, _In_ PPH_STRING String2, _In_ BOOLEAN IgnoreCase) |
Determines whether two strings are equal. | |
FORCEINLINE BOOLEAN | PhEqualString2 (_In_ PPH_STRING String1, _In_ PWSTR String2, _In_ BOOLEAN IgnoreCase) |
Determines whether two strings are equal. | |
FORCEINLINE BOOLEAN | PhStartsWithString (_In_ PPH_STRING String, _In_ PPH_STRING Prefix, _In_ BOOLEAN IgnoreCase) |
Determines whether a string starts with another. | |
FORCEINLINE BOOLEAN | PhStartsWithString2 (_In_ PPH_STRING String, _In_ PWSTR Prefix, _In_ BOOLEAN IgnoreCase) |
Determines whether a string starts with another. | |
FORCEINLINE BOOLEAN | PhEndsWithString (_In_ PPH_STRING String, _In_ PPH_STRING Suffix, _In_ BOOLEAN IgnoreCase) |
Determines whether a string ends with another. | |
FORCEINLINE BOOLEAN | PhEndsWithString2 (_In_ PPH_STRING String, _In_ PWSTR Suffix, _In_ BOOLEAN IgnoreCase) |
Determines whether a string ends with another. | |
FORCEINLINE ULONG_PTR | PhFindCharInString (_In_ PPH_STRING String, _In_ SIZE_T StartIndex, _In_ WCHAR Char) |
Locates a character in a string. | |
FORCEINLINE ULONG_PTR | PhFindLastCharInString (_In_ PPH_STRING String, _In_ SIZE_T StartIndex, _In_ WCHAR Char) |
Locates a character in a string, backwards. | |
FORCEINLINE ULONG_PTR | PhFindStringInString (_In_ PPH_STRING String, _In_ SIZE_T StartIndex, _In_ PWSTR SubString) |
Locates a string in a string. | |
FORCEINLINE PPH_STRING | PhSubstring (_In_ PPH_STRING String, _In_ SIZE_T StartIndex, _In_ SIZE_T Count) |
Creates a substring of a string. | |
FORCEINLINE VOID | PhLowerString (_Inout_ PPH_STRING String) |
Converts a string to lowercase in-place. | |
FORCEINLINE VOID | PhUpperString (_Inout_ PPH_STRING String) |
Converts a string to uppercase in-place. | |
FORCEINLINE VOID | PhTrimToNullTerminatorString (_Inout_ PPH_STRING String) |
Updates a string object's length with its true length as determined by an embedded null terminator. | |
PHLIBAPI PPH_BYTES NTAPI | PhCreateBytes (_In_ PSTR Buffer) |
Creates a bytes object from an existing null-terminated string of bytes. | |
PHLIBAPI PPH_BYTES NTAPI | PhCreateBytesEx (_In_opt_ PCHAR Buffer, _In_ SIZE_T Length) |
Creates a bytes object. | |
FORCEINLINE PPH_BYTES | PhCreateBytes2 (_In_ PPH_BYTESREF Bytes) |
FORCEINLINE VOID | PhInitializeUnicodeDecoder (_Out_ PPH_UNICODE_DECODER Decoder, _In_ UCHAR Encoding) |
PHLIBAPI BOOLEAN NTAPI | PhWriteUnicodeDecoder (_Inout_ PPH_UNICODE_DECODER Decoder, _In_ ULONG CodeUnit) |
PHLIBAPI BOOLEAN NTAPI | PhDecodeUnicodeDecoder (_Inout_ PPH_UNICODE_DECODER Decoder, _Out_ PULONG CodePoint) |
PHLIBAPI BOOLEAN NTAPI | PhEncodeUnicode (_In_ UCHAR Encoding, _In_ ULONG CodePoint, _Out_opt_ PVOID CodeUnits, _Out_ PULONG NumberOfCodeUnits) |
PHLIBAPI VOID NTAPI | PhZeroExtendToUtf16Buffer (_In_reads_bytes_(InputLength) PCH Input, _In_ SIZE_T InputLength, _Out_writes_bytes_(InputLength *sizeof(WCHAR)) PWCH Output) |
PHLIBAPI PPH_STRING NTAPI | PhZeroExtendToUtf16Ex (_In_reads_bytes_(InputLength) PCH Input, _In_ SIZE_T InputLength) |
FORCEINLINE PPH_STRING | PhZeroExtendToUtf16 (_In_ PSTR Input) |
PHLIBAPI PPH_BYTES NTAPI | PhConvertUtf16ToAsciiEx (_In_ PWCH Buffer, _In_ SIZE_T Length, _In_opt_ CHAR Replacement) |
FORCEINLINE PPH_BYTES | PhConvertUtf16ToAscii (_In_ PWSTR Buffer, _In_opt_ CHAR Replacement) |
PHLIBAPI PPH_STRING NTAPI | PhConvertMultiByteToUtf16 (_In_ PSTR Buffer) |
Creates a string object from an existing null-terminated multi-byte string. | |
PHLIBAPI PPH_STRING NTAPI | PhConvertMultiByteToUtf16Ex (_In_ PCHAR Buffer, _In_ SIZE_T Length) |
Creates a string object from an existing null-terminated multi-byte string. | |
PHLIBAPI PPH_BYTES NTAPI | PhConvertUtf16ToMultiByte (_In_ PWSTR Buffer) |
Creates a multi-byte string from an existing null-terminated UTF-16 string. | |
PHLIBAPI PPH_BYTES NTAPI | PhConvertUtf16ToMultiByteEx (_In_ PWCHAR Buffer, _In_ SIZE_T Length) |
Creates a multi-byte string from an existing null-terminated UTF-16 string. | |
PHLIBAPI BOOLEAN NTAPI | PhConvertUtf8ToUtf16Size (_Out_ PSIZE_T BytesInUtf16String, _In_reads_bytes_(BytesInUtf8String) PCH Utf8String, _In_ SIZE_T BytesInUtf8String) |
PHLIBAPI BOOLEAN NTAPI | PhConvertUtf8ToUtf16Buffer (_Out_writes_bytes_to_(MaxBytesInUtf16String,*BytesInUtf16String) PWCH Utf16String, _In_ SIZE_T MaxBytesInUtf16String, _Out_opt_ PSIZE_T BytesInUtf16String, _In_reads_bytes_(BytesInUtf8String) PCH Utf8String, _In_ SIZE_T BytesInUtf8String) |
PHLIBAPI PPH_STRING NTAPI | PhConvertUtf8ToUtf16 (_In_ PSTR Buffer) |
PHLIBAPI PPH_STRING NTAPI | PhConvertUtf8ToUtf16Ex (_In_ PCHAR Buffer, _In_ SIZE_T Length) |
PHLIBAPI BOOLEAN NTAPI | PhConvertUtf16ToUtf8Size (_Out_ PSIZE_T BytesInUtf8String, _In_reads_bytes_(BytesInUtf16String) PWCH Utf16String, _In_ SIZE_T BytesInUtf16String) |
PHLIBAPI BOOLEAN NTAPI | PhConvertUtf16ToUtf8Buffer (_Out_writes_bytes_to_(MaxBytesInUtf8String,*BytesInUtf8String) PCH Utf8String, _In_ SIZE_T MaxBytesInUtf8String, _Out_opt_ PSIZE_T BytesInUtf8String, _In_reads_bytes_(BytesInUtf16String) PWCH Utf16String, _In_ SIZE_T BytesInUtf16String) |
PHLIBAPI PPH_BYTES NTAPI | PhConvertUtf16ToUtf8 (_In_ PWSTR Buffer) |
PHLIBAPI PPH_BYTES NTAPI | PhConvertUtf16ToUtf8Ex (_In_ PWCHAR Buffer, _In_ SIZE_T Length) |
PHLIBAPI VOID NTAPI | PhInitializeStringBuilder (_Out_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T InitialCapacity) |
Initializes a string builder object. | |
PHLIBAPI VOID NTAPI | PhDeleteStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder) |
Frees resources used by a string builder object. | |
PHLIBAPI PPH_STRING NTAPI | PhFinalStringBuilderString (_Inout_ PPH_STRING_BUILDER StringBuilder) |
Obtains a reference to the string constructed by a string builder object and frees resources used by the object. | |
PHLIBAPI VOID NTAPI | PhAppendStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ PPH_STRINGREF String) |
Appends a string to the end of a string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendStringBuilder2 (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ PWSTR String) |
Appends a string to the end of a string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendStringBuilderEx (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_opt_ PWCHAR String, _In_ SIZE_T Length) |
Appends a string to the end of a string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendCharStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ WCHAR Character) |
Appends a character to the end of a string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendCharStringBuilder2 (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ WCHAR Character, _In_ SIZE_T Count) |
Appends a number of characters to the end of a string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendFormatStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ _Printf_format_string_ PWSTR Format,...) |
Appends a formatted string to the end of a string builder string. | |
VOID NTAPI | PhAppendFormatStringBuilder_V (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ _Printf_format_string_ PWSTR Format, _In_ va_list ArgPtr) |
PHLIBAPI VOID NTAPI | PhInsertStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T Index, _In_ PPH_STRINGREF String) |
Inserts a string into a string builder string. | |
PHLIBAPI VOID NTAPI | PhInsertStringBuilder2 (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T Index, _In_ PWSTR String) |
Inserts a string into a string builder string. | |
PHLIBAPI VOID NTAPI | PhInsertStringBuilderEx (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T Index, _In_opt_ PWCHAR String, _In_ SIZE_T Length) |
Inserts a string into a string builder string. | |
PHLIBAPI VOID NTAPI | PhRemoveStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T StartIndex, _In_ SIZE_T Count) |
Removes characters from a string builder string. | |
FORCEINLINE VOID | PhRemoveEndStringBuilder (_Inout_ PPH_STRING_BUILDER StringBuilder, _In_ SIZE_T Count) |
PHLIBAPI VOID NTAPI | PhInitializeBytesBuilder (_Out_ PPH_BYTES_BUILDER BytesBuilder, _In_ SIZE_T InitialCapacity) |
Initializes a byte string builder object. | |
PHLIBAPI VOID NTAPI | PhDeleteBytesBuilder (_Inout_ PPH_BYTES_BUILDER BytesBuilder) |
Frees resources used by a byte string builder object. | |
PHLIBAPI PPH_BYTES NTAPI | PhFinalBytesBuilderBytes (_Inout_ PPH_BYTES_BUILDER BytesBuilder) |
Obtains a reference to the byte string constructed by a byte string builder object and frees resources used by the object. | |
FORCEINLINE PVOID | PhOffsetBytesBuilder (_In_ PPH_BYTES_BUILDER BytesBuilder, _In_ SIZE_T Offset) |
PHLIBAPI VOID NTAPI | PhAppendBytesBuilder (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _In_ PPH_BYTESREF Bytes) |
Appends a byte string to the end of a byte string builder string. | |
PHLIBAPI VOID NTAPI | PhAppendBytesBuilder2 (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _In_ PCHAR Bytes) |
Appends a byte string to the end of a byte string builder string. | |
PHLIBAPI PVOID NTAPI | PhAppendBytesBuilderEx (_Inout_ PPH_BYTES_BUILDER BytesBuilder, _In_opt_ PVOID Buffer, _In_ SIZE_T Length, _In_opt_ SIZE_T Alignment, _Out_opt_ PSIZE_T Offset) |
Appends a byte string to the end of a byte string builder string. | |
PHLIBAPI PPH_LIST NTAPI | PhCreateList (_In_ ULONG InitialCapacity) |
Creates a list object. | |
PHLIBAPI VOID NTAPI | PhResizeList (_Inout_ PPH_LIST List, _In_ ULONG NewCapacity) |
Resizes a list. | |
PHLIBAPI VOID NTAPI | PhAddItemList (_Inout_ PPH_LIST List, _In_ PVOID Item) |
Adds an item to a list. | |
PHLIBAPI VOID NTAPI | PhAddItemsList (_Inout_ PPH_LIST List, _In_ PVOID *Items, _In_ ULONG Count) |
Adds items to a list. | |
PHLIBAPI VOID NTAPI | PhClearList (_Inout_ PPH_LIST List) |
Clears a list. | |
_Success_ (return!=-1) PHLIBAPI ULONG NTAPI PhFindItemList(_In_ PPH_LIST List | |
PHLIBAPI VOID NTAPI | PhInsertItemList (_Inout_ PPH_LIST List, _In_ ULONG Index, _In_ PVOID Item) |
Inserts an item into a list. | |
PHLIBAPI VOID NTAPI | PhInsertItemsList (_Inout_ PPH_LIST List, _In_ ULONG Index, _In_ PVOID *Items, _In_ ULONG Count) |
Inserts items into a list. | |
PHLIBAPI VOID NTAPI | PhRemoveItemList (_Inout_ PPH_LIST List, _In_ ULONG Index) |
Removes an item from a list. | |
PHLIBAPI VOID NTAPI | PhRemoveItemsList (_Inout_ PPH_LIST List, _In_ ULONG StartIndex, _In_ ULONG Count) |
Removes items from a list. | |
PHLIBAPI PPH_POINTER_LIST NTAPI | PhCreatePointerList (_In_ ULONG InitialCapacity) |
Creates a pointer list object. | |
PHLIBAPI HANDLE NTAPI | PhAddItemPointerList (_Inout_ PPH_POINTER_LIST PointerList, _In_ PVOID Pointer) |
Adds a pointer to a pointer list. | |
PHLIBAPI BOOLEAN NTAPI | PhEnumPointerListEx (_In_ PPH_POINTER_LIST PointerList, _Inout_ PULONG EnumerationKey, _Out_ PVOID *Pointer, _Out_ PHANDLE PointerHandle) |
PHLIBAPI HANDLE NTAPI | PhFindItemPointerList (_In_ PPH_POINTER_LIST PointerList, _In_ PVOID Pointer) |
Locates a pointer in a pointer list. | |
PHLIBAPI VOID NTAPI | PhRemoveItemPointerList (_Inout_ PPH_POINTER_LIST PointerList, _In_ HANDLE PointerHandle) |
Removes a pointer from a pointer list. | |
FORCEINLINE BOOLEAN | PhEnumPointerList (_In_ PPH_POINTER_LIST PointerList, _Inout_ PULONG EnumerationKey, _Out_ PVOID *Pointer) |
FORCEINLINE VOID | PhInitializeHashSet (_Out_ PPH_HASH_ENTRY *Buckets, _In_ ULONG NumberOfBuckets) |
Initializes a hash set. | |
FORCEINLINE PPH_HASH_ENTRY * | PhCreateHashSet (_In_ ULONG NumberOfBuckets) |
Allocates and initializes a hash set. | |
FORCEINLINE ULONG | PhCountHashSet (_In_ PPH_HASH_ENTRY *Buckets, _In_ ULONG NumberOfBuckets) |
Determines the number of entries in a hash set. | |
FORCEINLINE VOID | PhDistributeHashSet (_Inout_ PPH_HASH_ENTRY *NewBuckets, _In_ ULONG NumberOfNewBuckets, _In_ PPH_HASH_ENTRY *OldBuckets, _In_ ULONG NumberOfOldBuckets) |
Moves entries from one hash set to another. | |
FORCEINLINE VOID | PhAddEntryHashSet (_Inout_ PPH_HASH_ENTRY *Buckets, _In_ ULONG NumberOfBuckets, _Out_ PPH_HASH_ENTRY Entry, _In_ ULONG Hash) |
Adds an entry to a hash set. | |
FORCEINLINE PPH_HASH_ENTRY | PhFindEntryHashSet (_In_ PPH_HASH_ENTRY *Buckets, _In_ ULONG NumberOfBuckets, _In_ ULONG Hash) |
Begins the process of finding an entry in a hash set. | |
FORCEINLINE VOID | PhRemoveEntryHashSet (_Inout_ PPH_HASH_ENTRY *Buckets, _In_ ULONG NumberOfBuckets, _Inout_ PPH_HASH_ENTRY Entry) |
Removes an entry from a hash set. | |
FORCEINLINE VOID | PhResizeHashSet (_Inout_ PPH_HASH_ENTRY **Buckets, _Inout_ PULONG NumberOfBuckets, _In_ ULONG NewNumberOfBuckets) |
Resizes a hash set. | |
PHLIBAPI PPH_HASHTABLE NTAPI | PhCreateHashtable (_In_ ULONG EntrySize, _In_ PPH_HASHTABLE_COMPARE_FUNCTION CompareFunction, _In_ PPH_HASHTABLE_HASH_FUNCTION HashFunction, _In_ ULONG InitialCapacity) |
Creates a hashtable object. | |
PHLIBAPI PVOID NTAPI | PhAddEntryHashtable (_Inout_ PPH_HASHTABLE Hashtable, _In_ PVOID Entry) |
Adds an entry to a hashtable. | |
PHLIBAPI PVOID NTAPI | PhAddEntryHashtableEx (_Inout_ PPH_HASHTABLE Hashtable, _In_ PVOID Entry, _Out_opt_ PBOOLEAN Added) |
Adds an entry to a hashtable or returns an existing one. | |
PHLIBAPI VOID NTAPI | PhClearHashtable (_Inout_ PPH_HASHTABLE Hashtable) |
Clears a hashtable. | |
PHLIBAPI BOOLEAN NTAPI | PhEnumHashtable (_In_ PPH_HASHTABLE Hashtable, _Out_ PVOID *Entry, _Inout_ PULONG EnumerationKey) |
Enumerates the entries in a hashtable. | |
PHLIBAPI PVOID NTAPI | PhFindEntryHashtable (_In_ PPH_HASHTABLE Hashtable, _In_ PVOID Entry) |
Locates an entry in a hashtable. | |
PHLIBAPI BOOLEAN NTAPI | PhRemoveEntryHashtable (_Inout_ PPH_HASHTABLE Hashtable, _In_ PVOID Entry) |
Removes an entry from a hashtable. | |
FORCEINLINE VOID | PhBeginEnumHashtable (_In_ PPH_HASHTABLE Hashtable, _Out_ PPH_HASHTABLE_ENUM_CONTEXT Context) |
FORCEINLINE PVOID | PhNextEnumHashtable (_Inout_ PPH_HASHTABLE_ENUM_CONTEXT Context) |
PHLIBAPI ULONG NTAPI | PhHashBytes (_In_reads_(Length) PUCHAR Bytes, _In_ SIZE_T Length) |
Generates a hash code for a sequence of bytes. | |
PHLIBAPI ULONG NTAPI | PhHashStringRef (_In_ PPH_STRINGREF String, _In_ BOOLEAN IgnoreCase) |
Generates a hash code for a string. | |
FORCEINLINE ULONG | PhHashInt32 (_In_ ULONG Value) |
FORCEINLINE ULONG | PhHashInt64 (_In_ ULONG64 Value) |
FORCEINLINE ULONG | PhHashIntPtr (_In_ ULONG_PTR Value) |
PHLIBAPI PPH_HASHTABLE NTAPI | PhCreateSimpleHashtable (_In_ ULONG InitialCapacity) |
PHLIBAPI PVOID NTAPI | PhAddItemSimpleHashtable (_Inout_ PPH_HASHTABLE SimpleHashtable, _In_opt_ PVOID Key, _In_opt_ PVOID Value) |
PHLIBAPI PVOID *NTAPI | PhFindItemSimpleHashtable (_In_ PPH_HASHTABLE SimpleHashtable, _In_opt_ PVOID Key) |
FORCEINLINE PVOID NTAPI | PhFindItemSimpleHashtable2 (_In_ PPH_HASHTABLE SimpleHashtable, _In_opt_ PVOID Key) |
PHLIBAPI BOOLEAN NTAPI | PhRemoveItemSimpleHashtable (_Inout_ PPH_HASHTABLE SimpleHashtable, _In_opt_ PVOID Key) |
C_ASSERT (FIELD_OFFSET(PH_FREE_LIST_ENTRY, ListEntry)==0x0) | |
C_ASSERT (FIELD_OFFSET(PH_FREE_LIST_ENTRY, Body)==0x8) | |
PHLIBAPI VOID NTAPI | PhInitializeFreeList (_Out_ PPH_FREE_LIST FreeList, _In_ SIZE_T Size, _In_ ULONG MaximumCount) |
Initializes a free list object. | |
PHLIBAPI VOID NTAPI | PhDeleteFreeList (_Inout_ PPH_FREE_LIST FreeList) |
Frees resources used by a free list object. | |
PHLIBAPI PVOID NTAPI | PhAllocateFromFreeList (_Inout_ PPH_FREE_LIST FreeList) |
Allocates a block of memory from a free list. | |
PHLIBAPI VOID NTAPI | PhFreeToFreeList (_Inout_ PPH_FREE_LIST FreeList, _In_ PVOID Memory) |
Frees a block of memory to a free list. | |
PHLIBAPI VOID NTAPI | PhInitializeCallback (_Out_ PPH_CALLBACK Callback) |
Initializes a callback object. | |
PHLIBAPI VOID NTAPI | PhDeleteCallback (_Inout_ PPH_CALLBACK Callback) |
Frees resources used by a callback object. | |
PHLIBAPI VOID NTAPI | PhRegisterCallback (_Inout_ PPH_CALLBACK Callback, _In_ PPH_CALLBACK_FUNCTION Function, _In_opt_ PVOID Context, _Out_ PPH_CALLBACK_REGISTRATION Registration) |
Registers a callback function to be notified. | |
PHLIBAPI VOID NTAPI | PhRegisterCallbackEx (_Inout_ PPH_CALLBACK Callback, _In_ PPH_CALLBACK_FUNCTION Function, _In_opt_ PVOID Context, _In_ USHORT Flags, _Out_ PPH_CALLBACK_REGISTRATION Registration) |
Registers a callback function to be notified. | |
PHLIBAPI VOID NTAPI | PhUnregisterCallback (_Inout_ PPH_CALLBACK Callback, _Inout_ PPH_CALLBACK_REGISTRATION Registration) |
Unregisters a callback function. | |
PHLIBAPI VOID NTAPI | PhInvokeCallback (_In_ PPH_CALLBACK Callback, _In_opt_ PVOID Parameter) |
Notifies all registered callback functions. | |
PHLIBAPI ULONG NTAPI | PhGetPrimeNumber (_In_ ULONG Minimum) |
Retrieves a prime number bigger than or equal to the specified number. | |
PHLIBAPI ULONG NTAPI | PhRoundUpToPowerOfTwo (_In_ ULONG Number) |
Rounds up a number to the next power of two. | |
PHLIBAPI ULONG NTAPI | PhExponentiate (_In_ ULONG Base, _In_ ULONG Exponent) |
Performs exponentiation. | |
PHLIBAPI ULONG64 NTAPI | PhExponentiate64 (_In_ ULONG64 Base, _In_ ULONG Exponent) |
Performs 64-bit exponentiation. | |
PHLIBAPI BOOLEAN NTAPI | PhHexStringToBuffer (_In_ PPH_STRINGREF String, _Out_writes_bytes_(String->Length/sizeof(WCHAR)/2) PUCHAR Buffer) |
Converts a sequence of hexadecimal digits into a byte array. | |
PHLIBAPI PPH_STRING NTAPI | PhBufferToHexString (_In_reads_bytes_(Length) PUCHAR Buffer, _In_ ULONG Length) |
Converts a byte array into a sequence of hexadecimal digits. | |
PPH_STRING NTAPI | PhBufferToHexStringEx (_In_reads_bytes_(Length) PUCHAR Buffer, _In_ ULONG Length, _In_ BOOLEAN UpperCase) |
Converts a byte array into a sequence of hexadecimal digits. | |
PHLIBAPI BOOLEAN NTAPI | PhStringToInteger64 (_In_ PPH_STRINGREF String, _In_opt_ ULONG Base, _Out_opt_ PLONG64 Integer) |
Converts a string to an integer. | |
PHLIBAPI PPH_STRING NTAPI | PhIntegerToString64 (_In_ LONG64 Integer, _In_opt_ ULONG Base, _In_ BOOLEAN Signed) |
Converts an integer to a string. | |
PHLIBAPI VOID NTAPI | PhPrintTimeSpan (_Out_writes_(PH_TIMESPAN_STR_LEN_1) PWSTR Destination, _In_ ULONG64 Ticks, _In_opt_ ULONG Mode) |
PHLIBAPI VOID NTAPI | PhFillMemoryUlong (_Inout_updates_(Count) _Needs_align_(4) PULONG Memory, _In_ ULONG Value, _In_ SIZE_T Count) |
Fills a memory block with a ULONG pattern. | |
PHLIBAPI VOID FASTCALL | PhxfFillMemoryUlong (PULONG Memory, ULONG Value, ULONG Count) |
Deprecated. | |
PHLIBAPI VOID NTAPI | PhDivideSinglesBySingle (_Inout_updates_(Count) PFLOAT A, _In_ FLOAT B, _In_ SIZE_T Count) |
Divides an array of numbers by a number. | |
PHLIBAPI VOID FASTCALL | PhxfDivideSingle2U (PFLOAT A, FLOAT B, ULONG Count) |
Deprecated. | |
PHLIBAPI PPH_STRING NTAPI | PhFormat (_In_reads_(Count) PPH_FORMAT Format, _In_ ULONG Count, _In_opt_ SIZE_T InitialCapacity) |
Creates a formatted string. | |
PHLIBAPI BOOLEAN NTAPI | PhFormatToBuffer (_In_reads_(Count) PPH_FORMAT Format, _In_ ULONG Count, _Out_writes_bytes_opt_(BufferLength) PWSTR Buffer, _In_opt_ SIZE_T BufferLength, _Out_opt_ PSIZE_T ReturnLength) |
Writes a formatted string to a buffer. | |
PHLIBAPI PPH_STRING NTAPI | PhaCreateString (_In_ PWSTR Buffer) |
PHLIBAPI PPH_STRING NTAPI | PhaCreateStringEx (_In_opt_ PWSTR Buffer, _In_ SIZE_T Length) |
PHLIBAPI PPH_STRING NTAPI | PhaDuplicateString (_In_ PPH_STRING String) |
PHLIBAPI PPH_STRING NTAPI | PhaConcatStrings (_In_ ULONG Count,...) |
PHLIBAPI PPH_STRING NTAPI | PhaConcatStrings2 (_In_ PWSTR String1, _In_ PWSTR String2) |
PHLIBAPI PPH_STRING NTAPI | PhaFormatString (_In_ _Printf_format_string_ PWSTR Format,...) |
PHLIBAPI PPH_STRING NTAPI | PhaLowerString (_In_ PPH_STRING String) |
PHLIBAPI PPH_STRING NTAPI | PhaUpperString (_In_ PPH_STRING String) |
PHLIBAPI PPH_STRING NTAPI | PhaSubstring (_In_ PPH_STRING String, _In_ SIZE_T StartIndex, _In_ SIZE_T Count) |
PHLIBAPI ULONG NTAPI | PhNtStatusToDosError (_In_ NTSTATUS Status) |
Converts a NTSTATUS value to a Win32 error code. | |
PHLIBAPI NTSTATUS NTAPI | PhDosErrorToNtStatus (_In_ ULONG DosError) |
Converts a Win32 error code to a NTSTATUS value. | |
PHLIBAPI BOOLEAN NTAPI | PhNtStatusFileNotFound (_In_ NTSTATUS Status) |
Determines whether a NTSTATUS value indicates that a file cannot be not found. | |
typedef | LONG (NTAPI *PPH_AVL_TREE_COMPARE_FUNCTION)(_In_ PPH_AVL_LINKS Links1 |
PHLIBAPI VOID NTAPI | PhInitializeAvlTree (_Out_ PPH_AVL_TREE Tree, _In_ PPH_AVL_TREE_COMPARE_FUNCTION CompareFunction) |
Initializes an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhAddElementAvlTree (_Inout_ PPH_AVL_TREE Tree, _Out_ PPH_AVL_LINKS Element) |
Adds an element to an AVL tree. | |
PHLIBAPI VOID NTAPI | PhRemoveElementAvlTree (_Inout_ PPH_AVL_TREE Tree, _Inout_ PPH_AVL_LINKS Element) |
Removes an element from an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhFindElementAvlTree (_In_ PPH_AVL_TREE Tree, _In_ PPH_AVL_LINKS Element) |
Finds an element in an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhFindElementAvlTree2 (_In_ PPH_AVL_TREE Tree, _In_ PPH_AVL_LINKS Element, _Out_ PLONG Result) |
Finds an element in an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhMinimumElementAvlTree (_In_ PPH_AVL_TREE Tree) |
Finds the smallest element in an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhMaximumElementAvlTree (_In_ PPH_AVL_TREE Tree) |
Finds the biggest element in an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhSuccessorElementAvlTree (_In_ PPH_AVL_LINKS Element) |
Finds the next element in an AVL tree. | |
PHLIBAPI PPH_AVL_LINKS NTAPI | PhPredecessorElementAvlTree (_In_ PPH_AVL_LINKS Element) |
Finds the previous element in an AVL tree. | |
PHLIBAPI VOID NTAPI | PhEnumAvlTree (_In_ PPH_AVL_TREE Tree, _In_ PH_TREE_ENUMERATION_ORDER Order, _In_ PPH_ENUM_AVL_TREE_CALLBACK Callback, _In_opt_ PVOID Context) |
Enumerates the elements in an AVL tree. | |
VOID | PhHandleTableInitialization (VOID) |
PPH_HANDLE_TABLE NTAPI | PhCreateHandleTable (VOID) |
VOID NTAPI | PhDestroyHandleTable (_In_ _Post_invalid_ PPH_HANDLE_TABLE HandleTable) |
BOOLEAN NTAPI | PhLockHandleTableEntry (_Inout_ PPH_HANDLE_TABLE HandleTable, _Inout_ PPH_HANDLE_TABLE_ENTRY HandleTableEntry) |
VOID NTAPI | PhUnlockHandleTableEntry (_Inout_ PPH_HANDLE_TABLE HandleTable, _Inout_ PPH_HANDLE_TABLE_ENTRY HandleTableEntry) |
HANDLE NTAPI | PhCreateHandle (_Inout_ PPH_HANDLE_TABLE HandleTable, _In_ PPH_HANDLE_TABLE_ENTRY HandleTableEntry) |
BOOLEAN NTAPI | PhDestroyHandle (_Inout_ PPH_HANDLE_TABLE HandleTable, _In_ HANDLE Handle, _In_opt_ PPH_HANDLE_TABLE_ENTRY HandleTableEntry) |
PPH_HANDLE_TABLE_ENTRY NTAPI | PhLookupHandleTableEntry (_In_ PPH_HANDLE_TABLE HandleTable, _In_ HANDLE Handle) |
VOID NTAPI | PhEnumHandleTable (_In_ PPH_HANDLE_TABLE HandleTable, _In_ PPH_ENUM_HANDLE_TABLE_CALLBACK Callback, _In_opt_ PVOID Context) |
VOID NTAPI | PhSweepHandleTable (_In_ PPH_HANDLE_TABLE HandleTable, _In_ PPH_ENUM_HANDLE_TABLE_CALLBACK Callback, _In_opt_ PVOID Context) |
NTSTATUS NTAPI | PhQueryInformationHandleTable (_In_ PPH_HANDLE_TABLE HandleTable, _In_ PH_HANDLE_TABLE_INFORMATION_CLASS InformationClass, _Out_writes_bytes_opt_(BufferLength) PVOID Buffer, _In_ ULONG BufferLength, _Out_opt_ PULONG ReturnLength) |
NTSTATUS NTAPI | PhSetInformationHandleTable (_Inout_ PPH_HANDLE_TABLE HandleTable, _In_ PH_HANDLE_TABLE_INFORMATION_CLASS InformationClass, _In_reads_bytes_(BufferLength) PVOID Buffer, _In_ ULONG BufferLength) |
VOID | PhWorkQueueInitialization (VOID) |
PHLIBAPI VOID NTAPI | PhInitializeWorkQueue (_Out_ PPH_WORK_QUEUE WorkQueue, _In_ ULONG MinimumThreads, _In_ ULONG MaximumThreads, _In_ ULONG NoWorkTimeout) |
Initializes a work queue. | |
PHLIBAPI VOID NTAPI | PhDeleteWorkQueue (_Inout_ PPH_WORK_QUEUE WorkQueue) |
Frees resources used by a work queue. | |
PHLIBAPI VOID NTAPI | PhWaitForWorkQueue (_Inout_ PPH_WORK_QUEUE WorkQueue) |
Waits for all queued work items to be executed. | |
PHLIBAPI VOID NTAPI | PhQueueItemWorkQueue (_Inout_ PPH_WORK_QUEUE WorkQueue, _In_ PUSER_THREAD_START_ROUTINE Function, _In_opt_ PVOID Context) |
Queues a work item to a work queue. | |
VOID | PhQueueItemWorkQueueEx (_Inout_ PPH_WORK_QUEUE WorkQueue, _In_ PUSER_THREAD_START_ROUTINE Function, _In_opt_ PVOID Context, _In_opt_ PPH_WORK_QUEUE_ITEM_DELETE_FUNCTION DeleteFunction) |
Queues a work item to a work queue. | |
PHLIBAPI VOID NTAPI | PhQueueItemGlobalWorkQueue (_In_ PUSER_THREAD_START_ROUTINE Function, _In_opt_ PVOID Context) |
Queues a work item to the global work queue. | |
#define PH_AVL_TREE_INIT | ( | CompareFunction | ) | { { NULL, NULL, NULL, 0 }, 0, CompareFunction } |
#define PH_BARRIER_COUNT_INC ((LONG_PTR)1 << PH_BARRIER_COUNT_SHIFT) |
#define PH_BARRIER_COUNT_MASK (((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 / 2 - 1)) - 1) |
#define PH_BARRIER_INIT | ( | Target | ) | { (ULONG_PTR)(Target) << PH_BARRIER_TARGET_SHIFT, PH_QUEUED_LOCK_INIT } |
#define PH_BARRIER_TARGET_INC ((LONG_PTR)1 << PH_BARRIER_TARGET_SHIFT) |
#define PH_BARRIER_TARGET_MASK (((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 / 2 - 1)) - 1) |
#define PH_BARRIER_TARGET_SHIFT (sizeof(ULONG_PTR) * 8 / 2) |
#define PH_BARRIER_WAKING ((LONG_PTR)1 << (sizeof(ULONG_PTR) * 8 - 1)) |
#define PH_BYTESREF_INIT | ( | String | ) | { sizeof(String) - sizeof(CHAR), (String) } |
#define PH_CALLBACK_DECLARE | ( | Name | ) | PH_CALLBACK Name = { &Name.ListHead, &Name.ListHead, PH_QUEUED_LOCK_INIT, PH_QUEUED_LOCK_INIT } |
#define PH_EVENT_INIT { { PH_EVENT_REFCOUNT_INC }, NULL } |
#define PH_HASH_SET_SIZE | ( | Buckets | ) | (sizeof(Buckets) / sizeof(PPH_HASH_ENTRY)) |
#define PH_HASHTABLE_ENTRY_SIZE | ( | InnerSize | ) | (FIELD_OFFSET(PH_HASHTABLE_ENTRY, Body) + (InnerSize)) |
#define PH_HASHTABLE_GET_ENTRY | ( | Hashtable, | |
Index | |||
) |
#define PH_HASHTABLE_GET_ENTRY_INDEX | ( | Hashtable, | |
Entry | |||
) |
#define PH_INITONCE_INIT { PH_EVENT_INIT } |
#define PH_INITONCE_INITIALIZING (0x1 << PH_INITONCE_SHIFT) |
#define PH_INITONCE_INITIALIZING_SHIFT PH_INITONCE_SHIFT |
#define PH_IS_LIST_POINTER_VALID | ( | Pointer | ) | (!((ULONG_PTR)(Pointer) & 0x1)) |
#define PH_STRINGREF_INIT | ( | String | ) | { sizeof(String) - sizeof(WCHAR), (String) } |
#define PH_TIMESPAN_STR_LEN_1 (PH_TIMESPAN_STR_LEN + 1) |
#define PH_UNICODE_UTF16_IS_HIGH_SURROGATE | ( | CodeUnit | ) | ((CodeUnit) >= 0xd800 && (CodeUnit) <= 0xdbff) |
#define PH_UNICODE_UTF16_IS_LOW_SURROGATE | ( | CodeUnit | ) | ((CodeUnit) >= 0xdc00 && (CodeUnit) <= 0xdfff) |
#define PH_UNICODE_UTF16_TO_CODE_POINT | ( | HighSurrogate, | |
LowSurrogate | |||
) | (((ULONG)(HighSurrogate) << 10) + (ULONG)(LowSurrogate) - 0x35fdc00) |
#define PH_UNICODE_UTF16_TO_HIGH_SURROGATE | ( | CodePoint | ) | ((USHORT)((CodePoint) >> 10) + 0xd7c0) |
#define PH_UNICODE_UTF16_TO_LOW_SURROGATE | ( | CodePoint | ) | ((USHORT)((CodePoint) & 0x3ff) + 0xdc00) |
#define PhEndInitOnce PhfEndInitOnce |
#define PhInitFormatA | ( | f, | |
v, | |||
p | |||
) | do { (f)->Type = DoubleFormatType | FormatHexadecimalForm | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define PhInitFormatC | ( | f, | |
v | |||
) | do { (f)->Type = CharFormatType; (f)->u.Char = (v); } while (0) |
#define PhInitFormatD | ( | f, | |
v | |||
) | do { (f)->Type = Int32FormatType; (f)->u.Int32 = (v); } while (0) |
#define PhInitFormatE | ( | f, | |
v, | |||
p | |||
) | do { (f)->Type = DoubleFormatType | FormatStandardForm | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define PhInitFormatF | ( | f, | |
v, | |||
p | |||
) | do { (f)->Type = DoubleFormatType | FormatUsePrecision; (f)->u.Double = (v); (f)->Precision = (p); } while (0) |
#define PhInitFormatI64D | ( | f, | |
v | |||
) | do { (f)->Type = Int64FormatType; (f)->u.Int64 = (v); } while (0) |
#define PhInitFormatI64U | ( | f, | |
v | |||
) | do { (f)->Type = UInt64FormatType; (f)->u.UInt64 = (v); } while (0) |
#define PhInitFormatI64X | ( | f, | |
v | |||
) | do { (f)->Type = UInt64FormatType | FormatUseRadix; (f)->u.UInt64 = (v); (f)->Radix = 16; } while (0) |
#define PhInitFormatIU | ( | f, | |
v | |||
) | do { (f)->Type = UIntPtrFormatType; (f)->u.UIntPtr = (v); } while (0) |
#define PhInitFormatIX | ( | f, | |
v | |||
) | do { (f)->Type = UIntPtrFormatType | FormatUseRadix; (f)->u.UIntPtr = (v); (f)->Radix = 16; } while (0) |
#define PhInitFormatMultiByteS | ( | f, | |
v | |||
) | do { (f)->Type = MultiByteStringFormatType; PhInitializeBytesRef(&(f)->u.MultiByteString, (v)); } while (0) |
#define PhInitFormatS | ( | f, | |
v | |||
) | do { (f)->Type = StringFormatType; PhInitializeStringRef(&(f)->u.String, (v)); } while (0) |
#define PhInitFormatSize | ( | f, | |
v | |||
) | do { (f)->Type = SizeFormatType; (f)->u.Size = (v); } while (0) |
#define PhInitFormatSR | ( | f, | |
v | |||
) | do { (f)->Type = StringFormatType; (f)->u.String = (v); } while (0) |
#define PhInitFormatU | ( | f, | |
v | |||
) | do { (f)->Type = UInt32FormatType; (f)->u.UInt32 = (v); } while (0) |
#define PhInitFormatX | ( | f, | |
v | |||
) | do { (f)->Type = UInt32FormatType | FormatUseRadix; (f)->u.UInt32 = (v); (f)->Radix = 16; } while (0) |
#define PhInitializeInitOnce PhfInitializeInitOnce |
#define PhIsLeftChildElement | ( | Links | ) | ((Links)->Parent->Left == (Links)) |
#define PhIsRightChildElement | ( | Links | ) | ((Links)->Parent->Right == (Links)) |
#define PHLIB_INIT_MODULE_HANDLE_TABLE 0x8 |
#define PHLIB_INIT_MODULE_IO_SUPPORT 0x10 |
#define PHLIB_INIT_MODULE_SYMBOL_PROVIDER 0x20 |
#define PHLIB_INIT_MODULE_WORK_QUEUE 0x4 |
#define PHLIB_INIT_TOKEN_INFO 0x100000 |
#define PhResetEvent PhfResetEvent |
#define PhSetEvent PhfSetEvent |
#define PhWaitForBarrier PhfWaitForBarrier |
#define WINDOWS_HAS_CONSOLE_HOST (WindowsVersion >= WINDOWS_7) |
#define WINDOWS_HAS_CYCLE_TIME (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_IFILEDIALOG (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_IMAGE_FILE_NAME_BY_PROCESS_ID (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_IMMERSIVE (WindowsVersion >= WINDOWS_8) |
#define WINDOWS_HAS_LIMITED_ACCESS (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_PSSUSPENDRESUMEPROCESS (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_SERVICE_TAGS (WindowsVersion >= WINDOWS_VISTA) |
#define WINDOWS_HAS_UAC (WindowsVersion >= WINDOWS_VISTA) |
typedef _In_ PPH_AVL_LINKS Links2 |
typedef struct _PH_AVL_LINKS PH_AVL_LINKS |
typedef struct _PH_AVL_TREE PH_AVL_TREE |
typedef struct _PH_BARRIER PH_BARRIER |
An 8-bit string object, which supports ASCII, UTF-8 and Windows multi-byte encodings, as well as binary data.
typedef struct _PH_BYTES_BUILDER PH_BYTES_BUILDER |
A byte string builder structure.
This is similar to string builder, but is based on PH_BYTES and is suitable for general binary data.
typedef struct _PH_BYTESREF PH_BYTESREF |
typedef struct _PH_CALLBACK PH_CALLBACK |
A callback structure.
The callback object allows multiple callback functions to be registered and notified in a thread-safe way.
typedef struct _PH_CALLBACK_REGISTRATION PH_CALLBACK_REGISTRATION |
A callback registration structure.
A fast event object.
typedef struct _PH_FORMAT PH_FORMAT |
Describes an element to be formatted to a string.
typedef enum _PH_FORMAT_TYPE PH_FORMAT_TYPE |
typedef struct _PH_FREE_LIST PH_FREE_LIST |
typedef struct _PH_FREE_LIST_ENTRY PH_FREE_LIST_ENTRY |
typedef struct _PH_HANDLE_TABLE_ENTRY PH_HANDLE_TABLE_ENTRY |
typedef struct _PH_HASH_ENTRY PH_HASH_ENTRY |
typedef struct _PH_HASHTABLE PH_HASHTABLE |
A hashtable structure.
typedef struct _PH_HASHTABLE_ENTRY PH_HASHTABLE_ENTRY |
typedef struct _PH_HASHTABLE_ENUM_CONTEXT PH_HASHTABLE_ENUM_CONTEXT |
typedef struct _PH_INITONCE PH_INITONCE |
typedef struct _PH_KEY_VALUE_PAIR PH_KEY_VALUE_PAIR |
A list structure.
Storage is automatically allocated for new elements.
typedef struct _PH_POINTER_LIST PH_POINTER_LIST |
A pointer list structure.
The pointer list is similar to the normal list structure, but both insertions and deletions occur in constant time. The list is not ordered.
typedef struct _PH_PROVIDER_THREAD PH_PROVIDER_THREAD |
typedef struct _PH_RELATIVE_BYTESREF PH_RELATIVE_BYTESREF |
typedef struct _PH_RELATIVE_BYTESREF PH_RELATIVE_STRINGREF |
typedef struct _PH_RUNDOWN_PROTECT PH_RUNDOWN_PROTECT |
typedef struct _PH_RUNDOWN_WAIT_BLOCK PH_RUNDOWN_WAIT_BLOCK |
typedef struct _PH_STARTUP_PARAMETERS PH_STARTUP_PARAMETERS |
typedef struct _PH_STRING PH_STRING |
A 16-bit string object, which supports UTF-16.
typedef struct _PH_STRING_BUILDER PH_STRING_BUILDER |
A string builder structure.
The string builder object allows you to easily construct complex strings without allocating a great number of strings in the process.
typedef struct _PH_STRINGREF PH_STRINGREF |
typedef enum _PH_TREE_ENUMERATION_ORDER PH_TREE_ENUMERATION_ORDER |
typedef struct _PH_UNICODE_DECODER PH_UNICODE_DECODER |
typedef struct _PH_WORK_QUEUE PH_WORK_QUEUE |
typedef struct _PH_WORK_QUEUE_ITEM PH_WORK_QUEUE_ITEM |
typedef struct _PH_AVL_LINKS * PPH_AVL_LINKS |
typedef struct _PH_AVL_TREE * PPH_AVL_TREE |
typedef struct _PH_BARRIER * PPH_BARRIER |
typedef struct _PH_BYTES_BUILDER * PPH_BYTES_BUILDER |
typedef struct _PH_BYTESREF * PPH_BYTESREF |
typedef struct _PH_CALLBACK * PPH_CALLBACK |
typedef VOID(NTAPI * PPH_CALLBACK_FUNCTION)(_In_opt_ PVOID Parameter, _In_opt_ PVOID Context) |
A callback function.
Parameter | A value given to all callback functions being notified. |
Context | A user-defined value passed to PhRegisterCallback(). |
typedef struct _PH_CALLBACK_REGISTRATION * PPH_CALLBACK_REGISTRATION |
typedef LONG(NTAPI * PPH_COMPARE_FUNCTION)(_In_ PVOID Item1, _In_ PVOID Item2, _In_opt_ PVOID Context) |
typedef BOOLEAN(NTAPI * PPH_ENUM_AVL_TREE_CALLBACK)(_In_ PPH_AVL_TREE Tree, _In_ PPH_AVL_LINKS Element, _In_opt_ PVOID Context) |
typedef BOOLEAN(NTAPI * PPH_ENUM_HANDLE_TABLE_CALLBACK)(_In_ PPH_HANDLE_TABLE HandleTable, _In_ HANDLE Handle, _In_ PPH_HANDLE_TABLE_ENTRY HandleTableEntry, _In_opt_ PVOID Context) |
typedef struct _PH_FORMAT * PPH_FORMAT |
typedef struct _PH_FREE_LIST * PPH_FREE_LIST |
typedef struct _PH_FREE_LIST_ENTRY * PPH_FREE_LIST_ENTRY |
typedef struct _PH_HANDLE_TABLE* PPH_HANDLE_TABLE |
typedef struct _PH_HANDLE_TABLE_BASIC_INFORMATION * PPH_HANDLE_TABLE_BASIC_INFORMATION |
typedef struct _PH_HANDLE_TABLE_ENTRY * PPH_HANDLE_TABLE_ENTRY |
typedef struct _PH_HANDLE_TABLE_FLAGS_INFORMATION * PPH_HANDLE_TABLE_FLAGS_INFORMATION |
typedef struct _PH_HASH_ENTRY * PPH_HASH_ENTRY |
typedef struct _PH_HASHTABLE * PPH_HASHTABLE |
typedef BOOLEAN(NTAPI * PPH_HASHTABLE_COMPARE_FUNCTION)(_In_ PVOID Entry1, _In_ PVOID Entry2) |
typedef struct _PH_HASHTABLE_ENTRY * PPH_HASHTABLE_ENTRY |
typedef struct _PH_HASHTABLE_ENUM_CONTEXT * PPH_HASHTABLE_ENUM_CONTEXT |
typedef ULONG(NTAPI * PPH_HASHTABLE_HASH_FUNCTION)(_In_ PVOID Entry) |
A hash function used by a hashtable.
Entry | The entry. |
typedef struct _PH_INITONCE * PPH_INITONCE |
typedef struct _PH_KEY_VALUE_PAIR * PPH_KEY_VALUE_PAIR |
typedef struct _PH_OBJECT_TYPE* PPH_OBJECT_TYPE |
typedef struct _PH_POINTER_LIST * PPH_POINTER_LIST |
typedef struct _PH_RELATIVE_BYTESREF * PPH_RELATIVE_BYTESREF |
typedef struct _PH_RELATIVE_BYTESREF * PPH_RELATIVE_STRINGREF |
typedef struct _PH_RUNDOWN_PROTECT * PPH_RUNDOWN_PROTECT |
typedef struct _PH_RUNDOWN_WAIT_BLOCK * PPH_RUNDOWN_WAIT_BLOCK |
typedef struct _PH_STRING * PPH_STRING |
typedef struct _PH_STRING_BUILDER * PPH_STRING_BUILDER |
typedef struct _PH_STRINGREF * PPH_STRINGREF |
typedef struct _PH_UNICODE_DECODER * PPH_UNICODE_DECODER |
typedef struct _PH_WORK_QUEUE * PPH_WORK_QUEUE |
typedef struct _PH_WORK_QUEUE_ITEM * PPH_WORK_QUEUE_ITEM |
typedef VOID(NTAPI * PPH_WORK_QUEUE_ITEM_DELETE_FUNCTION)(_In_ PUSER_THREAD_START_ROUTINE Function, _In_ PVOID Context) |
enum _PH_FORMAT_TYPE |
_May_raise_ _Check_return_ _Ret_notnull_ _Post_writable_byte_size_ | ( | Size | ) |
_Success_ | ( | return! | = -1 | ) |
C_ASSERT | ( | sizeof(PH_EVENT) | = =sizeof(ULONG_PTR)+sizeof(HANDLE) | ) |
C_ASSERT | ( | PH_INITONCE_SHIFT >=FIELD_OFFSET(PH_EVENT, AvailableForUse)* | 8 | ) |
C_ASSERT | ( | FIELD_OFFSET(PH_FREE_LIST_ENTRY, ListEntry) | = =0x0 | ) |
C_ASSERT | ( | FIELD_OFFSET(PH_FREE_LIST_ENTRY, Body) | = =0x8 | ) |
typedef LONG | ( | NTAPI * | PPH_AVL_TREE_COMPARE_FUNCTION | ) |
PHLIBAPI PPH_STRING NTAPI PhaConcatStrings | ( | _In_ ULONG | Count, |
... | |||
) |
Definition at line 47 of file basesupa.c.
PHLIBAPI PPH_STRING NTAPI PhaConcatStrings2 | ( | _In_ PWSTR | String1, |
_In_ PWSTR | String2 | ||
) |
Definition at line 59 of file basesupa.c.
FORCEINLINE BOOLEAN PhAcquireRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI PPH_STRING NTAPI PhaCreateString | ( | _In_ PWSTR | Buffer | ) |
Definition at line 25 of file basesupa.c.
PHLIBAPI PPH_STRING NTAPI PhaCreateStringEx | ( | _In_opt_ PWSTR | Buffer, |
_In_ SIZE_T | Length | ||
) |
Definition at line 32 of file basesupa.c.
PHLIBAPI PPH_AVL_LINKS NTAPI PhAddElementAvlTree | ( | _Inout_ PPH_AVL_TREE | Tree, |
_Out_ PPH_AVL_LINKS | Element | ||
) |
FORCEINLINE VOID PhAddEntryHashSet | ( | _Inout_ PPH_HASH_ENTRY * | Buckets, |
_In_ ULONG | NumberOfBuckets, | ||
_Out_ PPH_HASH_ENTRY | Entry, | ||
_In_ ULONG | Hash | ||
) |
PHLIBAPI PVOID NTAPI PhAddEntryHashtable | ( | _Inout_ PPH_HASHTABLE | Hashtable, |
_In_ PVOID | Entry | ||
) |
Adds an entry to a hashtable.
Hashtable | A hashtable object. |
Entry | The entry to add. |
PHLIBAPI PVOID NTAPI PhAddEntryHashtableEx | ( | _Inout_ PPH_HASHTABLE | Hashtable, |
_In_ PVOID | Entry, | ||
_Out_opt_ PBOOLEAN | Added | ||
) |
Adds an entry to a hashtable or returns an existing one.
Hashtable | A hashtable object. |
Entry | The entry to add. |
Added | A variable which receives TRUE if a new entry was created, and FALSE if an existing entry was returned. |
PHLIBAPI HANDLE NTAPI PhAddItemPointerList | ( | _Inout_ PPH_POINTER_LIST | PointerList, |
_In_ PVOID | Pointer | ||
) |
PHLIBAPI PVOID NTAPI PhAddItemSimpleHashtable | ( | _Inout_ PPH_HASHTABLE | SimpleHashtable, |
_In_opt_ PVOID | Key, | ||
_In_opt_ PVOID | Value | ||
) |
PHLIBAPI PPH_STRING NTAPI PhaDuplicateString | ( | _In_ PPH_STRING | String | ) |
Definition at line 40 of file basesupa.c.
PHLIBAPI PPH_STRING NTAPI PhaFormatString | ( | _In_ _Printf_format_string_ PWSTR | Format, |
... | |||
) |
Definition at line 67 of file basesupa.c.
FORCEINLINE PVOID PhAllocateCopy | ( | _In_ PVOID | Data, |
_In_ SIZE_T | Size | ||
) |
PHLIBAPI PVOID NTAPI PhAllocateExSafe | ( | _In_ SIZE_T | Size, |
_In_ ULONG | Flags | ||
) |
PHLIBAPI PVOID NTAPI PhAllocateFromFreeList | ( | _Inout_ PPH_FREE_LIST | FreeList | ) |
Allocates a block of memory from a free list.
FreeList | A pointer to a free list object. |
_Check_return_ _Ret_maybenull_ PHLIBAPI PVOID NTAPI PhAllocatePage | ( | _In_ SIZE_T | Size, |
_Out_opt_ PSIZE_T | NewSize | ||
) |
Allocates pages of memory.
Size | The number of bytes to allocate. The number of pages allocated will be large enough to contain Size bytes. |
NewSize | The number of bytes actually allocated. This is Size rounded up to the next multiple of PAGE_SIZE. |
PHLIBAPI PVOID NTAPI PhAllocateSafe | ( | _In_ SIZE_T | Size | ) |
PHLIBAPI PPH_STRING NTAPI PhaLowerString | ( | _In_ PPH_STRING | String | ) |
Definition at line 79 of file basesupa.c.
PHLIBAPI VOID NTAPI PhAppendBytesBuilder | ( | _Inout_ PPH_BYTES_BUILDER | BytesBuilder, |
_In_ PPH_BYTESREF | Bytes | ||
) |
PHLIBAPI VOID NTAPI PhAppendBytesBuilder2 | ( | _Inout_ PPH_BYTES_BUILDER | BytesBuilder, |
_In_ PCHAR | Bytes | ||
) |
PHLIBAPI PVOID NTAPI PhAppendBytesBuilderEx | ( | _Inout_ PPH_BYTES_BUILDER | BytesBuilder, |
_In_opt_ PVOID | Buffer, | ||
_In_ SIZE_T | Length, | ||
_In_opt_ SIZE_T | Alignment, | ||
_Out_opt_ PSIZE_T | Offset | ||
) |
Appends a byte string to the end of a byte string builder string.
BytesBuilder | A byte string builder object. |
Buffer | The byte string to append. Specify NULL to simply reserve Length bytes. |
Length | The number of bytes to append. |
Alignment | The required alignment. This should not be greater than 8. |
Offset | A variable which receives the byte offset of the appended or reserved bytes in the byte string builder string. |
PHLIBAPI VOID NTAPI PhAppendCharStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ WCHAR | Character | ||
) |
PHLIBAPI VOID NTAPI PhAppendCharStringBuilder2 | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ WCHAR | Character, | ||
_In_ SIZE_T | Count | ||
) |
PHLIBAPI VOID NTAPI PhAppendFormatStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ _Printf_format_string_ PWSTR | Format, | ||
... | |||
) |
VOID NTAPI PhAppendFormatStringBuilder_V | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ _Printf_format_string_ PWSTR | Format, | ||
_In_ va_list | ArgPtr | ||
) |
PHLIBAPI VOID NTAPI PhAppendStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ PPH_STRINGREF | String | ||
) |
PHLIBAPI VOID NTAPI PhAppendStringBuilder2 | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ PWSTR | String | ||
) |
PHLIBAPI VOID NTAPI PhAppendStringBuilderEx | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_opt_ PWCHAR | String, | ||
_In_ SIZE_T | Length | ||
) |
FORCEINLINE BOOLEAN PhAreCharactersDifferent | ( | _In_ WCHAR | Char1, |
_In_ WCHAR | Char2 | ||
) |
PHLIBAPI PPH_STRING NTAPI PhaSubstring | ( | _In_ PPH_STRING | String, |
_In_ SIZE_T | StartIndex, | ||
_In_ SIZE_T | Count | ||
) |
Definition at line 103 of file basesupa.c.
PHLIBAPI PPH_STRING NTAPI PhaUpperString | ( | _In_ PPH_STRING | String | ) |
Definition at line 91 of file basesupa.c.
FORCEINLINE VOID PhBeginEnumHashtable | ( | _In_ PPH_HASHTABLE | Hashtable, |
_Out_ PPH_HASHTABLE_ENUM_CONTEXT | Context | ||
) |
FORCEINLINE BOOLEAN PhBeginInitOnce | ( | _Inout_ PPH_INITONCE | InitOnce | ) |
PHLIBAPI PPH_STRING NTAPI PhBufferToHexString | ( | _In_reads_bytes_(Length) PUCHAR | Buffer, |
_In_ ULONG | Length | ||
) |
PPH_STRING NTAPI PhBufferToHexStringEx | ( | _In_reads_bytes_(Length) PUCHAR | Buffer, |
_In_ ULONG | Length, | ||
_In_ BOOLEAN | UpperCase | ||
) |
PHLIBAPI VOID NTAPI PhClearHashtable | ( | _Inout_ PPH_HASHTABLE | Hashtable | ) |
FORCEINLINE LONG PhCompareBytesZ | ( | _In_ PSTR | String1, |
_In_ PSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE LONG PhCompareString | ( | _In_ PPH_STRING | String1, |
_In_ PPH_STRING | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE LONG PhCompareString2 | ( | _In_ PPH_STRING | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI LONG NTAPI PhCompareStringRef | ( | _In_ PPH_STRINGREF | String1, |
_In_ PPH_STRINGREF | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE LONG PhCompareStringRef2 | ( | _In_ PPH_STRINGREF | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE LONG PhCompareStringWithNull | ( | _In_opt_ PPH_STRING | String1, |
_In_opt_ PPH_STRING | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE LONG PhCompareStringZ | ( | _In_ PWSTR | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConcatStringRef2 | ( | _In_ PPH_STRINGREF | String1, |
_In_ PPH_STRINGREF | String2 | ||
) |
PPH_STRING NTAPI PhConcatStringRef3 | ( | _In_ PPH_STRINGREF | String1, |
_In_ PPH_STRINGREF | String2, | ||
_In_ PPH_STRINGREF | String3 | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConcatStrings | ( | _In_ ULONG | Count, |
... | |||
) |
PHLIBAPI PPH_STRING NTAPI PhConcatStrings2 | ( | _In_ PWSTR | String1, |
_In_ PWSTR | String2 | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConcatStrings_V | ( | _In_ ULONG | Count, |
_In_ va_list | ArgPtr | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConvertMultiByteToUtf16 | ( | _In_ PSTR | Buffer | ) |
PHLIBAPI PPH_STRING NTAPI PhConvertMultiByteToUtf16Ex | ( | _In_ PCHAR | Buffer, |
_In_ SIZE_T | Length | ||
) |
FORCEINLINE PPH_BYTES PhConvertUtf16ToAscii | ( | _In_ PWSTR | Buffer, |
_In_opt_ CHAR | Replacement | ||
) |
PHLIBAPI BOOLEAN NTAPI PhConvertUtf16ToUtf8Buffer | ( | _Out_writes_bytes_to_(MaxBytesInUtf8String,*BytesInUtf8String) PCH | Utf8String, |
_In_ SIZE_T | MaxBytesInUtf8String, | ||
_Out_opt_ PSIZE_T | BytesInUtf8String, | ||
_In_reads_bytes_(BytesInUtf16String) PWCH | Utf16String, | ||
_In_ SIZE_T | BytesInUtf16String | ||
) |
PHLIBAPI BOOLEAN NTAPI PhConvertUtf16ToUtf8Size | ( | _Out_ PSIZE_T | BytesInUtf8String, |
_In_reads_bytes_(BytesInUtf16String) PWCH | Utf16String, | ||
_In_ SIZE_T | BytesInUtf16String | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConvertUtf8ToUtf16 | ( | _In_ PSTR | Buffer | ) |
PHLIBAPI BOOLEAN NTAPI PhConvertUtf8ToUtf16Buffer | ( | _Out_writes_bytes_to_(MaxBytesInUtf16String,*BytesInUtf16String) PWCH | Utf16String, |
_In_ SIZE_T | MaxBytesInUtf16String, | ||
_Out_opt_ PSIZE_T | BytesInUtf16String, | ||
_In_reads_bytes_(BytesInUtf8String) PCH | Utf8String, | ||
_In_ SIZE_T | BytesInUtf8String | ||
) |
PHLIBAPI PPH_STRING NTAPI PhConvertUtf8ToUtf16Ex | ( | _In_ PCHAR | Buffer, |
_In_ SIZE_T | Length | ||
) |
PHLIBAPI BOOLEAN NTAPI PhConvertUtf8ToUtf16Size | ( | _Out_ PSIZE_T | BytesInUtf16String, |
_In_reads_bytes_(BytesInUtf8String) PCH | Utf8String, | ||
_In_ SIZE_T | BytesInUtf8String | ||
) |
PHLIBAPI BOOLEAN NTAPI PhCopyBytesZ | ( | _In_ PSTR | InputBuffer, |
_In_ SIZE_T | InputCount, | ||
_Out_writes_opt_z_(OutputCount) PSTR | OutputBuffer, | ||
_In_ SIZE_T | OutputCount, | ||
_Out_opt_ PSIZE_T | ReturnCount | ||
) |
Copies a string with optional null termination and a maximum number of characters.
InputBuffer | A pointer to the input string. |
InputCount | The maximum number of characters to copy, not including the null terminator. Specify -1 for no limit. |
OutputBuffer | A pointer to the output buffer. |
OutputCount | The number of characters in the output buffer, including the null terminator. |
ReturnCount | A variable which receives the number of characters required to contain the input string, including the null terminator. If the function returns TRUE, this variable contains the number of characters written to the output buffer. |
PHLIBAPI BOOLEAN NTAPI PhCopyStringZ | ( | _In_ PWSTR | InputBuffer, |
_In_ SIZE_T | InputCount, | ||
_Out_writes_opt_z_(OutputCount) PWSTR | OutputBuffer, | ||
_In_ SIZE_T | OutputCount, | ||
_Out_opt_ PSIZE_T | ReturnCount | ||
) |
Copies a string with optional null termination and a maximum number of characters.
InputBuffer | A pointer to the input string. |
InputCount | The maximum number of characters to copy, not including the null terminator. Specify -1 for no limit. |
OutputBuffer | A pointer to the output buffer. |
OutputCount | The number of characters in the output buffer, including the null terminator. |
ReturnCount | A variable which receives the number of characters required to contain the input string, including the null terminator. If the function returns TRUE, this variable contains the number of characters written to the output buffer. |
PHLIBAPI BOOLEAN NTAPI PhCopyStringZFromBytes | ( | _In_ PSTR | InputBuffer, |
_In_ SIZE_T | InputCount, | ||
_Out_writes_opt_z_(OutputCount) PWSTR | OutputBuffer, | ||
_In_ SIZE_T | OutputCount, | ||
_Out_opt_ PSIZE_T | ReturnCount | ||
) |
Copies a string with optional null termination and a maximum number of characters.
InputBuffer | A pointer to the input string. |
InputCount | The maximum number of characters to copy, not including the null terminator. Specify -1 for no limit. |
OutputBuffer | A pointer to the output buffer. |
OutputCount | The number of characters in the output buffer, including the null terminator. |
ReturnCount | A variable which receives the number of characters required to contain the input string, including the null terminator. If the function returns TRUE, this variable contains the number of characters written to the output buffer. |
PHLIBAPI BOOLEAN NTAPI PhCopyStringZFromMultiByte | ( | _In_ PSTR | InputBuffer, |
_In_ SIZE_T | InputCount, | ||
_Out_writes_opt_z_(OutputCount) PWSTR | OutputBuffer, | ||
_In_ SIZE_T | OutputCount, | ||
_Out_opt_ PSIZE_T | ReturnCount | ||
) |
Copies a string with optional null termination and a maximum number of characters.
InputBuffer | A pointer to the input string. |
InputCount | The maximum number of characters to copy, not including the null terminator. Specify -1 for no limit. |
OutputBuffer | A pointer to the output buffer. |
OutputCount | The number of characters in the output buffer, including the null terminator. |
ReturnCount | A variable which receives the number of characters required to contain the input string, including the null terminator. If the function returns TRUE, this variable contains the number of characters written to the output buffer. |
FORCEINLINE ULONG PhCountHashSet | ( | _In_ PPH_HASH_ENTRY * | Buckets, |
_In_ ULONG | NumberOfBuckets | ||
) |
PHLIBAPI SIZE_T NTAPI PhCountStringZ | ( | _In_ PWSTR | String | ) |
FORCEINLINE PPH_BYTES PhCreateBytes2 | ( | _In_ PPH_BYTESREF | Bytes | ) |
HANDLE NTAPI PhCreateHandle | ( | _Inout_ PPH_HANDLE_TABLE | HandleTable, |
_In_ PPH_HANDLE_TABLE_ENTRY | HandleTableEntry | ||
) |
PPH_HANDLE_TABLE NTAPI PhCreateHandleTable | ( | VOID | ) |
FORCEINLINE PPH_HASH_ENTRY* PhCreateHashSet | ( | _In_ ULONG | NumberOfBuckets | ) |
PHLIBAPI PPH_HASHTABLE NTAPI PhCreateHashtable | ( | _In_ ULONG | EntrySize, |
_In_ PPH_HASHTABLE_COMPARE_FUNCTION | CompareFunction, | ||
_In_ PPH_HASHTABLE_HASH_FUNCTION | HashFunction, | ||
_In_ ULONG | InitialCapacity | ||
) |
Creates a hashtable object.
EntrySize | The size of each hashtable entry, in bytes. |
CompareFunction | A comparison function that is executed to compare two hashtable entries. |
HashFunction | A hash function that is executed to generate a hash code for a hashtable entry. |
InitialCapacity | The number of entries to allocate storage for initially. |
PHLIBAPI PPH_POINTER_LIST NTAPI PhCreatePointerList | ( | _In_ ULONG | InitialCapacity | ) |
PHLIBAPI PPH_HASHTABLE NTAPI PhCreateSimpleHashtable | ( | _In_ ULONG | InitialCapacity | ) |
PHLIBAPI PPH_STRING NTAPI PhCreateString | ( | _In_ PWSTR | Buffer | ) |
FORCEINLINE PPH_STRING PhCreateString2 | ( | _In_ PPH_STRINGREF | String | ) |
PHLIBAPI PPH_STRING NTAPI PhCreateStringEx | ( | _In_opt_ PWCHAR | Buffer, |
_In_ SIZE_T | Length | ||
) |
FORCEINLINE PPH_STRING PhCreateStringFromUnicodeString | ( | _In_ PUNICODE_STRING | UnicodeString | ) |
PHLIBAPI HANDLE NTAPI PhCreateThread | ( | _In_opt_ SIZE_T | StackSize, |
_In_ PUSER_THREAD_START_ROUTINE | StartAddress, | ||
_In_opt_ PVOID | Parameter | ||
) |
PHLIBAPI BOOLEAN NTAPI PhDecodeUnicodeDecoder | ( | _Inout_ PPH_UNICODE_DECODER | Decoder, |
_Out_ PULONG | CodePoint | ||
) |
PHLIBAPI VOID NTAPI PhDeleteBytesBuilder | ( | _Inout_ PPH_BYTES_BUILDER | BytesBuilder | ) |
PHLIBAPI VOID NTAPI PhDeleteCallback | ( | _Inout_ PPH_CALLBACK | Callback | ) |
PHLIBAPI VOID NTAPI PhDeleteFreeList | ( | _Inout_ PPH_FREE_LIST | FreeList | ) |
PHLIBAPI VOID NTAPI PhDeleteStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder | ) |
PHLIBAPI VOID NTAPI PhDeleteWorkQueue | ( | _Inout_ PPH_WORK_QUEUE | WorkQueue | ) |
Frees resources used by a work queue.
WorkQueue | A work queue object. |
Definition at line 137 of file workqueue.c.
BOOLEAN NTAPI PhDestroyHandle | ( | _Inout_ PPH_HANDLE_TABLE | HandleTable, |
_In_ HANDLE | Handle, | ||
_In_opt_ PPH_HANDLE_TABLE_ENTRY | HandleTableEntry | ||
) |
VOID NTAPI PhDestroyHandleTable | ( | _In_ _Post_invalid_ PPH_HANDLE_TABLE | HandleTable | ) |
FORCEINLINE VOID PhDistributeHashSet | ( | _Inout_ PPH_HASH_ENTRY * | NewBuckets, |
_In_ ULONG | NumberOfNewBuckets, | ||
_In_ PPH_HASH_ENTRY * | OldBuckets, | ||
_In_ ULONG | NumberOfOldBuckets | ||
) |
Moves entries from one hash set to another.
NewBuckets | The new bucket array. |
NumberOfNewBuckets | The number of buckets in NewBuckets. |
OldBuckets | The old bucket array. |
NumberOfOldBuckets | The number of buckets in OldBuckets. |
PHLIBAPI NTSTATUS NTAPI PhDosErrorToNtStatus | ( | _In_ ULONG | DosError | ) |
PHLIBAPI PSTR NTAPI PhDuplicateBytesZ | ( | _In_ PSTR | String | ) |
PHLIBAPI PSTR NTAPI PhDuplicateBytesZSafe | ( | _In_ PSTR | String | ) |
FORCEINLINE PPH_STRING PhDuplicateString | ( | _In_ PPH_STRING | String | ) |
PHLIBAPI PWSTR NTAPI PhDuplicateStringZ | ( | _In_ PWSTR | String | ) |
PHLIBAPI BOOLEAN NTAPI PhEncodeUnicode | ( | _In_ UCHAR | Encoding, |
_In_ ULONG | CodePoint, | ||
_Out_opt_ PVOID | CodeUnits, | ||
_Out_ PULONG | NumberOfCodeUnits | ||
) |
FORCEINLINE BOOLEAN PhEndsWithString | ( | _In_ PPH_STRING | String, |
_In_ PPH_STRING | Suffix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEndsWithString2 | ( | _In_ PPH_STRING | String, |
_In_ PWSTR | Suffix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEndsWithStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ PPH_STRINGREF | Suffix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEndsWithStringRef2 | ( | _In_ PPH_STRINGREF | String, |
_In_ PWSTR | Suffix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI VOID NTAPI PhEnumAvlTree | ( | _In_ PPH_AVL_TREE | Tree, |
_In_ PH_TREE_ENUMERATION_ORDER | Order, | ||
_In_ PPH_ENUM_AVL_TREE_CALLBACK | Callback, | ||
_In_opt_ PVOID | Context | ||
) |
VOID NTAPI PhEnumHandleTable | ( | _In_ PPH_HANDLE_TABLE | HandleTable, |
_In_ PPH_ENUM_HANDLE_TABLE_CALLBACK | Callback, | ||
_In_opt_ PVOID | Context | ||
) |
PHLIBAPI BOOLEAN NTAPI PhEnumHashtable | ( | _In_ PPH_HASHTABLE | Hashtable, |
_Out_ PVOID * | Entry, | ||
_Inout_ PULONG | EnumerationKey | ||
) |
Enumerates the entries in a hashtable.
Hashtable | A hashtable object. |
Entry | A variable which receives a pointer to the hashtable entry. The pointer is valid until the hashtable is modified. |
EnumerationKey | A variable which is initialized to 0 before first calling this function. |
FORCEINLINE BOOLEAN PhEnumPointerList | ( | _In_ PPH_POINTER_LIST | PointerList, |
_Inout_ PULONG | EnumerationKey, | ||
_Out_ PVOID * | Pointer | ||
) |
PHLIBAPI BOOLEAN NTAPI PhEnumPointerListEx | ( | _In_ PPH_POINTER_LIST | PointerList, |
_Inout_ PULONG | EnumerationKey, | ||
_Out_ PVOID * | Pointer, | ||
_Out_ PHANDLE | PointerHandle | ||
) |
FORCEINLINE BOOLEAN PhEqualBytesZ | ( | _In_ PSTR | String1, |
_In_ PSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEqualString | ( | _In_ PPH_STRING | String1, |
_In_ PPH_STRING | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEqualString2 | ( | _In_ PPH_STRING | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI BOOLEAN NTAPI PhEqualStringRef | ( | _In_ PPH_STRINGREF | String1, |
_In_ PPH_STRINGREF | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEqualStringRef2 | ( | _In_ PPH_STRINGREF | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhEqualStringZ | ( | _In_ PWSTR | String1, |
_In_ PWSTR | String2, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI ULONG NTAPI PhExponentiate | ( | _In_ ULONG | Base, |
_In_ ULONG | Exponent | ||
) |
PHLIBAPI ULONG64 NTAPI PhExponentiate64 | ( | _In_ ULONG64 | Base, |
_In_ ULONG | Exponent | ||
) |
PHLIBAPI BOOLEAN FASTCALL PhfAcquireRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI BOOLEAN FASTCALL PhfBeginInitOnce | ( | _Inout_ PPH_INITONCE | InitOnce | ) |
PHLIBAPI VOID FASTCALL PhfEndInitOnce | ( | _Inout_ PPH_INITONCE | InitOnce | ) |
PHLIBAPI VOID NTAPI PhFillMemoryUlong | ( | _Inout_updates_(Count) _Needs_align_(4) PULONG | Memory, |
_In_ ULONG | Value, | ||
_In_ SIZE_T | Count | ||
) |
PHLIBAPI PPH_BYTES NTAPI PhFinalBytesBuilderBytes | ( | _Inout_ PPH_BYTES_BUILDER | BytesBuilder | ) |
Obtains a reference to the byte string constructed by a byte string builder object and frees resources used by the object.
BytesBuilder | A byte string builder object. |
PHLIBAPI PPH_STRING NTAPI PhFinalStringBuilderString | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder | ) |
Obtains a reference to the string constructed by a string builder object and frees resources used by the object.
StringBuilder | A string builder object. |
FORCEINLINE ULONG_PTR PhFindCharInString | ( | _In_ PPH_STRING | String, |
_In_ SIZE_T | StartIndex, | ||
_In_ WCHAR | Char | ||
) |
Locates a character in a string.
String | The string to search. |
StartIndex | The index, in characters, to start searching at. |
Char | The character to search for. |
PHLIBAPI ULONG_PTR NTAPI PhFindCharInStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ WCHAR | Character, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
Locates a character in a string.
String | The string to search. |
Character | The character to search for. |
IgnoreCase | TRUE to perform a case-insensitive search, otherwise FALSE. |
PHLIBAPI PPH_AVL_LINKS NTAPI PhFindElementAvlTree | ( | _In_ PPH_AVL_TREE | Tree, |
_In_ PPH_AVL_LINKS | Element | ||
) |
PHLIBAPI PPH_AVL_LINKS NTAPI PhFindElementAvlTree2 | ( | _In_ PPH_AVL_TREE | Tree, |
_In_ PPH_AVL_LINKS | Element, | ||
_Out_ PLONG | Result | ||
) |
FORCEINLINE PPH_HASH_ENTRY PhFindEntryHashSet | ( | _In_ PPH_HASH_ENTRY * | Buckets, |
_In_ ULONG | NumberOfBuckets, | ||
_In_ ULONG | Hash | ||
) |
Begins the process of finding an entry in a hash set.
Buckets | The bucket array. |
NumberOfBuckets | The number of buckets. |
Hash | The hash for the entry. |
PHLIBAPI PVOID NTAPI PhFindEntryHashtable | ( | _In_ PPH_HASHTABLE | Hashtable, |
_In_ PVOID | Entry | ||
) |
Locates an entry in a hashtable.
Hashtable | A hashtable object. |
Entry | An entry representing the entry to find. |
PHLIBAPI HANDLE NTAPI PhFindItemPointerList | ( | _In_ PPH_POINTER_LIST | PointerList, |
_In_ PVOID | Pointer | ||
) |
Locates a pointer in a pointer list.
PointerList | A pointer list object. |
Pointer | The pointer to find. The pointer must be at least 2 byte aligned. |
PHLIBAPI PVOID* NTAPI PhFindItemSimpleHashtable | ( | _In_ PPH_HASHTABLE | SimpleHashtable, |
_In_opt_ PVOID | Key | ||
) |
FORCEINLINE PVOID NTAPI PhFindItemSimpleHashtable2 | ( | _In_ PPH_HASHTABLE | SimpleHashtable, |
_In_opt_ PVOID | Key | ||
) |
FORCEINLINE ULONG_PTR PhFindLastCharInString | ( | _In_ PPH_STRING | String, |
_In_ SIZE_T | StartIndex, | ||
_In_ WCHAR | Char | ||
) |
Locates a character in a string, backwards.
String | The string to search. |
StartIndex | The index, in characters, to start searching at. |
Char | The character to search for. |
PHLIBAPI ULONG_PTR NTAPI PhFindLastCharInStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ WCHAR | Character, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
Locates a character in a string, searching backwards.
String | The string to search. |
Character | The character to search for. |
IgnoreCase | TRUE to perform a case-insensitive search, otherwise FALSE. |
FORCEINLINE ULONG_PTR PhFindStringInString | ( | _In_ PPH_STRING | String, |
_In_ SIZE_T | StartIndex, | ||
_In_ PWSTR | SubString | ||
) |
Locates a string in a string.
String | The string to search. |
StartIndex | The index, in characters, to start searching at. |
SubString | The string to search for. |
PHLIBAPI ULONG_PTR NTAPI PhFindStringInStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ PPH_STRINGREF | SubString, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
Locates a string in a string.
String | The string to search. |
SubString | The string to search for. |
IgnoreCase | TRUE to perform a case-insensitive search, otherwise FALSE. |
PHLIBAPI VOID FASTCALL PhfInitializeBarrier | ( | _Out_ PPH_BARRIER | Barrier, |
_In_ ULONG_PTR | Target | ||
) |
PHLIBAPI VOID FASTCALL PhfInitializeInitOnce | ( | _Out_ PPH_INITONCE | InitOnce | ) |
PHLIBAPI VOID FASTCALL PhfInitializeRundownProtection | ( | _Out_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI PPH_STRING NTAPI PhFormat | ( | _In_reads_(Count) PPH_FORMAT | Format, |
_In_ ULONG | Count, | ||
_In_opt_ SIZE_T | InitialCapacity | ||
) |
PHLIBAPI PPH_STRING NTAPI PhFormatString | ( | _In_ _Printf_format_string_ PWSTR | Format, |
... | |||
) |
PHLIBAPI PPH_STRING NTAPI PhFormatString_V | ( | _In_ _Printf_format_string_ PWSTR | Format, |
_In_ va_list | ArgPtr | ||
) |
PHLIBAPI BOOLEAN NTAPI PhFormatToBuffer | ( | _In_reads_(Count) PPH_FORMAT | Format, |
_In_ ULONG | Count, | ||
_Out_writes_bytes_opt_(BufferLength) PWSTR | Buffer, | ||
_In_opt_ SIZE_T | BufferLength, | ||
_Out_opt_ PSIZE_T | ReturnLength | ||
) |
Writes a formatted string to a buffer.
Format | An array of format structures. |
Count | The number of structures supplied in Format. |
Buffer | A buffer. If NULL, no data is written. |
BufferLength | The number of bytes available in Buffer, including space for the null terminator. |
ReturnLength | The number of bytes required to hold the string, including the null terminator. |
Frees pages of memory allocated with PhAllocatePage().
Memory | A pointer to a block of memory. |
PHLIBAPI VOID NTAPI PhFreeToFreeList | ( | _Inout_ PPH_FREE_LIST | FreeList, |
_In_ PVOID | Memory | ||
) |
PHLIBAPI VOID FASTCALL PhfReleaseRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI BOOLEAN FASTCALL PhfWaitForBarrier | ( | _Inout_ PPH_BARRIER | Barrier, |
_In_ BOOLEAN | Spin | ||
) |
Waits until all threads are blocking on the barrier, and resets the state of the barrier.
Barrier | A barrier. |
Spin | TRUE to spin on the barrier before blocking, FALSE to block immediately. |
PHLIBAPI BOOLEAN FASTCALL PhfWaitForEvent | ( | _Inout_ PPH_EVENT | Event, |
_In_opt_ PLARGE_INTEGER | Timeout | ||
) |
Waits for an event object to be set.
Event | A pointer to an event object. |
Timeout | The timeout value. |
PHLIBAPI VOID FASTCALL PhfWaitForRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI ULONG NTAPI PhGetPrimeNumber | ( | _In_ ULONG | Minimum | ) |
FORCEINLINE PVOID PhGetProcedureAddress | ( | _In_ PVOID | DllHandle, |
_In_opt_ PSTR | ProcedureName, | ||
_In_opt_ ULONG | ProcedureNumber | ||
) |
FORCEINLINE PWSTR PhGetString | ( | _In_opt_ PPH_STRING | String | ) |
FORCEINLINE PWSTR PhGetStringOrDefault | ( | _In_opt_ PPH_STRING | String, |
_In_ PWSTR | DefaultString | ||
) |
Retrieves a pointer to a string object's buffer or returns the specified alternative string.
String | A pointer to a string object. |
DefaultString | The alternative string. |
FORCEINLINE PWSTR PhGetStringOrEmpty | ( | _In_opt_ PPH_STRING | String | ) |
FORCEINLINE PH_STRINGREF PhGetStringRef | ( | _In_opt_ PPH_STRING | String | ) |
PHLIBAPI ULONG NTAPI PhHashBytes | ( | _In_reads_(Length) PUCHAR | Bytes, |
_In_ SIZE_T | Length | ||
) |
PHLIBAPI ULONG NTAPI PhHashStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ BOOLEAN | IgnoreCase | ||
) |
PHLIBAPI BOOLEAN NTAPI PhHexStringToBuffer | ( | _In_ PPH_STRINGREF | String, |
_Out_writes_bytes_(String->Length/sizeof(WCHAR)/2) PUCHAR | Buffer | ||
) |
Converts a sequence of hexadecimal digits into a byte array.
String | A string containing hexadecimal digits to convert. The string must have an even number of digits, because each pair of hexadecimal digits represents one byte. Example: "129a2eff5c0b". |
Buffer | The output buffer. |
PHLIBAPI VOID NTAPI PhInitializeAvlTree | ( | _Out_ PPH_AVL_TREE | Tree, |
_In_ PPH_AVL_TREE_COMPARE_FUNCTION | CompareFunction | ||
) |
FORCEINLINE VOID PhInitializeBarrier | ( | _Out_ PPH_BARRIER | Barrier, |
_In_ ULONG_PTR | Target | ||
) |
BOOLEAN PhInitializeBase | ( | _In_ ULONG | Flags | ) |
PHLIBAPI VOID NTAPI PhInitializeBytesBuilder | ( | _Out_ PPH_BYTES_BUILDER | BytesBuilder, |
_In_ SIZE_T | InitialCapacity | ||
) |
FORCEINLINE VOID PhInitializeBytesRef | ( | _Out_ PPH_BYTESREF | Bytes, |
_In_ PSTR | Buffer | ||
) |
PHLIBAPI VOID NTAPI PhInitializeCallback | ( | _Out_ PPH_CALLBACK | Callback | ) |
FORCEINLINE VOID PhInitializeEmptyStringRef | ( | _Out_ PPH_STRINGREF | String | ) |
PHLIBAPI VOID NTAPI PhInitializeFreeList | ( | _Out_ PPH_FREE_LIST | FreeList, |
_In_ SIZE_T | Size, | ||
_In_ ULONG | MaximumCount | ||
) |
FORCEINLINE VOID PhInitializeHashSet | ( | _Out_ PPH_HASH_ENTRY * | Buckets, |
_In_ ULONG | NumberOfBuckets | ||
) |
NTSTATUS PhInitializePhLibEx | ( | _In_ ULONG | Flags, |
_In_opt_ SIZE_T | HeapReserveSize, | ||
_In_opt_ SIZE_T | HeapCommitSize | ||
) |
FORCEINLINE VOID PhInitializeRundownProtection | ( | _Out_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI VOID NTAPI PhInitializeStringBuilder | ( | _Out_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | InitialCapacity | ||
) |
FORCEINLINE VOID PhInitializeStringRef | ( | _Out_ PPH_STRINGREF | String, |
_In_ PWSTR | Buffer | ||
) |
FORCEINLINE VOID PhInitializeStringRefLongHint | ( | _Out_ PPH_STRINGREF | String, |
_In_ PWSTR | Buffer | ||
) |
FORCEINLINE VOID PhInitializeUnicodeDecoder | ( | _Out_ PPH_UNICODE_DECODER | Decoder, |
_In_ UCHAR | Encoding | ||
) |
PHLIBAPI VOID NTAPI PhInitializeWorkQueue | ( | _Out_ PPH_WORK_QUEUE | WorkQueue, |
_In_ ULONG | MinimumThreads, | ||
_In_ ULONG | MaximumThreads, | ||
_In_ ULONG | NoWorkTimeout | ||
) |
Initializes a work queue.
WorkQueue | A work queue object. |
MinimumThreads | The suggested minimum number of threads to keep alive, even when there is no work to be performed. |
MaximumThreads | The suggested maximum number of threads to create. |
NoWorkTimeout | The number of milliseconds after which threads without work will terminate. |
Definition at line 101 of file workqueue.c.
PHLIBAPI VOID NTAPI PhInsertStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | Index, | ||
_In_ PPH_STRINGREF | String | ||
) |
PHLIBAPI VOID NTAPI PhInsertStringBuilder2 | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | Index, | ||
_In_ PWSTR | String | ||
) |
PHLIBAPI VOID NTAPI PhInsertStringBuilderEx | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | Index, | ||
_In_opt_ PWCHAR | String, | ||
_In_ SIZE_T | Length | ||
) |
Inserts a string into a string builder string.
StringBuilder | A string builder object. |
Index | The index, in characters, at which to insert the string. |
String | The string to insert. Specify NULL to simply reserve Length bytes at Index. |
Length | The number of bytes to insert. |
PHLIBAPI PPH_STRING NTAPI PhIntegerToString64 | ( | _In_ LONG64 | Integer, |
_In_opt_ ULONG | Base, | ||
_In_ BOOLEAN | Signed | ||
) |
Converts an integer to a string.
Integer | The integer to process. |
Base | The base which the integer is represented with. The maximum value is
|
Signed | TRUE if Integer is a signed value, otherwise FALSE. |
PHLIBAPI VOID NTAPI PhInvokeCallback | ( | _In_ PPH_CALLBACK | Callback, |
_In_opt_ PVOID | Parameter | ||
) |
FORCEINLINE BOOLEAN PhIsNullOrEmptyString | ( | _In_opt_ PPH_STRING | String | ) |
PHLIBAPI VOID NTAPI PhLocalTimeToSystemTime | ( | _In_ PLARGE_INTEGER | LocalTime, |
_Out_ PLARGE_INTEGER | SystemTime | ||
) |
Converts local time to system time.
LocalTime | A local time value. |
SystemTime | A variable which receives the UTC time value. This may be the same variable as LocalTime. |
BOOLEAN NTAPI PhLockHandleTableEntry | ( | _Inout_ PPH_HANDLE_TABLE | HandleTable, |
_Inout_ PPH_HANDLE_TABLE_ENTRY | HandleTableEntry | ||
) |
PPH_HANDLE_TABLE_ENTRY NTAPI PhLookupHandleTableEntry | ( | _In_ PPH_HANDLE_TABLE | HandleTable, |
_In_ HANDLE | Handle | ||
) |
FORCEINLINE VOID PhLowerString | ( | _Inout_ PPH_STRING | String | ) |
PHLIBAPI PPH_AVL_LINKS NTAPI PhMaximumElementAvlTree | ( | _In_ PPH_AVL_TREE | Tree | ) |
PHLIBAPI PPH_AVL_LINKS NTAPI PhMinimumElementAvlTree | ( | _In_ PPH_AVL_TREE | Tree | ) |
FORCEINLINE PVOID PhNextEnumHashtable | ( | _Inout_ PPH_HASHTABLE_ENUM_CONTEXT | Context | ) |
PHLIBAPI BOOLEAN NTAPI PhNtStatusFileNotFound | ( | _In_ NTSTATUS | Status | ) |
PHLIBAPI ULONG NTAPI PhNtStatusToDosError | ( | _In_ NTSTATUS | Status | ) |
FORCEINLINE PVOID PhOffsetBytesBuilder | ( | _In_ PPH_BYTES_BUILDER | BytesBuilder, |
_In_ SIZE_T | Offset | ||
) |
PHLIBAPI PPH_AVL_LINKS NTAPI PhPredecessorElementAvlTree | ( | _In_ PPH_AVL_LINKS | Element | ) |
PHLIBAPI VOID NTAPI PhPrintTimeSpan | ( | _Out_writes_(PH_TIMESPAN_STR_LEN_1) PWSTR | Destination, |
_In_ ULONG64 | Ticks, | ||
_In_opt_ ULONG | Mode | ||
) |
NTSTATUS NTAPI PhQueryInformationHandleTable | ( | _In_ PPH_HANDLE_TABLE | HandleTable, |
_In_ PH_HANDLE_TABLE_INFORMATION_CLASS | InformationClass, | ||
_Out_writes_bytes_opt_(BufferLength) PVOID | Buffer, | ||
_In_ ULONG | BufferLength, | ||
_Out_opt_ PULONG | ReturnLength | ||
) |
PHLIBAPI VOID NTAPI PhQueueItemGlobalWorkQueue | ( | _In_ PUSER_THREAD_START_ROUTINE | Function, |
_In_opt_ PVOID | Context | ||
) |
Queues a work item to the global work queue.
Function | A function to execute. |
Context | A user-defined value to pass to the function. |
Definition at line 421 of file workqueue.c.
PHLIBAPI VOID NTAPI PhQueueItemWorkQueue | ( | _Inout_ PPH_WORK_QUEUE | WorkQueue, |
_In_ PUSER_THREAD_START_ROUTINE | Function, | ||
_In_opt_ PVOID | Context | ||
) |
Queues a work item to a work queue.
WorkQueue | A work queue object. |
Function | A function to execute. |
Context | A user-defined value to pass to the function. |
Definition at line 363 of file workqueue.c.
VOID PhQueueItemWorkQueueEx | ( | _Inout_ PPH_WORK_QUEUE | WorkQueue, |
_In_ PUSER_THREAD_START_ROUTINE | Function, | ||
_In_opt_ PVOID | Context, | ||
_In_opt_ PPH_WORK_QUEUE_ITEM_DELETE_FUNCTION | DeleteFunction | ||
) |
Queues a work item to a work queue.
WorkQueue | A work queue object. |
Function | A function to execute. |
Context | A user-defined value to pass to the function. |
DeleteFunction | A callback function that is executed when the work queue item is about to be freed. |
Definition at line 380 of file workqueue.c.
PHLIBAPI PVOID NTAPI PhReAllocateSafe | ( | _In_ PVOID | Memory, |
_In_ SIZE_T | Size | ||
) |
Re-allocates a block of memory originally allocated with PhAllocate().
Memory | A pointer to a block of memory. |
Size | The new size of the memory block, in bytes. |
PHLIBAPI PPH_STRING NTAPI PhReferenceEmptyString | ( | VOID | ) |
PHLIBAPI VOID NTAPI PhRegisterCallback | ( | _Inout_ PPH_CALLBACK | Callback, |
_In_ PPH_CALLBACK_FUNCTION | Function, | ||
_In_opt_ PVOID | Context, | ||
_Out_ PPH_CALLBACK_REGISTRATION | Registration | ||
) |
Registers a callback function to be notified.
Callback | A pointer to a callback object. |
Function | The callback function. |
Context | A user-defined value to pass to the callback function. |
Registration | A variable which receives registration information for the callback. Do not modify the contents of this structure and do not free the storage for this structure until you have unregistered the callback. |
PHLIBAPI VOID NTAPI PhRegisterCallbackEx | ( | _Inout_ PPH_CALLBACK | Callback, |
_In_ PPH_CALLBACK_FUNCTION | Function, | ||
_In_opt_ PVOID | Context, | ||
_In_ USHORT | Flags, | ||
_Out_ PPH_CALLBACK_REGISTRATION | Registration | ||
) |
Registers a callback function to be notified.
Callback | A pointer to a callback object. |
Function | The callback function. |
Context | A user-defined value to pass to the callback function. |
Flags | A combination of flags controlling the callback. Set this parameter to 0. |
Registration | A variable which receives registration information for the callback. Do not modify the contents of this structure and do not free the storage for this structure until you have unregistered the callback. |
FORCEINLINE VOID PhReleaseRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI VOID NTAPI PhRemoveElementAvlTree | ( | _Inout_ PPH_AVL_TREE | Tree, |
_Inout_ PPH_AVL_LINKS | Element | ||
) |
FORCEINLINE VOID PhRemoveEndStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | Count | ||
) |
FORCEINLINE VOID PhRemoveEntryHashSet | ( | _Inout_ PPH_HASH_ENTRY * | Buckets, |
_In_ ULONG | NumberOfBuckets, | ||
_Inout_ PPH_HASH_ENTRY | Entry | ||
) |
PHLIBAPI BOOLEAN NTAPI PhRemoveEntryHashtable | ( | _Inout_ PPH_HASHTABLE | Hashtable, |
_In_ PVOID | Entry | ||
) |
Removes an entry from a hashtable.
Hashtable | A hashtable object. |
Entry | The entry to remove. |
PHLIBAPI VOID NTAPI PhRemoveItemPointerList | ( | _Inout_ PPH_POINTER_LIST | PointerList, |
_In_ HANDLE | PointerHandle | ||
) |
PHLIBAPI BOOLEAN NTAPI PhRemoveItemSimpleHashtable | ( | _Inout_ PPH_HASHTABLE | SimpleHashtable, |
_In_opt_ PVOID | Key | ||
) |
PHLIBAPI VOID NTAPI PhRemoveStringBuilder | ( | _Inout_ PPH_STRING_BUILDER | StringBuilder, |
_In_ SIZE_T | StartIndex, | ||
_In_ SIZE_T | Count | ||
) |
FORCEINLINE VOID PhResizeHashSet | ( | _Inout_ PPH_HASH_ENTRY ** | Buckets, |
_Inout_ PULONG | NumberOfBuckets, | ||
_In_ ULONG | NewNumberOfBuckets | ||
) |
Resizes a hash set.
Buckets | A pointer to the bucket array. On return the new bucket array is stored in this variable. |
NumberOfBuckets | A pointer to the number of buckets. On return the new number of buckets is stored in this variable. |
NewNumberOfBuckets | The new number of buckets. |
FORCEINLINE VOID PhReverseStringRef | ( | _In_ PPH_STRINGREF | String | ) |
PHLIBAPI ULONG NTAPI PhRoundUpToPowerOfTwo | ( | _In_ ULONG | Number | ) |
NTSTATUS NTAPI PhSetInformationHandleTable | ( | _Inout_ PPH_HANDLE_TABLE | HandleTable, |
_In_ PH_HANDLE_TABLE_INFORMATION_CLASS | InformationClass, | ||
_In_reads_bytes_(BufferLength) PVOID | Buffer, | ||
_In_ ULONG | BufferLength | ||
) |
FORCEINLINE VOID PhSkipStringRef | ( | _Inout_ PPH_STRINGREF | String, |
_In_ LONG_PTR | Length | ||
) |
PHLIBAPI BOOLEAN NTAPI PhSplitStringRefAtChar | ( | _In_ PPH_STRINGREF | Input, |
_In_ WCHAR | Separator, | ||
_Out_ PPH_STRINGREF | FirstPart, | ||
_Out_ PPH_STRINGREF | SecondPart | ||
) |
Splits a string.
Input | The input string. |
Separator | The character to split at. |
FirstPart | A variable which receives the part of Input before the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to Input. |
SecondPart | A variable which recieves the part of Input after the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to an empty string. |
PHLIBAPI BOOLEAN NTAPI PhSplitStringRefAtLastChar | ( | _In_ PPH_STRINGREF | Input, |
_In_ WCHAR | Separator, | ||
_Out_ PPH_STRINGREF | FirstPart, | ||
_Out_ PPH_STRINGREF | SecondPart | ||
) |
Splits a string at the last occurrence of a character.
Input | The input string. |
Separator | The character to split at. |
FirstPart | A variable which receives the part of Input before the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to Input. |
SecondPart | A variable which recieves the part of Input after the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to an empty string. |
PHLIBAPI BOOLEAN NTAPI PhSplitStringRefAtString | ( | _In_ PPH_STRINGREF | Input, |
_In_ PPH_STRINGREF | Separator, | ||
_In_ BOOLEAN | IgnoreCase, | ||
_Out_ PPH_STRINGREF | FirstPart, | ||
_Out_ PPH_STRINGREF | SecondPart | ||
) |
Splits a string.
Input | The input string. |
Separator | The string to split at. |
IgnoreCase | TRUE to perform a case-insensitive search, otherwise FALSE. |
FirstPart | A variable which receives the part of Input before the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to Input. |
SecondPart | A variable which recieves the part of Input after the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to an empty string. |
PHLIBAPI BOOLEAN NTAPI PhSplitStringRefEx | ( | _In_ PPH_STRINGREF | Input, |
_In_ PPH_STRINGREF | Separator, | ||
_In_ ULONG | Flags, | ||
_Out_ PPH_STRINGREF | FirstPart, | ||
_Out_ PPH_STRINGREF | SecondPart, | ||
_Out_opt_ PPH_STRINGREF | SeparatorPart | ||
) |
Splits a string.
Input | The input string. |
Separator | The character set, string or range to split at. |
Flags | A combination of flags.
|
FirstPart | A variable which receives the part of Input before the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to Input. |
SecondPart | A variable which recieves the part of Input after the separator. This may be the same variable as Input. If the separator is not found in Input, this variable is set to an empty string. |
SeparatorPart | A variable which receives the part of Input that is the separator. If the separator is not found in Input, this variable is set to an empty string. |
FORCEINLINE BOOLEAN PhStartsWithString | ( | _In_ PPH_STRING | String, |
_In_ PPH_STRING | Prefix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhStartsWithString2 | ( | _In_ PPH_STRING | String, |
_In_ PWSTR | Prefix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhStartsWithStringRef | ( | _In_ PPH_STRINGREF | String, |
_In_ PPH_STRINGREF | Prefix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhStartsWithStringRef2 | ( | _In_ PPH_STRINGREF | String, |
_In_ PWSTR | Prefix, | ||
_In_ BOOLEAN | IgnoreCase | ||
) |
FORCEINLINE BOOLEAN PhStringRefToUnicodeString | ( | _In_ PPH_STRINGREF | String, |
_Out_ PUNICODE_STRING | UnicodeString | ||
) |
PHLIBAPI BOOLEAN NTAPI PhStringToInteger64 | ( | _In_ PPH_STRINGREF | String, |
_In_opt_ ULONG | Base, | ||
_Out_opt_ PLONG64 | Integer | ||
) |
Converts a string to an integer.
String | The string to process. |
Base | The base which the string uses to represent the integer. The maximum value is
|
Integer | The resulting integer. |
0x
Base 16. 0o
Base 8. 0b
Base 2. 0t
Base 3. 0q
Base 4. 0w
Base 12. 0r
Base 32.If there is no recognized prefix, base 10 is used.
FORCEINLINE PPH_STRING PhSubstring | ( | _In_ PPH_STRING | String, |
_In_ SIZE_T | StartIndex, | ||
_In_ SIZE_T | Count | ||
) |
PHLIBAPI PPH_AVL_LINKS NTAPI PhSuccessorElementAvlTree | ( | _In_ PPH_AVL_LINKS | Element | ) |
VOID NTAPI PhSweepHandleTable | ( | _In_ PPH_HANDLE_TABLE | HandleTable, |
_In_ PPH_ENUM_HANDLE_TABLE_CALLBACK | Callback, | ||
_In_opt_ PVOID | Context | ||
) |
PHLIBAPI VOID NTAPI PhSystemTimeToLocalTime | ( | _In_ PLARGE_INTEGER | SystemTime, |
_Out_ PLARGE_INTEGER | LocalTime | ||
) |
Converts system time to local time.
SystemTime | A UTC time value. |
LocalTime | A variable which receives the local time value. This may be the same variable as SystemTime. |
FORCEINLINE BOOLEAN PhTestEvent | ( | _In_ PPH_EVENT | Event | ) |
FORCEINLINE BOOLEAN PhTestInitOnce | ( | _In_ PPH_INITONCE | InitOnce | ) |
PHLIBAPI VOID NTAPI PhTrimStringRef | ( | _Inout_ PPH_STRINGREF | String, |
_In_ PPH_STRINGREF | CharSet, | ||
_In_ ULONG | Flags | ||
) |
FORCEINLINE VOID PhTrimToNullTerminatorString | ( | _Inout_ PPH_STRING | String | ) |
FORCEINLINE VOID PhUnicodeStringToStringRef | ( | _In_ PUNICODE_STRING | UnicodeString, |
_Out_ PPH_STRINGREF | String | ||
) |
VOID NTAPI PhUnlockHandleTableEntry | ( | _Inout_ PPH_HANDLE_TABLE | HandleTable, |
_Inout_ PPH_HANDLE_TABLE_ENTRY | HandleTableEntry | ||
) |
PHLIBAPI VOID NTAPI PhUnregisterCallback | ( | _Inout_ PPH_CALLBACK | Callback, |
_Inout_ PPH_CALLBACK_REGISTRATION | Registration | ||
) |
Unregisters a callback function.
Callback | A pointer to a callback object. |
Registration | The structure returned by PhRegisterCallback(). |
FORCEINLINE VOID PhUpperString | ( | _Inout_ PPH_STRING | String | ) |
FORCEINLINE BOOLEAN PhWaitForEvent | ( | _Inout_ PPH_EVENT | Event, |
_In_opt_ PLARGE_INTEGER | Timeout | ||
) |
FORCEINLINE VOID PhWaitForRundownProtection | ( | _Inout_ PPH_RUNDOWN_PROTECT | Protection | ) |
PHLIBAPI VOID NTAPI PhWaitForWorkQueue | ( | _Inout_ PPH_WORK_QUEUE | WorkQueue | ) |
Waits for all queued work items to be executed.
WorkQueue | A work queue object. |
Definition at line 184 of file workqueue.c.
Definition at line 47 of file workqueue.c.
PHLIBAPI BOOLEAN NTAPI PhWriteUnicodeDecoder | ( | _Inout_ PPH_UNICODE_DECODER | Decoder, |
_In_ ULONG | CodeUnit | ||
) |
FORCEINLINE PPH_STRING PhZeroExtendToUtf16 | ( | _In_ PSTR | Input | ) |
PHLIBAPI VOID NTAPI PhZeroExtendToUtf16Buffer | ( | _In_reads_bytes_(InputLength) PCH | Input, |
_In_ SIZE_T | InputLength, | ||
_Out_writes_bytes_(InputLength *sizeof(WCHAR)) PWCH | Output | ||
) |
PHLIBAPI PPH_STRING NTAPI PhZeroExtendToUtf16Ex | ( | _In_reads_bytes_(InputLength) PCH | Input, |
_In_ SIZE_T | InputLength | ||
) |
PHLIBAPI _User_set_ PWSTR PhApplicationName |
PPH_OBJECT_TYPE PhBytesType |
PPH_OBJECT_TYPE PhHashtableType |
WCHAR* PhIoPriorityHintNames[MaxIoPriorityTypes] |
WCHAR* PhKThreadStateNames[MaximumThreadState] |
PHLIBAPI _User_set_ PVOID PhLibImageBase |
PPH_OBJECT_TYPE PhListType |
PPH_OBJECT_TYPE PhPointerListType |
PPH_OBJECT_TYPE PhStringType |
PHLIBAPI SYSTEM_BASIC_INFORMATION PhSystemBasicInformation |
PH_STRINGREF PhUnicodeByteOrderMark |
_May_raise_ _In_ SIZE_T Size |