// Generated by Lisette bindgen
// Source: syscall (Go stdlib)
// Go: 1.25.10
// Lisette: 0.2.1
import "go:sync"
pub enum Errno: uintptr {
E2BIG = 536870912,
EACCES = 536870913,
EADDRINUSE = 536870914,
EADDRNOTAVAIL = 536870915,
EADV = 536870916,
EAFNOSUPPORT = 536870917,
EAGAIN = 536870918,
EALREADY = 536870919,
EBADE = 536870920,
EBADF = 536870921,
EBADFD = 536870922,
EBADMSG = 536870923,
EBADR = 536870924,
EBADRQC = 536870925,
EBADSLT = 536870926,
EBFONT = 536870927,
EBUSY = 536870928,
ECANCELED = 536870929,
ECHILD = 536870930,
ECHRNG = 536870931,
ECOMM = 536870932,
ECONNABORTED = 536870933,
ECONNREFUSED = 536870934,
ECONNRESET = 536870935,
EDEADLK = 536870936,
EDEADLOCK = 536870937,
EDESTADDRREQ = 536870938,
EDOM = 536870939,
EDOTDOT = 536870940,
EDQUOT = 536870941,
EEXIST = 536870942,
EFAULT = 536870943,
EFBIG = 536870944,
EHOSTDOWN = 536870945,
EHOSTUNREACH = 536870946,
EIDRM = 536870947,
EILSEQ = 536870948,
EINPROGRESS = 536870949,
EINTR = 536870950,
EINVAL = 536870951,
EIO = 536870952,
EISCONN = 536870953,
EISDIR = 536870954,
EISNAM = 536870955,
EKEYEXPIRED = 536870956,
EKEYREJECTED = 536870957,
EKEYREVOKED = 536870958,
EL2HLT = 536870959,
EL2NSYNC = 536870960,
EL3HLT = 536870961,
EL3RST = 536870962,
ELIBACC = 536870963,
ELIBBAD = 536870964,
ELIBEXEC = 536870965,
ELIBMAX = 536870966,
ELIBSCN = 536870967,
ELNRNG = 536870968,
ELOOP = 536870969,
EMEDIUMTYPE = 536870970,
EMFILE = 536870971,
EMLINK = 536870972,
EMSGSIZE = 536870973,
EMULTIHOP = 536870974,
ENAMETOOLONG = 536870975,
ENAVAIL = 536870976,
ENETDOWN = 536870977,
ENETRESET = 536870978,
ENETUNREACH = 536870979,
ENFILE = 536870980,
ENOANO = 536870981,
ENOBUFS = 536870982,
ENOCSI = 536870983,
ENODATA = 536870984,
ENODEV = 536870985,
ENOENT = 2,
ENOEXEC = 536870986,
ENOKEY = 536870987,
ENOLCK = 536870988,
ENOLINK = 536870989,
ENOMEDIUM = 536870990,
ENOMEM = 536870991,
ENOMSG = 536870992,
ENONET = 536870993,
ENOPKG = 536870994,
ENOPROTOOPT = 536870995,
ENOSPC = 536870996,
ENOSR = 536870997,
ENOSTR = 536870998,
ENOSYS = 536870999,
ENOTBLK = 536871000,
ENOTCONN = 536871001,
ENOTDIR = 3,
ENOTEMPTY = 536871002,
ENOTNAM = 536871003,
ENOTRECOVERABLE = 536871004,
ENOTSOCK = 536871005,
ENOTSUP = 536871006,
ENOTTY = 536871007,
ENOTUNIQ = 536871008,
ENXIO = 536871009,
EOPNOTSUPP = 536871010,
EOVERFLOW = 536871011,
EOWNERDEAD = 536871012,
EPERM = 536871013,
EPFNOSUPPORT = 536871014,
EPIPE = 536871015,
EPROTO = 536871016,
EPROTONOSUPPORT = 536871017,
EPROTOTYPE = 536871018,
ERANGE = 536871019,
EREMCHG = 536871020,
EREMOTE = 536871021,
EREMOTEIO = 536871022,
ERESTART = 536871023,
EROFS = 536871024,
ERROR_ACCESS_DENIED = 5,
ERROR_ALREADY_EXISTS = 183,
ERROR_BROKEN_PIPE = 109,
ERROR_BUFFER_OVERFLOW = 111,
ERROR_DIR_NOT_EMPTY = 145,
ERROR_ENVVAR_NOT_FOUND = 203,
ERROR_FILE_EXISTS = 80,
ERROR_FILE_NOT_FOUND = 2,
ERROR_HANDLE_EOF = 38,
ERROR_INSUFFICIENT_BUFFER = 122,
ERROR_IO_PENDING = 997,
ERROR_MOD_NOT_FOUND = 126,
ERROR_MORE_DATA = 234,
ERROR_NETNAME_DELETED = 64,
ERROR_NOT_FOUND = 1168,
ERROR_NO_MORE_FILES = 18,
ERROR_OPERATION_ABORTED = 995,
ERROR_PATH_NOT_FOUND = 3,
ERROR_PRIVILEGE_NOT_HELD = 1314,
ERROR_PROC_NOT_FOUND = 127,
ESHUTDOWN = 536871025,
ESOCKTNOSUPPORT = 536871026,
ESPIPE = 536871027,
ESRCH = 536871028,
ESRMNT = 536871029,
ESTALE = 536871030,
ESTRPIPE = 536871031,
ETIME = 536871032,
ETIMEDOUT = 536871033,
ETOOMANYREFS = 536871034,
ETXTBSY = 536871035,
EUCLEAN = 536871036,
EUNATCH = 536871037,
EUSERS = 536871038,
EWINDOWS = 536871042,
EWOULDBLOCK = 536871039,
EXDEV = 536871040,
EXFULL = 536871041,
WSAEACCES = 10013,
WSAECONNABORTED = 10053,
WSAECONNRESET = 10054,
WSAENOPROTOOPT = 10042,
}
pub const E2BIG: Errno = 536870912
pub const EACCES: Errno = 536870913
pub const EADDRINUSE: Errno = 536870914
pub const EADDRNOTAVAIL: Errno = 536870915
pub const EADV: Errno = 536870916
pub const EAFNOSUPPORT: Errno = 536870917
pub const EAGAIN: Errno = 536870918
pub const EALREADY: Errno = 536870919
pub const EBADE: Errno = 536870920
pub const EBADF: Errno = 536870921
pub const EBADFD: Errno = 536870922
pub const EBADMSG: Errno = 536870923
pub const EBADR: Errno = 536870924
pub const EBADRQC: Errno = 536870925
pub const EBADSLT: Errno = 536870926
pub const EBFONT: Errno = 536870927
pub const EBUSY: Errno = 536870928
pub const ECANCELED: Errno = 536870929
pub const ECHILD: Errno = 536870930
pub const ECHRNG: Errno = 536870931
pub const ECOMM: Errno = 536870932
pub const ECONNABORTED: Errno = 536870933
pub const ECONNREFUSED: Errno = 536870934
pub const ECONNRESET: Errno = 536870935
pub const EDEADLK: Errno = 536870936
pub const EDEADLOCK: Errno = 536870937
pub const EDESTADDRREQ: Errno = 536870938
pub const EDOM: Errno = 536870939
pub const EDOTDOT: Errno = 536870940
pub const EDQUOT: Errno = 536870941
pub const EEXIST: Errno = 536870942
pub const EFAULT: Errno = 536870943
pub const EFBIG: Errno = 536870944
pub const EHOSTDOWN: Errno = 536870945
pub const EHOSTUNREACH: Errno = 536870946
pub const EIDRM: Errno = 536870947
pub const EILSEQ: Errno = 536870948
pub const EINPROGRESS: Errno = 536870949
pub const EINTR: Errno = 536870950
pub const EINVAL: Errno = 536870951
pub const EIO: Errno = 536870952
pub const EISCONN: Errno = 536870953
pub const EISDIR: Errno = 536870954
pub const EISNAM: Errno = 536870955
pub const EKEYEXPIRED: Errno = 536870956
pub const EKEYREJECTED: Errno = 536870957
pub const EKEYREVOKED: Errno = 536870958
pub const EL2HLT: Errno = 536870959
pub const EL2NSYNC: Errno = 536870960
pub const EL3HLT: Errno = 536870961
pub const EL3RST: Errno = 536870962
pub const ELIBACC: Errno = 536870963
pub const ELIBBAD: Errno = 536870964
pub const ELIBEXEC: Errno = 536870965
pub const ELIBMAX: Errno = 536870966
pub const ELIBSCN: Errno = 536870967
pub const ELNRNG: Errno = 536870968
pub const ELOOP: Errno = 536870969
pub const EMEDIUMTYPE: Errno = 536870970
pub const EMFILE: Errno = 536870971
pub const EMLINK: Errno = 536870972
pub const EMSGSIZE: Errno = 536870973
pub const EMULTIHOP: Errno = 536870974
pub const ENAMETOOLONG: Errno = 536870975
pub const ENAVAIL: Errno = 536870976
pub const ENETDOWN: Errno = 536870977
pub const ENETRESET: Errno = 536870978
pub const ENETUNREACH: Errno = 536870979
pub const ENFILE: Errno = 536870980
pub const ENOANO: Errno = 536870981
pub const ENOBUFS: Errno = 536870982
pub const ENOCSI: Errno = 536870983
pub const ENODATA: Errno = 536870984
pub const ENODEV: Errno = 536870985
pub const ENOENT: Errno = 2
pub const ENOEXEC: Errno = 536870986
pub const ENOKEY: Errno = 536870987
pub const ENOLCK: Errno = 536870988
pub const ENOLINK: Errno = 536870989
pub const ENOMEDIUM: Errno = 536870990
pub const ENOMEM: Errno = 536870991
pub const ENOMSG: Errno = 536870992
pub const ENONET: Errno = 536870993
pub const ENOPKG: Errno = 536870994
pub const ENOPROTOOPT: Errno = 536870995
pub const ENOSPC: Errno = 536870996
pub const ENOSR: Errno = 536870997
pub const ENOSTR: Errno = 536870998
pub const ENOSYS: Errno = 536870999
pub const ENOTBLK: Errno = 536871000
pub const ENOTCONN: Errno = 536871001
pub const ENOTDIR: Errno = 3
pub const ENOTEMPTY: Errno = 536871002
pub const ENOTNAM: Errno = 536871003
pub const ENOTRECOVERABLE: Errno = 536871004
pub const ENOTSOCK: Errno = 536871005
pub const ENOTSUP: Errno = 536871006
pub const ENOTTY: Errno = 536871007
pub const ENOTUNIQ: Errno = 536871008
pub const ENXIO: Errno = 536871009
pub const EOPNOTSUPP: Errno = 536871010
pub const EOVERFLOW: Errno = 536871011
pub const EOWNERDEAD: Errno = 536871012
pub const EPERM: Errno = 536871013
pub const EPFNOSUPPORT: Errno = 536871014
pub const EPIPE: Errno = 536871015
pub const EPROTO: Errno = 536871016
pub const EPROTONOSUPPORT: Errno = 536871017
pub const EPROTOTYPE: Errno = 536871018
pub const ERANGE: Errno = 536871019
pub const EREMCHG: Errno = 536871020
pub const EREMOTE: Errno = 536871021
pub const EREMOTEIO: Errno = 536871022
pub const ERESTART: Errno = 536871023
pub const EROFS: Errno = 536871024
pub const ERROR_ACCESS_DENIED: Errno = 5
pub const ERROR_ALREADY_EXISTS: Errno = 183
pub const ERROR_BROKEN_PIPE: Errno = 109
pub const ERROR_BUFFER_OVERFLOW: Errno = 111
pub const ERROR_DIR_NOT_EMPTY: Errno = 145
pub const ERROR_ENVVAR_NOT_FOUND: Errno = 203
pub const ERROR_FILE_EXISTS: Errno = 80
pub const ERROR_FILE_NOT_FOUND: Errno = 2
pub const ERROR_HANDLE_EOF: Errno = 38
pub const ERROR_INSUFFICIENT_BUFFER: Errno = 122
pub const ERROR_IO_PENDING: Errno = 997
pub const ERROR_MOD_NOT_FOUND: Errno = 126
pub const ERROR_MORE_DATA: Errno = 234
pub const ERROR_NETNAME_DELETED: Errno = 64
pub const ERROR_NOT_FOUND: Errno = 1168
pub const ERROR_NO_MORE_FILES: Errno = 18
pub const ERROR_OPERATION_ABORTED: Errno = 995
pub const ERROR_PATH_NOT_FOUND: Errno = 3
pub const ERROR_PRIVILEGE_NOT_HELD: Errno = 1314
pub const ERROR_PROC_NOT_FOUND: Errno = 127
pub const ESHUTDOWN: Errno = 536871025
pub const ESOCKTNOSUPPORT: Errno = 536871026
pub const ESPIPE: Errno = 536871027
pub const ESRCH: Errno = 536871028
pub const ESRMNT: Errno = 536871029
pub const ESTALE: Errno = 536871030
pub const ESTRPIPE: Errno = 536871031
pub const ETIME: Errno = 536871032
pub const ETIMEDOUT: Errno = 536871033
pub const ETOOMANYREFS: Errno = 536871034
pub const ETXTBSY: Errno = 536871035
pub const EUCLEAN: Errno = 536871036
pub const EUNATCH: Errno = 536871037
pub const EUSERS: Errno = 536871038
pub const EWINDOWS: Errno = 536871042
pub const EWOULDBLOCK: Errno = 536871039
pub const EXDEV: Errno = 536871040
pub const EXFULL: Errno = 536871041
pub const WSAEACCES: Errno = 10013
pub const WSAECONNABORTED: Errno = 10053
pub const WSAECONNRESET: Errno = 10054
pub const WSAENOPROTOOPT: Errno = 10042
pub enum Signal: int {
SIGABRT = 6,
SIGALRM = 14,
SIGBUS = 7,
SIGFPE = 8,
SIGHUP = 1,
SIGILL = 4,
SIGINT = 2,
SIGKILL = 9,
SIGPIPE = 13,
SIGQUIT = 3,
SIGSEGV = 11,
SIGTERM = 15,
SIGTRAP = 5,
}
pub const SIGABRT: Signal = 6
pub const SIGALRM: Signal = 14
pub const SIGBUS: Signal = 7
pub const SIGFPE: Signal = 8
pub const SIGHUP: Signal = 1
pub const SIGILL: Signal = 4
pub const SIGINT: Signal = 2
pub const SIGKILL: Signal = 9
pub const SIGPIPE: Signal = 13
pub const SIGQUIT: Signal = 3
pub const SIGSEGV: Signal = 11
pub const SIGTERM: Signal = 15
pub const SIGTRAP: Signal = 5
pub fn Accept(fd: Handle) -> Result<(Handle, Sockaddr), error>
pub fn AcceptEx(
ls: Handle,
as_: Handle,
buf: Ref<byte>,
rxdatalen: uint32,
laddrlen: uint32,
raddrlen: uint32,
recvd: Ref<uint32>,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
pub fn Bind(fd: Handle, sa: Sockaddr) -> Result<(), error>
/// BytePtrFromString returns a pointer to a NUL-terminated array of
/// bytes containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn BytePtrFromString(s: string) -> Result<Ref<byte>, error>
/// ByteSliceFromString returns a NUL-terminated slice of bytes
/// containing the text of s. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]).
pub fn ByteSliceFromString(s: string) -> Result<Slice<byte>, error>
pub fn CancelIo(s: Handle) -> Result<(), error>
pub fn CancelIoEx(s: Handle, o: Ref<Overlapped>) -> Result<(), error>
pub fn CertAddCertificateContextToStore(
store: Handle,
certContext: Ref<CertContext>,
addDisposition: uint32,
storeContext: Ref<Ref<CertContext>>,
) -> Result<(), error>
pub fn CertCloseStore(store: Handle, flags: uint32) -> Result<(), error>
pub fn CertCreateCertificateContext(
certEncodingType: uint32,
certEncoded: Ref<byte>,
encodedLen: uint32,
) -> Result<Ref<CertContext>, error>
pub fn CertEnumCertificatesInStore(store: Handle, prevContext: Ref<CertContext>) -> Result<Ref<CertContext>, error>
pub fn CertFreeCertificateChain(ctx: Ref<CertChainContext>)
pub fn CertFreeCertificateContext(ctx: Ref<CertContext>) -> Result<(), error>
pub fn CertGetCertificateChain(
engine: Handle,
leaf: Ref<CertContext>,
time: Ref<Filetime>,
additionalStore: Handle,
para: Ref<CertChainPara>,
flags: uint32,
reserved: uint,
chainCtx: Ref<Ref<CertChainContext>>,
) -> Result<(), error>
pub fn CertOpenStore(
storeProvider: uint,
msgAndCertEncodingType: uint32,
cryptProv: uint,
flags: uint32,
para: uint,
) -> Result<Handle, error>
pub fn CertOpenSystemStore(hprov: Handle, name: Ref<uint16>) -> Result<Handle, error>
pub fn CertVerifyCertificateChainPolicy(
policyOID: uint,
chain: Ref<CertChainContext>,
para: Ref<CertChainPolicyPara>,
status: Ref<CertChainPolicyStatus>,
) -> Result<(), error>
pub fn Chdir(path: string) -> Result<(), error>
pub fn Chmod(path: string, mode: uint32) -> Result<(), error>
pub fn Chown(path: string, uid: int, gid: int) -> Result<(), error>
pub fn Clearenv()
pub fn Close(fd: Handle) -> Result<(), error>
pub fn CloseHandle(handle: Handle) -> Result<(), error>
pub fn CloseOnExec(fd: Handle)
pub fn Closesocket(s: Handle) -> Result<(), error>
pub fn CommandLineToArgv(cmd: Ref<uint16>, argc: Ref<int32>) -> Result<Unknown, error>
pub fn ComputerName() -> Result<string, error>
pub fn Connect(fd: Handle, sa: Sockaddr) -> Result<(), error>
pub fn ConnectEx(
fd: Handle,
sa: Sockaddr,
sendBuf: Ref<byte>,
sendDataLen: uint32,
bytesSent: Ref<uint32>,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
pub fn ConvertSidToStringSid(sid: Ref<SID>, stringSid: Ref<Ref<uint16>>) -> Result<(), error>
pub fn ConvertStringSidToSid(stringSid: Ref<uint16>, sid: Ref<Ref<SID>>) -> Result<(), error>
pub fn CopySid(destSidLen: uint32, destSid: Ref<SID>, srcSid: Ref<SID>) -> Result<(), error>
pub fn CreateDirectory(path: Ref<uint16>, sa: Ref<SecurityAttributes>) -> Result<(), error>
pub fn CreateFile(
name: Ref<uint16>,
access: uint32,
mode: uint32,
sa: Ref<SecurityAttributes>,
createmode: uint32,
attrs: uint32,
templatefile: int32,
) -> Result<Handle, error>
pub fn CreateFileMapping(
fhandle: Handle,
sa: Ref<SecurityAttributes>,
prot: uint32,
maxSizeHigh: uint32,
maxSizeLow: uint32,
name: Ref<uint16>,
) -> Result<Handle, error>
pub fn CreateHardLink(
filename: Ref<uint16>,
existingfilename: Ref<uint16>,
reserved: uint,
) -> Result<(), error>
/// Deprecated: CreateIoCompletionPort has the wrong function signature. Use x/sys/windows.CreateIoCompletionPort.
pub fn CreateIoCompletionPort(
filehandle: Handle,
cphandle: Handle,
key: uint32,
threadcnt: uint32,
) -> Result<Handle, error>
pub fn CreatePipe(
readhandle: Ref<Handle>,
writehandle: Ref<Handle>,
sa: Ref<SecurityAttributes>,
size: uint32,
) -> Result<(), error>
pub fn CreateProcess(
appName: Ref<uint16>,
commandLine: Ref<uint16>,
procSecurity: Ref<SecurityAttributes>,
threadSecurity: Ref<SecurityAttributes>,
inheritHandles: bool,
creationFlags: uint32,
env: Ref<uint16>,
currentDir: Ref<uint16>,
startupInfo: Ref<StartupInfo>,
outProcInfo: Ref<ProcessInformation>,
) -> Result<(), error>
pub fn CreateProcessAsUser(
token: Token,
appName: Ref<uint16>,
commandLine: Ref<uint16>,
procSecurity: Ref<SecurityAttributes>,
threadSecurity: Ref<SecurityAttributes>,
inheritHandles: bool,
creationFlags: uint32,
env: Ref<uint16>,
currentDir: Ref<uint16>,
startupInfo: Ref<StartupInfo>,
outProcInfo: Ref<ProcessInformation>,
) -> Result<(), error>
pub fn CreateSymbolicLink(
symlinkfilename: Ref<uint16>,
targetfilename: Ref<uint16>,
flags: uint32,
) -> Result<(), error>
pub fn CreateToolhelp32Snapshot(flags: uint32, processId: uint32) -> Result<Handle, error>
pub fn CryptAcquireContext(
provhandle: Ref<Handle>,
container: Ref<uint16>,
provider: Ref<uint16>,
provtype: uint32,
flags: uint32,
) -> Result<(), error>
pub fn CryptGenRandom(provhandle: Handle, buflen: uint32, buf: Ref<byte>) -> Result<(), error>
pub fn CryptReleaseContext(provhandle: Handle, flags: uint32) -> Result<(), error>
pub fn DeleteFile(path: Ref<uint16>) -> Result<(), error>
pub fn DeviceIoControl(
handle: Handle,
ioControlCode: uint32,
inBuffer: Ref<byte>,
inBufferSize: uint32,
outBuffer: Ref<byte>,
outBufferSize: uint32,
bytesReturned: Ref<uint32>,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
pub fn DnsNameCompare(name1: Ref<uint16>, name2: Ref<uint16>) -> bool
pub fn DnsQuery(
name: string,
qtype: uint16,
options: uint32,
extra: Ref<byte>,
qrs: Ref<Ref<DNSRecord>>,
pr: Ref<byte>,
) -> Result<(), error>
pub fn DnsRecordListFree(rl: Ref<DNSRecord>, freetype: uint32)
pub fn DuplicateHandle(
hSourceProcessHandle: Handle,
hSourceHandle: Handle,
hTargetProcessHandle: Handle,
lpTargetHandle: Ref<Handle>,
dwDesiredAccess: uint32,
bInheritHandle: bool,
dwOptions: uint32,
) -> Result<(), error>
pub fn Environ() -> Slice<string>
/// EscapeArg rewrites command line argument s as prescribed
/// in https://msdn.microsoft.com/en-us/library/ms880421.
/// This function returns "" (2 double quotes) if s is empty.
/// Alternatively, these transformations are done:
/// - every back slash (\) is doubled, but only if immediately
/// followed by double quote (");
/// - every double quote (") is escaped by back slash (\);
/// - finally, s is wrapped with double quotes (arg -> "arg"),
/// but only if there is space or tab inside s.
pub fn EscapeArg(s: string) -> string
pub fn Exec(argv0: string, argv: Slice<string>, envv: Slice<string>) -> Result<(), error>
pub fn Exit(code: int)
pub fn ExitProcess(exitcode: uint32)
pub fn Fchdir(fd: Handle) -> Result<(), error>
pub fn Fchmod(fd: Handle, mode: uint32) -> Result<(), error>
pub fn Fchown(fd: Handle, uid: int, gid: int) -> Result<(), error>
pub fn FindClose(handle: Handle) -> Result<(), error>
pub fn FindFirstFile(name: Ref<uint16>, data: Ref<Win32finddata>) -> Result<Handle, error>
pub fn FindNextFile(handle: Handle, data: Ref<Win32finddata>) -> Result<(), error>
pub fn FlushFileBuffers(handle: Handle) -> Result<(), error>
pub fn FlushViewOfFile(addr: uint, length: uint) -> Result<(), error>
/// FormatMessage is deprecated (msgsrc should be uintptr, not uint32, but can
/// not be changed due to the Go 1 compatibility guarantee).
///
/// Deprecated: Use FormatMessage from golang.org/x/sys/windows instead.
pub fn FormatMessage(
flags: uint32,
msgsrc: uint32,
msgid: uint32,
langid: uint32,
buf: Slice<uint16>,
args: Ref<byte>,
) -> Result<uint32, error>
pub fn FreeAddrInfoW(addrinfo: Ref<AddrinfoW>)
pub fn FreeEnvironmentStrings(envs: Ref<uint16>) -> Result<(), error>
pub fn FreeLibrary(handle: Handle) -> Result<(), error>
pub fn Fsync(fd: Handle) -> Result<(), error>
pub fn Ftruncate(fd: Handle, length: int64) -> Result<(), error>
/// FullPath retrieves the full path of the specified file.
pub fn FullPath(name: string) -> Result<string, error>
pub fn GetAcceptExSockaddrs(
buf: Ref<byte>,
rxdatalen: uint32,
laddrlen: uint32,
raddrlen: uint32,
lrsa: Ref<Ref<RawSockaddrAny>>,
lrsalen: Ref<int32>,
rrsa: Ref<Ref<RawSockaddrAny>>,
rrsalen: Ref<int32>,
)
pub fn GetAdaptersInfo(ai: Ref<IpAdapterInfo>, ol: Ref<uint32>) -> Result<(), error>
pub fn GetAddrInfoW(
nodename: Ref<uint16>,
servicename: Ref<uint16>,
hints: Ref<AddrinfoW>,
result: Ref<Ref<AddrinfoW>>,
) -> Result<(), error>
pub fn GetCommandLine() -> Option<Ref<uint16>>
pub fn GetComputerName(buf: Ref<uint16>, n: Ref<uint32>) -> Result<(), error>
pub fn GetConsoleMode(console: Handle, mode: Ref<uint32>) -> Result<(), error>
pub fn GetCurrentDirectory(buflen: uint32, buf: Ref<uint16>) -> Result<uint32, error>
pub fn GetCurrentProcess() -> Result<Handle, error>
pub fn GetEnvironmentStrings() -> Result<Ref<uint16>, error>
pub fn GetEnvironmentVariable(
name: Ref<uint16>,
buffer: Ref<uint16>,
size: uint32,
) -> Result<uint32, error>
pub fn GetExitCodeProcess(handle: Handle, exitcode: Ref<uint32>) -> Result<(), error>
pub fn GetFileAttributes(name: Ref<uint16>) -> Result<uint32, error>
pub fn GetFileAttributesEx(name: Ref<uint16>, level: uint32, info: Ref<byte>) -> Result<(), error>
pub fn GetFileInformationByHandle(
handle: Handle,
data: Ref<ByHandleFileInformation>,
) -> Result<(), error>
pub fn GetFileType(filehandle: Handle) -> Result<uint32, error>
pub fn GetFullPathName(
path: Ref<uint16>,
buflen: uint32,
buf: Ref<uint16>,
fname: Ref<Ref<uint16>>,
) -> Result<uint32, error>
pub fn GetHostByName(name: string) -> Result<Ref<Hostent>, error>
pub fn GetIfEntry(pIfRow: Ref<MibIfRow>) -> Result<(), error>
pub fn GetLastError() -> Result<(), error>
pub fn GetLengthSid(sid: Ref<SID>) -> uint32
pub fn GetLongPathName(path: Ref<uint16>, buf: Ref<uint16>, buflen: uint32) -> Result<uint32, error>
pub fn GetProcAddress(module: Handle, procname: string) -> Result<uint, error>
pub fn GetProcessTimes(
handle: Handle,
creationTime: Ref<Filetime>,
exitTime: Ref<Filetime>,
kernelTime: Ref<Filetime>,
userTime: Ref<Filetime>,
) -> Result<(), error>
pub fn GetProtoByName(name: string) -> Result<Ref<Protoent>, error>
/// Deprecated: GetQueuedCompletionStatus has the wrong function signature. Use x/sys/windows.GetQueuedCompletionStatus.
pub fn GetQueuedCompletionStatus(
cphandle: Handle,
qty: Ref<uint32>,
key: Ref<uint32>,
overlapped: Ref<Ref<Overlapped>>,
timeout: uint32,
) -> Result<(), error>
pub fn GetServByName(name: string, proto: string) -> Result<Ref<Servent>, error>
pub fn GetShortPathName(
longpath: Ref<uint16>,
shortpath: Ref<uint16>,
buflen: uint32,
) -> Result<uint32, error>
pub fn GetStartupInfo(startupInfo: Ref<StartupInfo>) -> Result<(), error>
pub fn GetStdHandle(stdhandle: int) -> Result<Handle, error>
pub fn GetSystemTimeAsFileTime(time: Ref<Filetime>)
pub fn GetTempPath(buflen: uint32, buf: Ref<uint16>) -> Result<uint32, error>
pub fn GetTimeZoneInformation(tzi: Ref<Timezoneinformation>) -> Result<uint32, error>
pub fn GetTokenInformation(
t: Token,
infoClass: uint32,
info: Ref<byte>,
infoLen: uint32,
returnedLen: Ref<uint32>,
) -> Result<(), error>
pub fn GetUserNameEx(
nameFormat: uint32,
nameBuffre: Ref<uint16>,
nSize: Ref<uint32>,
) -> Result<(), error>
pub fn GetUserProfileDirectory(t: Token, dir: Ref<uint16>, dirLen: Ref<uint32>) -> Result<(), error>
pub fn GetVersion() -> Result<uint32, error>
pub fn Getegid() -> int
pub fn Getenv(key: string) -> Option<string>
pub fn Geteuid() -> int
pub fn Getgid() -> int
pub fn Getgroups() -> Result<Slice<int>, error>
pub fn Getpagesize() -> int
pub fn Getpeername(fd: Handle) -> Result<Sockaddr, error>
pub fn Getpid() -> int
pub fn Getppid() -> int
pub fn Getsockname(fd: Handle) -> Result<Sockaddr, error>
pub fn Getsockopt(
s: Handle,
level: int32,
optname: int32,
optval: Ref<byte>,
optlen: Ref<int32>,
) -> Result<(), error>
pub fn GetsockoptInt(fd: Handle, level: int, opt: int) -> Result<int, error>
pub fn Gettimeofday(tv: Ref<Timeval>) -> Result<(), error>
pub fn Getuid() -> int
pub fn Getwd() -> Result<string, error>
pub fn Lchown(path: string, uid: int, gid: int) -> Result<(), error>
/// TODO(brainman): fix all needed for os
pub fn Link(oldpath: string, newpath: string) -> Result<(), error>
pub fn Listen(s: Handle, n: int) -> Result<(), error>
pub fn LoadCancelIoEx() -> Result<(), error>
pub fn LoadConnectEx() -> Result<(), error>
pub fn LoadCreateSymbolicLink() -> Result<(), error>
/// LoadDLL loads the named DLL file into memory.
///
/// If name is not an absolute path and is not a known system DLL used by
/// Go, Windows will search for the named DLL in many locations, causing
/// potential DLL preloading attacks.
///
/// Use [LazyDLL] in golang.org/x/sys/windows for a secure way to
/// load system DLLs.
pub fn LoadDLL(name: string) -> Result<Ref<DLL>, error>
pub fn LoadGetAddrInfo() -> Result<(), error>
pub fn LoadLibrary(libname: string) -> Result<Handle, error>
pub fn LoadSetFileCompletionNotificationModes() -> Result<(), error>
pub fn LocalFree(hmem: Handle) -> Result<Handle, error>
pub fn LookupAccountName(
systemName: Ref<uint16>,
accountName: Ref<uint16>,
sid: Ref<SID>,
sidLen: Ref<uint32>,
refdDomainName: Ref<uint16>,
refdDomainNameLen: Ref<uint32>,
use: Ref<uint32>,
) -> Result<(), error>
pub fn LookupAccountSid(
systemName: Ref<uint16>,
sid: Ref<SID>,
name: Ref<uint16>,
nameLen: Ref<uint32>,
refdDomainName: Ref<uint16>,
refdDomainNameLen: Ref<uint32>,
use: Ref<uint32>,
) -> Result<(), error>
/// LookupSID retrieves a security identifier sid for the account
/// and the name of the domain on which the account was found.
/// System specify target computer to search.
pub fn LookupSID(system: string, account: string) -> Result<(Ref<SID>, string, uint32), error>
pub fn MapViewOfFile(
handle: Handle,
access: uint32,
offsetHigh: uint32,
offsetLow: uint32,
length: uint,
) -> Result<uint, error>
pub fn Mkdir(path: string, mode: uint32) -> Result<(), error>
pub fn MoveFile(from: Ref<uint16>, to: Ref<uint16>) -> Result<(), error>
/// MustLoadDLL is like [LoadDLL] but panics if load operation fails.
pub fn MustLoadDLL(name: string) -> Ref<DLL>
pub fn NetApiBufferFree(buf: Ref<byte>) -> Result<(), error>
pub fn NetGetJoinInformation(
server: Ref<uint16>,
name: Ref<Ref<uint16>>,
bufType: Ref<uint32>,
) -> Result<(), error>
pub fn NetUserGetInfo(
serverName: Ref<uint16>,
userName: Ref<uint16>,
level: uint32,
buf: Ref<Ref<byte>>,
) -> Result<(), error>
/// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention.
/// This is useful when interoperating with Windows code requiring callbacks.
/// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
/// Only a limited number of callbacks may be created in a single Go process, and any memory allocated
/// for these callbacks is never released.
/// Between NewCallback and NewCallbackCDecl, at least 1024 callbacks can always be created.
pub fn NewCallback(fn_: Unknown) -> uint
/// NewCallbackCDecl converts a Go function to a function pointer conforming to the cdecl calling convention.
/// This is useful when interoperating with Windows code requiring callbacks.
/// The argument is expected to be a function with one uintptr-sized result. The function must not have arguments with size larger than the size of uintptr.
/// Only a limited number of callbacks may be created in a single Go process, and any memory allocated
/// for these callbacks is never released.
/// Between NewCallback and NewCallbackCDecl, at least 1024 callbacks can always be created.
pub fn NewCallbackCDecl(fn_: Unknown) -> uint
/// NewLazyDLL creates new [LazyDLL] associated with [DLL] file.
pub fn NewLazyDLL(name: string) -> Ref<LazyDLL>
pub fn NsecToFiletime(nsec: int64) -> Filetime
pub fn NsecToTimespec(nsec: int64) -> Timespec
pub fn NsecToTimeval(nsec: int64) -> Timeval
pub fn Ntohs(netshort: uint16) -> uint16
pub fn Open(name: string, flag: int, perm: uint32) -> Result<Handle, error>
/// OpenCurrentProcessToken opens the access token
/// associated with current process.
pub fn OpenCurrentProcessToken() -> Result<Token, error>
pub fn OpenProcess(da: uint32, inheritHandle: bool, pid: uint32) -> Result<Handle, error>
pub fn OpenProcessToken(h: Handle, access: uint32, token: Ref<Token>) -> Result<(), error>
pub fn Pipe(mut p: Slice<Handle>) -> Result<(), error>
/// Deprecated: PostQueuedCompletionStatus has the wrong function signature. Use x/sys/windows.PostQueuedCompletionStatus.
pub fn PostQueuedCompletionStatus(
cphandle: Handle,
qty: uint32,
key: uint32,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
pub fn Process32First(snapshot: Handle, procEntry: Ref<ProcessEntry32>) -> Result<(), error>
pub fn Process32Next(snapshot: Handle, procEntry: Ref<ProcessEntry32>) -> Result<(), error>
pub fn Read(fd: Handle, mut p: Slice<byte>) -> Result<int, error>
pub fn ReadConsole(
console: Handle,
buf: Ref<uint16>,
toread: uint32,
read: Ref<uint32>,
inputControl: Ref<byte>,
) -> Result<(), error>
pub fn ReadDirectoryChanges(
handle: Handle,
buf: Ref<byte>,
buflen: uint32,
watchSubTree: bool,
mask: uint32,
retlen: Ref<uint32>,
overlapped: Ref<Overlapped>,
completionRoutine: uint,
) -> Result<(), error>
pub fn ReadFile(
fd: Handle,
p: Slice<byte>,
done: Ref<uint32>,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
/// Readlink returns the destination of the named symbolic link.
pub fn Readlink(path: string, mut buf: Slice<byte>) -> Result<int, error>
pub fn Recvfrom(fd: Handle, mut p: Slice<byte>, flags: int) -> Result<(int, Sockaddr), error>
pub fn RegCloseKey(key: Handle) -> Result<(), error>
/// RegEnumKeyEx enumerates the subkeys of an open registry key.
/// Each call retrieves information about one subkey. name is
/// a buffer that should be large enough to hold the name of the
/// subkey plus a null terminating character. nameLen is its
/// length. On return, nameLen will contain the actual length of the
/// subkey.
///
/// Should name not be large enough to hold the subkey, this function
/// will return ERROR_MORE_DATA, and must be called again with an
/// appropriately sized buffer.
///
/// reserved must be nil. class and classLen behave like name and nameLen
/// but for the class of the subkey, except that they are optional.
/// lastWriteTime, if not nil, will be populated with the time the subkey
/// was last written.
///
/// The caller must enumerate all subkeys in order. That is
/// RegEnumKeyEx must be called with index starting at 0, incrementing
/// the index until the function returns ERROR_NO_MORE_ITEMS, or with
/// the index of the last subkey (obtainable from RegQueryInfoKey),
/// decrementing until index 0 is enumerated.
///
/// Successive calls to this API must happen on the same OS thread,
/// so call [runtime.LockOSThread] before calling this function.
pub fn RegEnumKeyEx(
key: Handle,
index: uint32,
name: Ref<uint16>,
nameLen: Ref<uint32>,
reserved: Ref<uint32>,
class: Ref<uint16>,
classLen: Ref<uint32>,
lastWriteTime: Ref<Filetime>,
) -> Result<(), error>
pub fn RegOpenKeyEx(
key: Handle,
subkey: Ref<uint16>,
options: uint32,
desiredAccess: uint32,
result: Ref<Handle>,
) -> Result<(), error>
pub fn RegQueryInfoKey(
key: Handle,
class: Ref<uint16>,
classLen: Ref<uint32>,
reserved: Ref<uint32>,
subkeysLen: Ref<uint32>,
maxSubkeyLen: Ref<uint32>,
maxClassLen: Ref<uint32>,
valuesLen: Ref<uint32>,
maxValueNameLen: Ref<uint32>,
maxValueLen: Ref<uint32>,
saLen: Ref<uint32>,
lastWriteTime: Ref<Filetime>,
) -> Result<(), error>
pub fn RegQueryValueEx(
key: Handle,
name: Ref<uint16>,
reserved: Ref<uint32>,
valtype: Ref<uint32>,
buf: Ref<byte>,
buflen: Ref<uint32>,
) -> Result<(), error>
pub fn RemoveDirectory(path: Ref<uint16>) -> Result<(), error>
pub fn Rename(oldpath: string, newpath: string) -> Result<(), error>
pub fn Rmdir(path: string) -> Result<(), error>
pub fn Seek(fd: Handle, offset: int64, whence: int) -> Result<int64, error>
pub fn Sendto(fd: Handle, p: Slice<byte>, flags: int, to: Sockaddr) -> Result<(), error>
pub fn SetCurrentDirectory(path: Ref<uint16>) -> Result<(), error>
pub fn SetEndOfFile(handle: Handle) -> Result<(), error>
pub fn SetEnvironmentVariable(name: Ref<uint16>, value: Ref<uint16>) -> Result<(), error>
pub fn SetFileAttributes(name: Ref<uint16>, attrs: uint32) -> Result<(), error>
pub fn SetFileCompletionNotificationModes(handle: Handle, flags: uint8) -> Result<(), error>
pub fn SetFilePointer(
handle: Handle,
lowoffset: int32,
highoffsetptr: Ref<int32>,
whence: uint32,
) -> Result<uint32, error>
pub fn SetFileTime(
handle: Handle,
ctime: Ref<Filetime>,
atime: Ref<Filetime>,
wtime: Ref<Filetime>,
) -> Result<(), error>
pub fn SetHandleInformation(handle: Handle, mask: uint32, flags: uint32) -> Result<(), error>
pub fn SetNonblock(fd: Handle, nonblocking: bool) -> Result<(), error>
pub fn Setenv(key: string, value: string) -> Result<(), error>
pub fn Setsockopt(
s: Handle,
level: int32,
optname: int32,
optval: Ref<byte>,
optlen: int32,
) -> Result<(), error>
pub fn SetsockoptIPMreq(fd: Handle, level: int, opt: int, mreq: Ref<IPMreq>) -> Result<(), error>
pub fn SetsockoptIPv6Mreq(fd: Handle, level: int, opt: int, mreq: Ref<IPv6Mreq>) -> Result<(), error>
// SKIPPED: SetsockoptInet4Addr - array-currently-not-representable
// fixed-size array cannot currently be represented in Lisette
pub fn SetsockoptInt(fd: Handle, level: int, opt: int, value: int) -> Result<(), error>
pub fn SetsockoptLinger(fd: Handle, level: int, opt: int, l: Ref<Linger>) -> Result<(), error>
pub fn SetsockoptTimeval(fd: Handle, level: int, opt: int, tv: Ref<Timeval>) -> Result<(), error>
pub fn Shutdown(fd: Handle, how: int) -> Result<(), error>
pub fn Socket(domain: int, typ: int, proto: int) -> Result<Handle, error>
pub fn StartProcess(argv0: string, argv: Slice<string>, attr: Ref<ProcAttr>) -> Result<(int, uint), error>
/// StringBytePtr returns a pointer to a NUL-terminated array of bytes.
/// If s contains a NUL byte this function panics instead of returning
/// an error.
///
/// Deprecated: Use [BytePtrFromString] instead.
pub fn StringBytePtr(s: string) -> Ref<byte>
/// StringByteSlice converts a string to a NUL-terminated []byte,
/// If s contains a NUL byte this function panics instead of
/// returning an error.
///
/// Deprecated: Use ByteSliceFromString instead.
pub fn StringByteSlice(s: string) -> Slice<byte>
/// StringToSid converts a string-format security identifier
/// sid into a valid, functional sid.
pub fn StringToSid(s: string) -> Result<Ref<SID>, error>
/// StringToUTF16 returns the UTF-16 encoding of the UTF-8 string s,
/// with a terminating NUL added. If s contains a NUL byte this
/// function panics instead of returning an error.
///
/// Deprecated: Use [UTF16FromString] instead.
pub fn StringToUTF16(s: string) -> Slice<uint16>
/// StringToUTF16Ptr returns pointer to the UTF-16 encoding of
/// the UTF-8 string s, with a terminating NUL added. If s
/// contains a NUL byte this function panics instead of
/// returning an error.
///
/// Deprecated: Use [UTF16PtrFromString] instead.
pub fn StringToUTF16Ptr(s: string) -> Ref<uint16>
pub fn Symlink(path: string, link: string) -> Result<(), error>
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall(trap: uint, nargs: uint, a1: uint, a2: uint, a3: uint) -> (uint, uint, Errno)
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall12(
trap: uint,
nargs: uint,
a1: uint,
a2: uint,
a3: uint,
a4: uint,
a5: uint,
a6: uint,
a7: uint,
a8: uint,
a9: uint,
a10: uint,
a11: uint,
a12: uint,
) -> (uint, uint, Errno)
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall15(
trap: uint,
nargs: uint,
a1: uint,
a2: uint,
a3: uint,
a4: uint,
a5: uint,
a6: uint,
a7: uint,
a8: uint,
a9: uint,
a10: uint,
a11: uint,
a12: uint,
a13: uint,
a14: uint,
a15: uint,
) -> (uint, uint, Errno)
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall18(
trap: uint,
nargs: uint,
a1: uint,
a2: uint,
a3: uint,
a4: uint,
a5: uint,
a6: uint,
a7: uint,
a8: uint,
a9: uint,
a10: uint,
a11: uint,
a12: uint,
a13: uint,
a14: uint,
a15: uint,
a16: uint,
a17: uint,
a18: uint,
) -> (uint, uint, Errno)
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall6(
trap: uint,
nargs: uint,
a1: uint,
a2: uint,
a3: uint,
a4: uint,
a5: uint,
a6: uint,
) -> (uint, uint, Errno)
/// Deprecated: Use [SyscallN] instead.
pub fn Syscall9(
trap: uint,
nargs: uint,
a1: uint,
a2: uint,
a3: uint,
a4: uint,
a5: uint,
a6: uint,
a7: uint,
a8: uint,
a9: uint,
) -> (uint, uint, Errno)
pub fn SyscallN(trap: uint, args: VarArgs<uint>) -> (uint, uint, Errno)
pub fn TerminateProcess(handle: Handle, exitcode: uint32) -> Result<(), error>
pub fn TimespecToNsec(ts: Timespec) -> int64
/// TranslateAccountName converts a directory service
/// object name from one format to another.
pub fn TranslateAccountName(
username: string,
from: uint32,
to: uint32,
initSize: int,
) -> Result<string, error>
pub fn TranslateName(
accName: Ref<uint16>,
accNameFormat: uint32,
desiredNameFormat: uint32,
translatedName: Ref<uint16>,
nSize: Ref<uint32>,
) -> Result<(), error>
pub fn TransmitFile(
s: Handle,
handle: Handle,
bytesToWrite: uint32,
bytsPerSend: uint32,
overlapped: Ref<Overlapped>,
transmitFileBuf: Ref<TransmitFileBuffers>,
flags: uint32,
) -> Result<(), error>
/// UTF16FromString returns the UTF-16 encoding of the UTF-8 string
/// s, with a terminating NUL added. If s contains a NUL byte at any
/// location, it returns (nil, [EINVAL]). Unpaired surrogates
/// are encoded using WTF-8.
pub fn UTF16FromString(s: string) -> Result<Slice<uint16>, error>
/// UTF16PtrFromString returns pointer to the UTF-16 encoding of
/// the UTF-8 string s, with a terminating NUL added. If s
/// contains a NUL byte at any location, it returns (nil, EINVAL).
/// Unpaired surrogates are encoded using WTF-8.
pub fn UTF16PtrFromString(s: string) -> Result<Ref<uint16>, error>
/// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
/// with a terminating NUL removed. Unpaired surrogates are decoded
/// using WTF-8 instead of UTF-8 encoding.
pub fn UTF16ToString(s: Slice<uint16>) -> string
pub fn Unlink(path: string) -> Result<(), error>
pub fn UnmapViewOfFile(addr: uint) -> Result<(), error>
pub fn Unsetenv(key: string) -> Result<(), error>
pub fn Utimes(path: string, tv: Slice<Timeval>) -> Result<(), error>
pub fn UtimesNano(path: string, ts: Slice<Timespec>) -> Result<(), error>
pub fn VirtualLock(addr: uint, length: uint) -> Result<(), error>
pub fn VirtualUnlock(addr: uint, length: uint) -> Result<(), error>
pub fn WSACleanup() -> Result<(), error>
pub fn WSAEnumProtocols(
protocols: Ref<int32>,
protocolBuffer: Ref<WSAProtocolInfo>,
bufferLength: Ref<uint32>,
) -> Result<int32, error>
pub fn WSAIoctl(
s: Handle,
iocc: uint32,
inbuf: Ref<byte>,
cbif: uint32,
outbuf: Ref<byte>,
cbob: uint32,
cbbr: Ref<uint32>,
overlapped: Ref<Overlapped>,
completionRoutine: uint,
) -> Result<(), error>
pub fn WSARecv(
s: Handle,
bufs: Ref<WSABuf>,
bufcnt: uint32,
recvd: Ref<uint32>,
flags: Ref<uint32>,
overlapped: Ref<Overlapped>,
croutine: Ref<byte>,
) -> Result<(), error>
pub fn WSARecvFrom(
s: Handle,
bufs: Ref<WSABuf>,
bufcnt: uint32,
recvd: Ref<uint32>,
flags: Ref<uint32>,
from: Ref<RawSockaddrAny>,
fromlen: Ref<int32>,
overlapped: Ref<Overlapped>,
croutine: Ref<byte>,
) -> Result<(), error>
pub fn WSASend(
s: Handle,
bufs: Ref<WSABuf>,
bufcnt: uint32,
sent: Ref<uint32>,
flags: uint32,
overlapped: Ref<Overlapped>,
croutine: Ref<byte>,
) -> Result<(), error>
pub fn WSASendTo(
s: Handle,
bufs: Ref<WSABuf>,
bufcnt: uint32,
sent: Ref<uint32>,
flags: uint32,
to: Ref<RawSockaddrAny>,
tolen: int32,
overlapped: Ref<Overlapped>,
croutine: Ref<byte>,
) -> Result<(), error>
pub fn WSASendto(
s: Handle,
bufs: Ref<WSABuf>,
bufcnt: uint32,
sent: Ref<uint32>,
flags: uint32,
to: Sockaddr,
overlapped: Ref<Overlapped>,
croutine: Ref<byte>,
) -> Result<(), error>
pub fn WSAStartup(verreq: uint32, data: Ref<WSAData>) -> Result<(), error>
pub fn WaitForSingleObject(handle: Handle, waitMilliseconds: uint32) -> Result<uint32, error>
pub fn Write(fd: Handle, p: Slice<byte>) -> Result<int, error>
pub fn WriteConsole(
console: Handle,
buf: Ref<uint16>,
towrite: uint32,
written: Ref<uint32>,
reserved: Ref<byte>,
) -> Result<(), error>
pub fn WriteFile(
fd: Handle,
p: Slice<byte>,
done: Ref<uint32>,
overlapped: Ref<Overlapped>,
) -> Result<(), error>
pub struct AddrinfoW {
pub Flags: int32,
pub Family: int32,
pub Socktype: int32,
pub Protocol: int32,
pub Addrlen: uint,
pub Canonname: Option<uint16>,
pub Addr: Pointer,
pub Next: Option<Ref<AddrinfoW>>,
}
pub struct ByHandleFileInformation {
pub FileAttributes: uint32,
pub CreationTime: Filetime,
pub LastAccessTime: Filetime,
pub LastWriteTime: Filetime,
pub VolumeSerialNumber: uint32,
pub FileSizeHigh: uint32,
pub FileSizeLow: uint32,
pub NumberOfLinks: uint32,
pub FileIndexHigh: uint32,
pub FileIndexLow: uint32,
}
pub struct CertChainContext {
pub Size: uint32,
pub TrustStatus: CertTrustStatus,
pub ChainCount: uint32,
pub Chains: Option<Ref<Ref<CertSimpleChain>>>,
pub LowerQualityChainCount: uint32,
pub LowerQualityChains: Option<Ref<Ref<CertChainContext>>>,
pub HasRevocationFreshnessTime: uint32,
pub RevocationFreshnessTime: uint32,
}
pub struct CertChainElement {
pub Size: uint32,
pub CertContext: Option<Ref<CertContext>>,
pub TrustStatus: CertTrustStatus,
pub RevocationInfo: Option<Ref<CertRevocationInfo>>,
pub IssuanceUsage: Option<Ref<CertEnhKeyUsage>>,
pub ApplicationUsage: Option<Ref<CertEnhKeyUsage>>,
pub ExtendedErrorInfo: Option<uint16>,
}
pub struct CertChainPara {
pub Size: uint32,
pub RequestedUsage: CertUsageMatch,
pub RequstedIssuancePolicy: CertUsageMatch,
pub URLRetrievalTimeout: uint32,
pub CheckRevocationFreshnessTime: uint32,
pub RevocationFreshnessTime: uint32,
pub CacheResync: Option<Ref<Filetime>>,
}
pub struct CertChainPolicyPara {
pub Size: uint32,
pub Flags: uint32,
pub ExtraPolicyPara: Pointer,
}
pub struct CertChainPolicyStatus {
pub Size: uint32,
pub Error: uint32,
pub ChainIndex: uint32,
pub ElementIndex: uint32,
pub ExtraPolicyStatus: Pointer,
}
pub struct CertContext {
pub EncodingType: uint32,
pub EncodedCert: Option<Ref<byte>>,
pub Length: uint32,
pub CertInfo: Option<Ref<CertInfo>>,
pub Store: Handle,
}
pub struct CertEnhKeyUsage {
pub Length: uint32,
pub UsageIdentifiers: Option<Ref<Ref<byte>>>,
}
pub type CertInfo
pub type CertRevocationCrlInfo
pub struct CertRevocationInfo {
pub Size: uint32,
pub RevocationResult: uint32,
pub RevocationOid: Option<Ref<byte>>,
pub OidSpecificInfo: Pointer,
pub HasFreshnessTime: uint32,
pub FreshnessTime: uint32,
pub CrlInfo: Option<Ref<CertRevocationCrlInfo>>,
}
pub struct CertSimpleChain {
pub Size: uint32,
pub TrustStatus: CertTrustStatus,
pub NumElements: uint32,
pub Elements: Option<Ref<Ref<CertChainElement>>>,
pub TrustListInfo: Option<Ref<CertTrustListInfo>>,
pub HasRevocationFreshnessTime: uint32,
pub RevocationFreshnessTime: uint32,
}
pub type CertTrustListInfo
pub struct CertTrustStatus {
pub ErrorStatus: uint32,
pub InfoStatus: uint32,
}
pub struct CertUsageMatch {
pub Type: uint32,
pub Usage: CertEnhKeyUsage,
}
/// Conn is implemented by some types in the net and os packages to provide
/// access to the underlying file descriptor or handle.
pub interface Conn {
fn SyscallConn() -> Result<RawConn, error>
}
/// A DLL implements access to a single DLL.
pub struct DLL {
pub Name: string,
pub Handle: Handle,
}
/// DLLError describes reasons for DLL load failures.
pub struct DLLError {
pub Err: error,
pub ObjName: string,
pub Msg: string,
}
pub struct DNSMXData {
pub NameExchange: Option<uint16>,
pub Preference: uint16,
pub Pad: uint16,
}
pub struct DNSPTRData {
pub Host: Option<uint16>,
}
pub struct DNSRecord {
pub Next: Option<Ref<DNSRecord>>,
pub Name: Option<uint16>,
pub Type: uint16,
pub Length: uint16,
pub Dw: uint32,
pub Ttl: uint32,
pub Reserved: uint32,
// SKIPPED field "Data": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct DNSSRVData {
pub Target: Option<uint16>,
pub Priority: uint16,
pub Weight: uint16,
pub Port: uint16,
pub Pad: uint16,
}
pub struct DNSTXTData {
pub StringCount: uint16,
// SKIPPED field "StringArray": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct FileNotifyInformation {
pub NextEntryOffset: uint32,
pub Action: uint32,
pub FileNameLength: uint32,
pub FileName: uint16,
}
pub struct Filetime {
pub LowDateTime: uint32,
pub HighDateTime: uint32,
}
pub struct GUID {
pub Data1: uint32,
pub Data2: uint16,
pub Data3: uint16,
// SKIPPED field "Data4": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct Handle(uint)
pub struct Hostent {
pub Name: Option<Ref<byte>>,
pub Aliases: Option<Ref<Ref<byte>>>,
pub AddrType: uint16,
pub Length: uint16,
pub AddrList: Option<Ref<Ref<byte>>>,
}
// SKIPPED field "Multiaddr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "Interface": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type IPMreq
pub struct IPv6Mreq {
// SKIPPED field "Multiaddr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub Interface: uint32,
}
pub struct InterfaceInfo {
pub Flags: uint32,
pub Address: SockaddrGen,
pub BroadcastAddress: SockaddrGen,
pub Netmask: SockaddrGen,
}
pub struct IpAdapterInfo {
pub Next: Option<Ref<IpAdapterInfo>>,
pub ComboIndex: uint32,
// SKIPPED field "AdapterName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "Description": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub AddressLength: uint32,
// SKIPPED field "Address": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub Index: uint32,
pub Type: uint32,
pub DhcpEnabled: uint32,
pub CurrentIpAddress: Option<Ref<IpAddrString>>,
pub IpAddressList: IpAddrString,
pub GatewayList: IpAddrString,
pub DhcpServer: IpAddrString,
pub HaveWins: bool,
pub PrimaryWinsServer: IpAddrString,
pub SecondaryWinsServer: IpAddrString,
pub LeaseObtained: int64,
pub LeaseExpires: int64,
}
pub struct IpAddrString {
pub Next: Option<Ref<IpAddrString>>,
pub IpAddress: IpAddressString,
pub IpMask: IpMaskString,
pub Context: uint32,
}
// SKIPPED field "String": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type IpAddressString
// SKIPPED field "String": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub type IpMaskString
/// A LazyDLL implements access to a single [DLL].
/// It will delay the load of the DLL until the first
/// call to its [LazyDLL.Handle] method or to one of its
/// [LazyProc]'s Addr method.
///
/// LazyDLL is subject to the same DLL preloading attacks as documented
/// on [LoadDLL].
///
/// Use LazyDLL in golang.org/x/sys/windows for a secure way to
/// load system DLLs.
pub struct LazyDLL {
pub Name: string,
}
/// A LazyProc implements access to a procedure inside a [LazyDLL].
/// It delays the lookup until the [LazyProc.Addr], [LazyProc.Call], or [LazyProc.Find] method is called.
pub struct LazyProc {
pub Name: string,
}
pub struct Linger {
pub Onoff: int32,
pub Linger: int32,
}
pub struct MibIfRow {
// SKIPPED field "Name": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub Index: uint32,
pub Type: uint32,
pub Mtu: uint32,
pub Speed: uint32,
pub PhysAddrLen: uint32,
// SKIPPED field "PhysAddr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub AdminStatus: uint32,
pub OperStatus: uint32,
pub LastChange: uint32,
pub InOctets: uint32,
pub InUcastPkts: uint32,
pub InNUcastPkts: uint32,
pub InDiscards: uint32,
pub InErrors: uint32,
pub InUnknownProtos: uint32,
pub OutOctets: uint32,
pub OutUcastPkts: uint32,
pub OutNUcastPkts: uint32,
pub OutDiscards: uint32,
pub OutErrors: uint32,
pub OutQLen: uint32,
pub DescrLen: uint32,
// SKIPPED field "Descr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct Overlapped {
pub Internal: uint,
pub InternalHigh: uint,
pub Offset: uint32,
pub OffsetHigh: uint32,
pub HEvent: Handle,
}
/// Pointer represents a pointer to an arbitrary Windows type.
///
/// Pointer-typed fields may point to one of many different types. It's
/// up to the caller to provide a pointer to the appropriate type, cast
/// to Pointer. The caller must obey the unsafe.Pointer rules while
/// doing so.
pub struct Pointer(Ref<()>)
/// A Proc implements access to a procedure inside a [DLL].
pub struct Proc {
pub Dll: Option<Ref<DLL>>,
pub Name: string,
}
pub struct ProcAttr {
pub Dir: string,
pub Env: Slice<string>,
pub Files: Slice<uint>,
pub Sys: Option<Ref<SysProcAttr>>,
}
pub struct ProcessEntry32 {
pub Size: uint32,
pub Usage: uint32,
pub ProcessID: uint32,
pub DefaultHeapID: uint,
pub ModuleID: uint32,
pub Threads: uint32,
pub ParentProcessID: uint32,
pub PriClassBase: int32,
pub Flags: uint32,
// SKIPPED field "ExeFile": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct ProcessInformation {
pub Process: Handle,
pub Thread: Handle,
pub ProcessId: uint32,
pub ThreadId: uint32,
}
pub struct Protoent {
pub Name: Option<Ref<byte>>,
pub Aliases: Option<Ref<Ref<byte>>>,
pub Proto: uint16,
}
/// A RawConn is a raw network connection.
pub interface RawConn {
fn Control(f: fn(uint) -> ()) -> Result<(), error>
fn Read(f: fn(uint) -> bool) -> Result<(), error>
fn Write(f: fn(uint) -> bool) -> Result<(), error>
}
pub struct RawSockaddr {
pub Family: uint16,
// SKIPPED field "Data": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct RawSockaddrAny {
pub Addr: RawSockaddr,
// SKIPPED field "Pad": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct RawSockaddrInet4 {
pub Family: uint16,
pub Port: uint16,
// SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "Zero": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct RawSockaddrInet6 {
pub Family: uint16,
pub Port: uint16,
pub Flowinfo: uint32,
// SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub Scope_id: uint32,
}
pub struct RawSockaddrUnix {
pub Family: uint16,
// SKIPPED field "Path": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
/// Invented structures to support what package os expects.
pub struct Rusage {
pub CreationTime: Filetime,
pub ExitTime: Filetime,
pub KernelTime: Filetime,
pub UserTime: Filetime,
}
/// The security identifier (SID) structure is a variable-length
/// structure used to uniquely identify users or groups.
pub type SID
pub struct SIDAndAttributes {
pub Sid: Option<Ref<SID>>,
pub Attributes: uint32,
}
pub struct SSLExtraCertChainPolicyPara {
pub Size: uint32,
pub AuthType: uint32,
pub Checks: uint32,
pub ServerName: Option<uint16>,
}
pub struct SecurityAttributes {
pub Length: uint32,
pub SecurityDescriptor: uint,
pub InheritHandle: uint32,
}
pub struct Servent {
pub Name: Option<Ref<byte>>,
pub Aliases: Option<Ref<Ref<byte>>>,
pub Proto: Option<Ref<byte>>,
pub Port: uint16,
}
pub interface Sockaddr {}
pub struct SockaddrGen(Slice<byte>)
pub struct SockaddrInet4 {
pub Port: int,
// SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct SockaddrInet6 {
pub Port: int,
pub ZoneId: uint32,
// SKIPPED field "Addr": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct SockaddrUnix {
pub Name: string,
}
pub struct StartupInfo {
pub Cb: uint32,
pub Desktop: Option<uint16>,
pub Title: Option<uint16>,
pub X: uint32,
pub Y: uint32,
pub XSize: uint32,
pub YSize: uint32,
pub XCountChars: uint32,
pub YCountChars: uint32,
pub FillAttribute: uint32,
pub Flags: uint32,
pub ShowWindow: uint16,
pub StdInput: Handle,
pub StdOutput: Handle,
pub StdErr: Handle,
}
pub struct SysProcAttr {
pub HideWindow: bool,
pub CmdLine: string,
pub CreationFlags: uint32,
pub Token: Token,
pub ProcessAttributes: Option<Ref<SecurityAttributes>>,
pub ThreadAttributes: Option<Ref<SecurityAttributes>>,
pub NoInheritHandles: bool,
pub AdditionalInheritedHandles: Slice<Handle>,
pub ParentProcess: Handle,
}
pub struct Systemtime {
pub Year: uint16,
pub Month: uint16,
pub DayOfWeek: uint16,
pub Day: uint16,
pub Hour: uint16,
pub Minute: uint16,
pub Second: uint16,
pub Milliseconds: uint16,
}
pub struct TCPKeepalive {
pub OnOff: uint32,
pub Time: uint32,
pub Interval: uint32,
}
/// Timespec is an invented structure on Windows, but here for
/// consistency with the syscall package for other operating systems.
pub struct Timespec {
pub Sec: int64,
pub Nsec: int64,
}
/// Invented values to support what package os expects.
pub struct Timeval {
pub Sec: int32,
pub Usec: int32,
}
pub struct Timezoneinformation {
pub Bias: int32,
// SKIPPED field "StandardName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub StandardDate: Systemtime,
pub StandardBias: int32,
// SKIPPED field "DaylightName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
pub DaylightDate: Systemtime,
pub DaylightBias: int32,
}
/// An access token contains the security information for a logon session.
/// The system creates an access token when a user logs on, and every
/// process executed on behalf of the user has a copy of the token.
/// The token identifies the user, the user's groups, and the user's
/// privileges. The system uses the token to control access to securable
/// objects and to control the ability of the user to perform various
/// system-related operations on the local computer.
pub struct Token(uint)
pub struct Tokenprimarygroup {
pub PrimaryGroup: Option<Ref<SID>>,
}
pub struct Tokenuser {
pub User: SIDAndAttributes,
}
pub struct TransmitFileBuffers {
pub Head: uint,
pub HeadLength: uint32,
pub Tail: uint,
pub TailLength: uint32,
}
pub struct UserInfo10 {
pub Name: Option<uint16>,
pub Comment: Option<uint16>,
pub UsrComment: Option<uint16>,
pub FullName: Option<uint16>,
}
pub struct WSABuf {
pub Len: uint32,
pub Buf: Option<Ref<byte>>,
}
pub struct WSAData {
pub Version: uint16,
pub HighVersion: uint16,
pub MaxSockets: uint16,
pub MaxUdpDg: uint16,
pub VendorInfo: Option<Ref<byte>>,
// SKIPPED field "Description": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "SystemStatus": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct WSAProtocolChain {
pub ChainLen: int32,
// SKIPPED field "ChainEntries": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct WSAProtocolInfo {
pub ServiceFlags1: uint32,
pub ServiceFlags2: uint32,
pub ServiceFlags3: uint32,
pub ServiceFlags4: uint32,
pub ProviderFlags: uint32,
pub ProviderId: GUID,
pub CatalogEntryId: uint32,
pub ProtocolChain: WSAProtocolChain,
pub Version: int32,
pub AddressFamily: int32,
pub MaxSockAddr: int32,
pub MinSockAddr: int32,
pub SocketType: int32,
pub Protocol: int32,
pub ProtocolMaxOffset: int32,
pub NetworkByteOrder: int32,
pub SecurityScheme: int32,
pub MessageSize: uint32,
pub ProviderReserved: uint32,
// SKIPPED field "ProtocolName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub struct WaitStatus {
pub ExitCode: uint32,
}
pub struct Win32FileAttributeData {
pub FileAttributes: uint32,
pub CreationTime: Filetime,
pub LastAccessTime: Filetime,
pub LastWriteTime: Filetime,
pub FileSizeHigh: uint32,
pub FileSizeLow: uint32,
}
pub struct Win32finddata {
pub FileAttributes: uint32,
pub CreationTime: Filetime,
pub LastAccessTime: Filetime,
pub LastWriteTime: Filetime,
pub FileSizeHigh: uint32,
pub FileSizeLow: uint32,
pub Reserved0: uint32,
pub Reserved1: uint32,
// SKIPPED field "FileName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
// SKIPPED field "AlternateFileName": array-currently-not-representable — fixed-size array cannot currently be represented in Lisette
}
pub const AF_INET = 2
pub const AF_INET6 = 23
pub const AF_NETBIOS = 17
pub const AF_UNIX = 1
pub const AF_UNSPEC = 0
pub const AI_CANONNAME = 2
pub const AI_NUMERICHOST = 4
pub const AI_PASSIVE = 1
/// Windows reserves errors >= 1<<29 for application use.
pub const APPLICATION_ERROR = 536870912
pub const AUTHTYPE_CLIENT = 1
pub const AUTHTYPE_SERVER = 2
pub const BASE_PROTOCOL = 1
pub const CERT_CHAIN_POLICY_AUTHENTICODE = 2
pub const CERT_CHAIN_POLICY_AUTHENTICODE_TS = 3
pub const CERT_CHAIN_POLICY_BASE = 1
pub const CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5
pub const CERT_CHAIN_POLICY_EV = 8
pub const CERT_CHAIN_POLICY_MICROSOFT_ROOT = 7
pub const CERT_CHAIN_POLICY_NT_AUTH = 6
pub const CERT_CHAIN_POLICY_SSL = 4
pub const CERT_E_CN_NO_MATCH = 0x800B010F
pub const CERT_E_EXPIRED = 0x800B0101
pub const CERT_E_PURPOSE = 0x800B0106
pub const CERT_E_ROLE = 0x800B0103
pub const CERT_E_UNTRUSTEDROOT = 0x800B0109
pub const CERT_STORE_ADD_ALWAYS = 4
pub const CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004
pub const CERT_STORE_PROV_MEMORY = 2
pub const CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000
pub const CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000
pub const CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000
pub const CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x08000000
pub const CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000
pub const CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400
pub const CERT_TRUST_INVALID_EXTENSION = 0x00000100
pub const CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800
pub const CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200
pub const CERT_TRUST_IS_CYCLIC = 0x00000080
pub const CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x04000000
pub const CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008
pub const CERT_TRUST_IS_NOT_TIME_VALID = 0x00000001
pub const CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010
pub const CERT_TRUST_IS_OFFLINE_REVOCATION = 0x01000000
pub const CERT_TRUST_IS_REVOKED = 0x00000004
pub const CERT_TRUST_IS_UNTRUSTED_ROOT = 0x00000020
pub const CERT_TRUST_NO_ERROR = 0x00000000
pub const CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000
pub const CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040
pub const CREATE_ALWAYS = 2
pub const CREATE_NEW = 1
pub const CREATE_NEW_PROCESS_GROUP = 0x00000200
pub const CREATE_UNICODE_ENVIRONMENT = 0x00000400
pub const CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080
pub const CRYPT_DELETEKEYSET = 0x00000010
pub const CRYPT_MACHINE_KEYSET = 0x00000020
pub const CRYPT_NEWKEYSET = 0x00000008
pub const CRYPT_SILENT = 0x00000040
pub const CRYPT_VERIFYCONTEXT = 0xF0000000
pub const CTRL_BREAK_EVENT = 1
pub const CTRL_CLOSE_EVENT = 2
pub const CTRL_C_EVENT = 0
pub const CTRL_LOGOFF_EVENT = 5
pub const CTRL_SHUTDOWN_EVENT = 6
pub const DNS_INFO_NO_RECORDS = 0x251D
pub const DNS_TYPE_A = 0x0001
pub const DNS_TYPE_A6 = 0x0026
pub const DNS_TYPE_AAAA = 0x001c
pub const DNS_TYPE_ADDRS = 0x00f8
pub const DNS_TYPE_AFSDB = 0x0012
pub const DNS_TYPE_ALL = 0x00ff
pub const DNS_TYPE_ANY = 0x00ff
pub const DNS_TYPE_ATMA = 0x0022
pub const DNS_TYPE_AXFR = 0x00fc
pub const DNS_TYPE_CERT = 0x0025
pub const DNS_TYPE_CNAME = 0x0005
pub const DNS_TYPE_DHCID = 0x0031
pub const DNS_TYPE_DNAME = 0x0027
pub const DNS_TYPE_DNSKEY = 0x0030
pub const DNS_TYPE_DS = 0x002B
pub const DNS_TYPE_EID = 0x001f
pub const DNS_TYPE_GID = 0x0066
pub const DNS_TYPE_GPOS = 0x001b
pub const DNS_TYPE_HINFO = 0x000d
pub const DNS_TYPE_ISDN = 0x0014
pub const DNS_TYPE_IXFR = 0x00fb
pub const DNS_TYPE_KEY = 0x0019
pub const DNS_TYPE_KX = 0x0024
pub const DNS_TYPE_LOC = 0x001d
pub const DNS_TYPE_MAILA = 0x00fe
pub const DNS_TYPE_MAILB = 0x00fd
pub const DNS_TYPE_MB = 0x0007
pub const DNS_TYPE_MD = 0x0003
pub const DNS_TYPE_MF = 0x0004
pub const DNS_TYPE_MG = 0x0008
pub const DNS_TYPE_MINFO = 0x000e
pub const DNS_TYPE_MR = 0x0009
pub const DNS_TYPE_MX = 0x000f
pub const DNS_TYPE_NAPTR = 0x0023
pub const DNS_TYPE_NBSTAT = 0xff01
pub const DNS_TYPE_NIMLOC = 0x0020
pub const DNS_TYPE_NS = 0x0002
pub const DNS_TYPE_NSAP = 0x0016
pub const DNS_TYPE_NSAPPTR = 0x0017
pub const DNS_TYPE_NSEC = 0x002F
pub const DNS_TYPE_NULL = 0x000a
pub const DNS_TYPE_NXT = 0x001e
pub const DNS_TYPE_OPT = 0x0029
pub const DNS_TYPE_PTR = 0x000c
pub const DNS_TYPE_PX = 0x001a
pub const DNS_TYPE_RP = 0x0011
pub const DNS_TYPE_RRSIG = 0x002E
pub const DNS_TYPE_RT = 0x0015
pub const DNS_TYPE_SIG = 0x0018
pub const DNS_TYPE_SINK = 0x0028
pub const DNS_TYPE_SOA = 0x0006
pub const DNS_TYPE_SRV = 0x0021
pub const DNS_TYPE_TEXT = 0x0010
pub const DNS_TYPE_TKEY = 0x00f9
pub const DNS_TYPE_TSIG = 0x00fa
pub const DNS_TYPE_UID = 0x0065
pub const DNS_TYPE_UINFO = 0x0064
pub const DNS_TYPE_UNSPEC = 0x0067
pub const DNS_TYPE_WINS = 0xff01
pub const DNS_TYPE_WINSR = 0xff02
pub const DNS_TYPE_WKS = 0x000b
pub const DNS_TYPE_X25 = 0x0013
pub const DUPLICATE_CLOSE_SOURCE = 0x00000001
pub const DUPLICATE_SAME_ACCESS = 0x00000002
pub const DnsSectionAdditional = 0x0003
pub const DnsSectionAnswer = 0x0001
pub const DnsSectionAuthority = 0x0002
pub const DnsSectionQuestion = 0x0000
pub const FILE_ACTION_ADDED = 1
pub const FILE_ACTION_MODIFIED = 3
pub const FILE_ACTION_REMOVED = 2
pub const FILE_ACTION_RENAMED_NEW_NAME = 5
pub const FILE_ACTION_RENAMED_OLD_NAME = 4
pub const FILE_APPEND_DATA = 0x00000004
pub const FILE_ATTRIBUTE_ARCHIVE = 0x00000020
pub const FILE_ATTRIBUTE_DIRECTORY = 0x00000010
pub const FILE_ATTRIBUTE_HIDDEN = 0x00000002
pub const FILE_ATTRIBUTE_NORMAL = 0x00000080
pub const FILE_ATTRIBUTE_READONLY = 0x00000001
pub const FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
pub const FILE_ATTRIBUTE_SYSTEM = 0x00000004
pub const FILE_BEGIN = 0
pub const FILE_CURRENT = 1
pub const FILE_END = 2
pub const FILE_FLAG_BACKUP_SEMANTICS = 0x02000000
pub const FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000
pub const FILE_FLAG_OVERLAPPED = 0x40000000
pub const FILE_LIST_DIRECTORY = 0x00000001
pub const FILE_MAP_COPY = 0x01
pub const FILE_MAP_EXECUTE = 0x20
pub const FILE_MAP_READ = 0x04
pub const FILE_MAP_WRITE = 0x02
pub const FILE_NOTIFY_CHANGE_ATTRIBUTES = 4
pub const FILE_NOTIFY_CHANGE_CREATION = 64
pub const FILE_NOTIFY_CHANGE_DIR_NAME = 2
pub const FILE_NOTIFY_CHANGE_FILE_NAME = 1
pub const FILE_NOTIFY_CHANGE_LAST_ACCESS = 32
pub const FILE_NOTIFY_CHANGE_LAST_WRITE = 16
pub const FILE_NOTIFY_CHANGE_SIZE = 8
pub const FILE_SHARE_DELETE = 0x00000004
pub const FILE_SHARE_READ = 0x00000001
pub const FILE_SHARE_WRITE = 0x00000002
pub const FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1
pub const FILE_SKIP_SET_EVENT_ON_HANDLE = 2
pub const FILE_TYPE_CHAR = 0x0002
pub const FILE_TYPE_DISK = 0x0001
pub const FILE_TYPE_PIPE = 0x0003
pub const FILE_TYPE_REMOTE = 0x8000
pub const FILE_TYPE_UNKNOWN = 0x0000
pub const FILE_WRITE_ATTRIBUTES = 0x00000100
pub const FORMAT_MESSAGE_ALLOCATE_BUFFER = 256
pub const FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192
pub const FORMAT_MESSAGE_FROM_HMODULE = 2048
pub const FORMAT_MESSAGE_FROM_STRING = 1024
pub const FORMAT_MESSAGE_FROM_SYSTEM = 4096
pub const FORMAT_MESSAGE_IGNORE_INSERTS = 512
pub const FORMAT_MESSAGE_MAX_WIDTH_MASK = 255
pub const FSCTL_GET_REPARSE_POINT = 0x900A8
pub const GENERIC_ALL = 0x10000000
pub const GENERIC_EXECUTE = 0x20000000
pub const GENERIC_READ = 0x80000000
pub const GENERIC_WRITE = 0x40000000
pub const GetFileExInfoStandard = 0
pub const GetFileExMaxInfoLevel = 1
pub const HANDLE_FLAG_INHERIT = 0x00000001
pub const HKEY_CLASSES_ROOT = 2147483648
pub const HKEY_CURRENT_CONFIG = 2147483653
pub const HKEY_CURRENT_USER = 2147483649
pub const HKEY_DYN_DATA = 2147483654
pub const HKEY_LOCAL_MACHINE = 2147483650
pub const HKEY_PERFORMANCE_DATA = 2147483652
pub const HKEY_USERS = 2147483651
pub const IFF_BROADCAST = 2
pub const IFF_LOOPBACK = 4
pub const IFF_MULTICAST = 16
pub const IFF_POINTTOPOINT = 8
pub const IFF_UP = 1
pub const IGNORE = 0
pub const INFINITE = 0xffffffff
pub const INVALID_FILE_ATTRIBUTES = 0xffffffff
pub const IOC_IN = 0x80000000
pub const IOC_INOUT = 3221225472
pub const IOC_OUT = 0x40000000
pub const IOC_VENDOR = 0x18000000
pub const IOC_WS2 = 0x08000000
pub const IO_REPARSE_TAG_SYMLINK = 0xA000000C
pub const IPPROTO_IP = 0
pub const IPPROTO_IPV6 = 0x29
pub const IPPROTO_TCP = 6
pub const IPPROTO_UDP = 17
pub const IPV6_JOIN_GROUP = 0xc
pub const IPV6_LEAVE_GROUP = 0xd
pub const IPV6_MULTICAST_HOPS = 0xa
pub const IPV6_MULTICAST_IF = 0x9
pub const IPV6_MULTICAST_LOOP = 0xb
pub const IPV6_UNICAST_HOPS = 0x4
pub const IPV6_V6ONLY = 0x1b
pub const IP_ADD_MEMBERSHIP = 0xc
pub const IP_DROP_MEMBERSHIP = 0xd
pub const IP_MULTICAST_IF = 0x9
pub const IP_MULTICAST_LOOP = 0xb
pub const IP_MULTICAST_TTL = 0xa
pub const IP_TOS = 0x3
pub const IP_TTL = 0x4
pub const ImplementsGetwd = true
pub const InvalidHandle: Handle = 18446744073709551615
pub const KEY_ALL_ACCESS = 0xf003f
pub const KEY_CREATE_LINK = 32
pub const KEY_CREATE_SUB_KEY = 4
pub const KEY_ENUMERATE_SUB_KEYS = 8
pub const KEY_EXECUTE = 0x20019
pub const KEY_NOTIFY = 16
pub const KEY_QUERY_VALUE = 1
pub const KEY_READ = 0x20019
pub const KEY_SET_VALUE = 2
pub const KEY_WOW64_32KEY = 0x0200
pub const KEY_WOW64_64KEY = 0x0100
pub const KEY_WRITE = 0x20006
pub const LANG_ENGLISH = 0x09
pub const LAYERED_PROTOCOL = 0
pub const MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16384
pub const MAXLEN_IFDESCR = 256
pub const MAXLEN_PHYSADDR = 8
pub const MAX_ADAPTER_ADDRESS_LENGTH = 8
pub const MAX_ADAPTER_DESCRIPTION_LENGTH = 128
pub const MAX_ADAPTER_NAME_LENGTH = 256
pub const MAX_COMPUTERNAME_LENGTH = 15
pub const MAX_INTERFACE_NAME_LEN = 256
pub const MAX_LONG_PATH = 32768
pub const MAX_PATH = 260
pub const MAX_PROTOCOL_CHAIN = 7
pub const MaxTokenInfoClass = 29
pub const NameCanonical = 7
pub const NameCanonicalEx = 9
pub const NameDisplay = 3
pub const NameDnsDomain = 12
pub const NameFullyQualifiedDN = 1
pub const NameSamCompatible = 2
pub const NameServicePrincipal = 10
pub const NameUniqueId = 6
pub const NameUnknown = 0
pub const NameUserPrincipal = 8
pub const NetSetupDomainName = 3
pub const NetSetupUnjoined = 1
pub const NetSetupUnknownStatus = 0
pub const NetSetupWorkgroupName = 2
pub const OPEN_ALWAYS = 4
pub const OPEN_EXISTING = 3
pub const O_APPEND = 0x00400
pub const O_ASYNC = 0x02000
pub const O_CLOEXEC = 0x80000
pub const O_CREAT = 0x00040
pub const O_EXCL = 0x00080
pub const O_NOCTTY = 0x00100
pub const O_NONBLOCK = 0x00800
pub const O_RDONLY = 0x00000
pub const O_RDWR = 0x00002
pub const O_SYNC = 0x01000
pub const O_TRUNC = 0x00200
pub const O_WRONLY = 0x00001
pub const PAGE_EXECUTE_READ = 0x20
pub const PAGE_EXECUTE_READWRITE = 0x40
pub const PAGE_EXECUTE_WRITECOPY = 0x80
pub const PAGE_READONLY = 0x02
pub const PAGE_READWRITE = 0x04
pub const PAGE_WRITECOPY = 0x08
pub const PFL_HIDDEN = 0x00000004
pub const PFL_MATCHES_PROTOCOL_ZERO = 0x00000008
pub const PFL_MULTIPLE_PROTO_ENTRIES = 0x00000001
pub const PFL_NETWORKDIRECT_PROVIDER = 0x00000010
pub const PFL_RECOMMENDED_PROTO_ENTRY = 0x00000002
pub const PKCS_7_ASN_ENCODING = 0x00010000
pub const PROCESS_QUERY_INFORMATION = 0x00000400
pub const PROCESS_TERMINATE = 1
pub const PROV_DH_SCHANNEL = 18
pub const PROV_DSS = 3
pub const PROV_DSS_DH = 13
pub const PROV_EC_ECDSA_FULL = 16
pub const PROV_EC_ECDSA_SIG = 14
pub const PROV_EC_ECNRA_FULL = 17
pub const PROV_EC_ECNRA_SIG = 15
pub const PROV_FORTEZZA = 4
pub const PROV_INTEL_SEC = 22
pub const PROV_MS_EXCHANGE = 5
pub const PROV_REPLACE_OWF = 23
pub const PROV_RNG = 21
pub const PROV_RSA_AES = 24
pub const PROV_RSA_FULL = 1
pub const PROV_RSA_SCHANNEL = 12
pub const PROV_RSA_SIG = 2
pub const PROV_SPYRUS_LYNKS = 20
pub const PROV_SSL = 6
pub const REG_BINARY = 3
pub const REG_DWORD = 4
pub const REG_DWORD_BIG_ENDIAN = 5
pub const REG_DWORD_LITTLE_ENDIAN = 4
pub const REG_EXPAND_SZ = 2
pub const REG_FULL_RESOURCE_DESCRIPTOR = 9
pub const REG_LINK = 6
pub const REG_MULTI_SZ = 7
pub const REG_NONE = 0
pub const REG_QWORD = 11
pub const REG_QWORD_LITTLE_ENDIAN = 11
pub const REG_RESOURCE_LIST = 8
pub const REG_RESOURCE_REQUIREMENTS_LIST = 10
pub const REG_SZ = 1
pub const SHUT_RD = 0
pub const SHUT_RDWR = 2
pub const SHUT_WR = 1
pub const SIO_GET_EXTENSION_FUNCTION_POINTER = 3355443206
pub const SIO_GET_INTERFACE_LIST = 0x4004747F
pub const SIO_KEEPALIVE_VALS = 2550136836
pub const SIO_UDP_CONNRESET = 2550136844
pub const SOCK_DGRAM = 2
pub const SOCK_RAW = 3
pub const SOCK_SEQPACKET = 5
pub const SOCK_STREAM = 1
pub const SOL_SOCKET = 0xffff
pub const SOMAXCONN = 0x7fffffff
pub const SO_BROADCAST = 32
pub const SO_DONTROUTE = 16
pub const SO_KEEPALIVE = 8
pub const SO_LINGER = 128
pub const SO_RCVBUF = 0x1002
pub const SO_REUSEADDR = 4
pub const SO_SNDBUF = 0x1001
pub const SO_UPDATE_ACCEPT_CONTEXT = 0x700b
pub const SO_UPDATE_CONNECT_CONTEXT = 0x7010
pub const STANDARD_RIGHTS_ALL = 0x1F0000
pub const STANDARD_RIGHTS_EXECUTE = 0x20000
pub const STANDARD_RIGHTS_READ = 0x20000
pub const STANDARD_RIGHTS_REQUIRED = 0xf0000
pub const STANDARD_RIGHTS_WRITE = 0x20000
pub const STARTF_USESHOWWINDOW = 0x00000001
pub const STARTF_USESTDHANDLES = 0x00000100
pub const STD_ERROR_HANDLE = -12
pub const STD_INPUT_HANDLE = -10
pub const STD_OUTPUT_HANDLE = -11
pub const SUBLANG_ENGLISH_US = 0x01
/// ShowWindow constants
pub const SW_FORCEMINIMIZE = 11
/// ShowWindow constants
pub const SW_HIDE = 0
/// ShowWindow constants
pub const SW_MAXIMIZE = 3
/// ShowWindow constants
pub const SW_MINIMIZE = 6
/// ShowWindow constants
pub const SW_NORMAL = 1
/// ShowWindow constants
pub const SW_RESTORE = 9
/// ShowWindow constants
pub const SW_SHOW = 5
/// ShowWindow constants
pub const SW_SHOWDEFAULT = 10
/// ShowWindow constants
pub const SW_SHOWMAXIMIZED = 3
/// ShowWindow constants
pub const SW_SHOWMINIMIZED = 2
/// ShowWindow constants
pub const SW_SHOWMINNOACTIVE = 7
/// ShowWindow constants
pub const SW_SHOWNA = 8
/// ShowWindow constants
pub const SW_SHOWNOACTIVATE = 4
/// ShowWindow constants
pub const SW_SHOWNORMAL = 1
pub const SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1
pub const SYNCHRONIZE = 0x00100000
/// Invented values to support what package os expects.
pub const S_IFBLK = 0x6000
/// Invented values to support what package os expects.
pub const S_IFCHR = 0x2000
/// Invented values to support what package os expects.
pub const S_IFDIR = 0x4000
/// Invented values to support what package os expects.
pub const S_IFIFO = 0x1000
/// Invented values to support what package os expects.
pub const S_IFLNK = 0xa000
/// Invented values to support what package os expects.
pub const S_IFMT = 0x1f000
/// Invented values to support what package os expects.
pub const S_IFREG = 0x8000
/// Invented values to support what package os expects.
pub const S_IFSOCK = 0xc000
/// Invented values to support what package os expects.
pub const S_IRUSR = 0x100
/// Invented values to support what package os expects.
pub const S_ISGID = 0x400
/// Invented values to support what package os expects.
pub const S_ISUID = 0x800
/// Invented values to support what package os expects.
pub const S_ISVTX = 0x200
/// Invented values to support what package os expects.
pub const S_IWRITE = 0x80
/// Invented values to support what package os expects.
pub const S_IWUSR = 0x80
/// Invented values to support what package os expects.
pub const S_IXUSR = 0x40
pub const SidTypeAlias = 4
pub const SidTypeComputer = 9
pub const SidTypeDeletedAccount = 6
pub const SidTypeDomain = 3
pub const SidTypeGroup = 2
pub const SidTypeInvalid = 7
pub const SidTypeLabel = 10
pub const SidTypeUnknown = 8
pub const SidTypeUser = 1
pub const SidTypeWellKnownGroup = 5
pub const TCP_NODELAY = 1
pub const TF_DISCONNECT = 1
pub const TF_REUSE_SOCKET = 2
pub const TF_USE_DEFAULT_WORKER = 0
pub const TF_USE_KERNEL_APC = 32
pub const TF_USE_SYSTEM_THREAD = 16
pub const TF_WRITE_BEHIND = 4
pub const TH32CS_INHERIT = 0x80000000
pub const TH32CS_SNAPALL = 15
pub const TH32CS_SNAPHEAPLIST = 0x01
pub const TH32CS_SNAPMODULE = 0x08
pub const TH32CS_SNAPMODULE32 = 0x10
pub const TH32CS_SNAPPROCESS = 0x02
pub const TH32CS_SNAPTHREAD = 0x04
pub const TIME_ZONE_ID_DAYLIGHT = 2
pub const TIME_ZONE_ID_STANDARD = 1
pub const TIME_ZONE_ID_UNKNOWN = 0
pub const TOKEN_ADJUST_DEFAULT = 128
pub const TOKEN_ADJUST_GROUPS = 64
pub const TOKEN_ADJUST_PRIVILEGES = 32
pub const TOKEN_ADJUST_SESSIONID = 256
pub const TOKEN_ALL_ACCESS = 983551
pub const TOKEN_ASSIGN_PRIMARY = 1
pub const TOKEN_DUPLICATE = 2
pub const TOKEN_EXECUTE = 131072
pub const TOKEN_IMPERSONATE = 4
pub const TOKEN_QUERY = 8
pub const TOKEN_QUERY_SOURCE = 16
pub const TOKEN_READ = 131080
pub const TOKEN_WRITE = 131296
pub const TRUNCATE_EXISTING = 5
pub const TokenAccessInformation = 22
pub const TokenAuditPolicy = 16
pub const TokenDefaultDacl = 6
pub const TokenElevation = 20
pub const TokenElevationType = 18
pub const TokenGroups = 2
pub const TokenGroupsAndPrivileges = 13
pub const TokenHasRestrictions = 21
pub const TokenImpersonationLevel = 9
pub const TokenIntegrityLevel = 25
pub const TokenLinkedToken = 19
pub const TokenLogonSid = 28
pub const TokenMandatoryPolicy = 27
pub const TokenOrigin = 17
pub const TokenOwner = 4
pub const TokenPrimaryGroup = 5
pub const TokenPrivileges = 3
pub const TokenRestrictedSids = 11
pub const TokenSandBoxInert = 15
pub const TokenSessionId = 12
pub const TokenSessionReference = 14
pub const TokenSource = 7
pub const TokenStatistics = 10
pub const TokenType = 8
pub const TokenUIAccess = 26
pub const TokenUser = 1
pub const TokenVirtualizationAllowed = 23
pub const TokenVirtualizationEnabled = 24
pub const UNIX_PATH_MAX = 108
pub const USAGE_MATCH_TYPE_AND = 0
pub const USAGE_MATCH_TYPE_OR = 1
pub const WAIT_ABANDONED = 0x00000080
pub const WAIT_FAILED = 0xFFFFFFFF
pub const WAIT_OBJECT_0 = 0x00000000
pub const WAIT_TIMEOUT = 258
pub const WSADESCRIPTION_LEN = 256
pub const WSAPROTOCOL_LEN = 255
pub const WSASYS_STATUS_LEN = 128
pub const X509_ASN_ENCODING = 0x00000001
pub const XP1_CONNECTIONLESS = 0x00000001
pub const XP1_CONNECT_DATA = 0x00000080
pub const XP1_DISCONNECT_DATA = 0x00000100
pub const XP1_EXPEDITED_DATA = 0x00000040
pub const XP1_GRACEFUL_CLOSE = 0x00000020
pub const XP1_GUARANTEED_DELIVERY = 0x00000002
pub const XP1_GUARANTEED_ORDER = 0x00000004
pub const XP1_IFS_HANDLES = 0x00020000
pub const XP1_MESSAGE_ORIENTED = 0x00000008
pub const XP1_MULTIPOINT_CONTROL_PLANE = 0x00000800
pub const XP1_MULTIPOINT_DATA_PLANE = 0x00001000
pub const XP1_PARTIAL_MESSAGE = 0x00040000
pub const XP1_PSEUDO_STREAM = 0x00000010
pub const XP1_QOS_SUPPORTED = 0x00002000
pub const XP1_SAN_SUPPORT_SDP = 0x00080000
pub const XP1_SUPPORT_BROADCAST = 0x00000200
pub const XP1_SUPPORT_MULTIPOINT = 0x00000400
pub const XP1_UNI_RECV = 0x00010000
pub const XP1_UNI_SEND = 0x00008000
/// ForkLock is not used on Windows.
pub var ForkLock: sync.RWMutex
pub var OID_PKIX_KP_SERVER_AUTH: Slice<byte>
pub var OID_SERVER_GATED_CRYPTO: Slice<byte>
pub var OID_SGC_NETSCAPE: Slice<byte>
/// For testing: clients can set this flag to force
/// creation of IPv6 sockets to return [EAFNOSUPPORT].
pub var SocketDisableIPv6: bool
pub var Stderr: Handle
pub var Stdin: Handle
pub var Stdout: Handle
pub var WSAID_CONNECTEX: GUID
impl DLL {
/// FindProc searches [DLL] d for procedure named name and returns [*Proc]
/// if found. It returns an error if search fails.
fn FindProc(self: Ref<DLL>, name: string) -> Result<Ref<Proc>, error>
/// MustFindProc is like [DLL.FindProc] but panics if search fails.
fn MustFindProc(self: Ref<DLL>, name: string) -> Ref<Proc>
/// Release unloads [DLL] d from memory.
fn Release(self: Ref<DLL>) -> Result<(), error>
}
impl DLLError {
fn Error(self: Ref<DLLError>) -> string
fn Unwrap(self: Ref<DLLError>) -> Option<error>
}
impl Errno {
fn Error(self) -> string
fn Is(self, target: error) -> bool
fn Temporary(self) -> bool
fn Timeout(self) -> bool
}
impl Filetime {
/// Nanoseconds returns Filetime ft in nanoseconds
/// since Epoch (00:00:00 UTC, January 1, 1970).
fn Nanoseconds(self: Ref<Filetime>) -> int64
}
impl LazyDLL {
/// Handle returns d's module handle.
fn Handle(self: Ref<LazyDLL>) -> uint
/// Load loads DLL file d.Name into memory. It returns an error if fails.
/// Load will not try to load DLL, if it is already loaded into memory.
fn Load(self: Ref<LazyDLL>) -> Result<(), error>
/// NewProc returns a [LazyProc] for accessing the named procedure in the [DLL] d.
fn NewProc(self: Ref<LazyDLL>, name: string) -> Ref<LazyProc>
}
impl LazyProc {
/// Addr returns the address of the procedure represented by p.
/// The return value can be passed to Syscall to run the procedure.
fn Addr(self: Ref<LazyProc>) -> uint
/// Call executes procedure p with arguments a. See the documentation of
/// Proc.Call for more information.
fn Call(self: Ref<LazyProc>, a: VarArgs<uint>) -> Result<(uint, uint), error>
/// Find searches [DLL] for procedure named p.Name. It returns
/// an error if search fails. Find will not search procedure,
/// if it is already found and loaded into memory.
fn Find(self: Ref<LazyProc>) -> Result<(), error>
}
impl Proc {
/// Addr returns the address of the procedure represented by p.
/// The return value can be passed to Syscall to run the procedure.
fn Addr(self: Ref<Proc>) -> uint
/// Call executes procedure p with arguments a.
///
/// The returned error is always non-nil, constructed from the result of GetLastError.
/// Callers must inspect the primary return value to decide whether an error occurred
/// (according to the semantics of the specific function being called) before consulting
/// the error. The error always has type [Errno].
///
/// On amd64, Call can pass and return floating-point values. To pass
/// an argument x with C type "float", use
/// uintptr(math.Float32bits(x)). To pass an argument with C type
/// "double", use uintptr(math.Float64bits(x)). Floating-point return
/// values are returned in r2. The return value for C type "float" is
/// [math.Float32frombits](uint32(r2)). For C type "double", it is
/// [math.Float64frombits](uint64(r2)).
fn Call(self: Ref<Proc>, a: VarArgs<uint>) -> Result<(uint, uint), error>
}
impl RawSockaddrAny {
fn Sockaddr(self: Ref<RawSockaddrAny>) -> Result<Sockaddr, error>
}
impl SID {
/// Copy creates a duplicate of security identifier sid.
fn Copy(self: Ref<SID>) -> Result<Ref<SID>, error>
/// Len returns the length, in bytes, of a valid security identifier sid.
fn Len(self: Ref<SID>) -> int
/// LookupAccount retrieves the name of the account for this sid
/// and the name of the first domain on which this sid is found.
/// System specify target computer to search for.
fn LookupAccount(self: Ref<SID>, system: string) -> Result<(string, string, uint32), error>
/// String converts sid to a string format
/// suitable for display, storage, or transmission.
fn String(self: Ref<SID>) -> Result<string, error>
}
impl Signal {
fn Signal(self)
fn String(self) -> string
}
impl Timespec {
/// Nano returns the time stored in ts as nanoseconds.
fn Nano(self: Ref<Timespec>) -> int64
/// Unix returns the time stored in ts as seconds plus nanoseconds.
fn Unix(self: Ref<Timespec>) -> (int64, int64)
}
impl Timeval {
/// Nano returns the time stored in tv as nanoseconds.
fn Nano(self: Ref<Timeval>) -> int64
fn Nanoseconds(self: Ref<Timeval>) -> int64
/// Unix returns the time stored in tv as seconds plus nanoseconds.
fn Unix(self: Ref<Timeval>) -> (int64, int64)
}
impl Token {
/// Close releases access to access token.
#[allow(unused_result)]
fn Close(self) -> Result<(), error>
/// GetTokenPrimaryGroup retrieves access token t primary group information.
/// A pointer to a SID structure representing a group that will become
/// the primary group of any objects created by a process using this access token.
fn GetTokenPrimaryGroup(self) -> Result<Ref<Tokenprimarygroup>, error>
/// GetTokenUser retrieves access token t user account information.
fn GetTokenUser(self) -> Result<Ref<Tokenuser>, error>
/// GetUserProfileDirectory retrieves path to the
/// root directory of the access token t user's profile.
fn GetUserProfileDirectory(self) -> Result<string, error>
}
impl WaitStatus {
fn Continued(self) -> bool
fn CoreDump(self) -> bool
fn ExitStatus(self) -> int
fn Exited(self) -> bool
fn Signal(self) -> Signal
fn Signaled(self) -> bool
fn StopSignal(self) -> Signal
fn Stopped(self) -> bool
fn TrapCause(self) -> int
}