ULONG64_C - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
//
// Typed integer literal macros with MSVC compiler extensions and C99 portable fallbacks.
//
// MSVC:        Employs Microsoft integer literal suffixes (i8/ui8, i16/ui16, i32/ui32,
//              i64/ui64, i128/ui128) to enforce type correctness at compile time.
//              Example: UINT16_C(42) produces a uint16_t constant.
//
// Non-MSVC:    Standard typed literal syntax unavailable. Macros are pass-through for
//              smaller types (relying on type inference) or use standard C suffixes
//              (U, ULL, LL) for larger types. Trade-off: reduced type checking; casts
//              may suppress compile-time diagnostics for overflow/truncation.
//
// Naming:      "_C" suffix conforms to C99 conventions (INT32_C, UINT64_C, etc.)
//
// Organization (sorted by size, then logical grouping):
//
// 1. Boolean type                    - (1 byte) (C89/C99)
// 2. Character types                 - (1-2 bytes) (C89/C99)
// 3. Short types                     - (2 bytes) (C89/C99)
// 4. Half-pointer types              - (2-4 bytes) (Windows-specific)
// 5. Int types                       - (4 bytes) (C89/C99)
// 6. Long types                      - (4-8 bytes) (C89/C99)
// 7. Floating-point types            - (4-8 bytes) (C89/C99)
// 8. NT cardinal types               - (2-4 bytes) (Windows NT-specific)
// 9. Pointer-sized types             - (4-8 bytes) (C99 + platform-dependent)
// 10. Standard C99 fixed-width types - (1-8 bytes) (C99 core)
// 11. Windows-specific types         - (1-8 bytes) (Windows API)
// 12. 128-bit integer types          - (16 bytes) (MSVC extension)
#ifndef _NTTYPESAFE_H_INCLUDED_
#ifndef ULONG64_C
#if defined(_MSC_VER)

#define ULONG64_C(x) (x##ui64)

#endif
#endif
#endif

View code on GitHub
//
// Typed integer literal macros with MSVC compiler extensions and C99 portable fallbacks.
//
// MSVC:        Employs Microsoft integer literal suffixes (i8/ui8, i16/ui16, i32/ui32,
//              i64/ui64, i128/ui128) to enforce type correctness at compile time.
//              Example: UINT16_C(42) produces a uint16_t constant.
//
// Non-MSVC:    Standard typed literal syntax unavailable. Macros are pass-through for
//              smaller types (relying on type inference) or use standard C suffixes
//              (U, ULL, LL) for larger types. Trade-off: reduced type checking; casts
//              may suppress compile-time diagnostics for overflow/truncation.
//
// Naming:      "_C" suffix conforms to C99 conventions (INT32_C, UINT64_C, etc.)
//
// Organization (sorted by size, then logical grouping):
//
// 1. Boolean type                    - (1 byte) (C89/C99)
// 2. Character types                 - (1-2 bytes) (C89/C99)
// 3. Short types                     - (2 bytes) (C89/C99)
// 4. Half-pointer types              - (2-4 bytes) (Windows-specific)
// 5. Int types                       - (4 bytes) (C89/C99)
// 6. Long types                      - (4-8 bytes) (C89/C99)
// 7. Floating-point types            - (4-8 bytes) (C89/C99)
// 8. NT cardinal types               - (2-4 bytes) (Windows NT-specific)
// 9. Pointer-sized types             - (4-8 bytes) (C99 + platform-dependent)
// 10. Standard C99 fixed-width types - (1-8 bytes) (C99 core)
// 11. Windows-specific types         - (1-8 bytes) (Windows API)
// 12. 128-bit integer types          - (16 bytes) (MSVC extension)
#ifndef _NTTYPESAFE_H_INCLUDED_
#ifndef ULONG64_C
#if defined(_MSC_VER)
// ...
#else

#define ULONG64_C(x) (x##ULL)

#endif
#endif
#endif

View code on GitHub

NtDoc

No description available.