Zig 0.17.0-dev (Split by item)

This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig library itself.

relocateCsrssAddress

Takes an address in the CSRSS address space's mapped view of the shared memory region, and returns the corresponding address in our mapped view of the shared memory region.

windows.relocateCsrssAddress
fn relocateCsrssAddress(addr: u64) *const anyopaque

File

lib/std/os/windows.zig:6008

Code

fn relocateCsrssAddress(addr: u64) *const anyopaque {
    const base: [*]const u8 = @ptrCast(peb().ReadOnlySharedMemoryBase);
    const offset: usize = @intCast(addr - peb().CsrServerReadOnlySharedMemoryBase);
    return base + offset;
}