github.com/tailscale/wireguard-go@v0.0.20201119-0.20210522003738-46b531feb08a/tun/wintun/memmod/syscall_windows_64.go (about)

     1  // +build windows,amd64 windows,arm64
     2  
     3  /* SPDX-License-Identifier: MIT
     4   *
     5   * Copyright (C) 2017-2021 WireGuard LLC. All Rights Reserved.
     6   */
     7  
     8  package memmod
     9  
    10  // Optional header format
    11  type IMAGE_OPTIONAL_HEADER struct {
    12  	Magic                       uint16
    13  	MajorLinkerVersion          uint8
    14  	MinorLinkerVersion          uint8
    15  	SizeOfCode                  uint32
    16  	SizeOfInitializedData       uint32
    17  	SizeOfUninitializedData     uint32
    18  	AddressOfEntryPoint         uint32
    19  	BaseOfCode                  uint32
    20  	ImageBase                   uintptr
    21  	SectionAlignment            uint32
    22  	FileAlignment               uint32
    23  	MajorOperatingSystemVersion uint16
    24  	MinorOperatingSystemVersion uint16
    25  	MajorImageVersion           uint16
    26  	MinorImageVersion           uint16
    27  	MajorSubsystemVersion       uint16
    28  	MinorSubsystemVersion       uint16
    29  	Win32VersionValue           uint32
    30  	SizeOfImage                 uint32
    31  	SizeOfHeaders               uint32
    32  	CheckSum                    uint32
    33  	Subsystem                   uint16
    34  	DllCharacteristics          uint16
    35  	SizeOfStackReserve          uintptr
    36  	SizeOfStackCommit           uintptr
    37  	SizeOfHeapReserve           uintptr
    38  	SizeOfHeapCommit            uintptr
    39  	LoaderFlags                 uint32
    40  	NumberOfRvaAndSizes         uint32
    41  	DataDirectory               [IMAGE_NUMBEROF_DIRECTORY_ENTRIES]IMAGE_DATA_DIRECTORY
    42  }
    43  
    44  const IMAGE_ORDINAL_FLAG uintptr = 0x8000000000000000