Use a generator expression ($<$<COMPILE_LANGUAGE:C,CXX>:/Gz>) so the MSVC /Gz (stdcall) compiler flag is applied only for C and C++ compilations. This avoids injecting the option for other languages.
Stop converting the DOS error to an NT status before calling PhExitApplication in ExitProcess_Stub; pass the original uExitCode directly. This removes the PhDosErrorToNtStatus conversion which could produce an incorrect value and aligns the call with PhExitApplication's expected parameter.
Introduce per-graph cached fonts and DPI tracking to avoid global font handle replacement across windows. Replace the previous global queued-lock/lastDpi/iconTitleFont approach with per-drawinfo caching, and ensure graph contexts free their cached fonts on destroy. When copying draw-info between users, only copy the public prefix using FIELD_OFFSET to avoid copying cache fields. Also fix font height adjustments to use PhMultiplyDivideSigned.
Add an assert in PhReferenceObjectEx to ensure the previous reference count (oldRefCount) is >= 0 after the interlocked add. This debug-time check helps detect reference-count underflow issues during development.
Introduce a mapping from object type indices to PH_HANDLE_OBJECT_TYPE and lazy-initialize it (PhEnsureHandleObjectTypeTable). Add helpers PhGetHandleObjectType, PhIsObjectTypeIndex and PhGetObjectTypeNameEx. Refactor PhpGetBestObjectName to switch on the enum instead of doing repeated string comparisons, simplify per-type name resolution and update many type-specific query/duplication paths. Adjust PhGetObjectBasicInformation pointer/handle count corrections to account for Windows version differences, and update PhGetHandleInformationEx to accept/use ObjectTypeNumber for more reliable decisions when fetching names.