Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5207)

Delta Between Two Patch Sets: src/pkg/syscall/zsyscall_windows_amd64.go

Issue 6736069: code review 6736069: runtime, syscall, os: add os.ExecPath() (string, error)
Left Patch Set: diff -r 8df088298a0c https://code.google.com/p/go/ Created 11 years, 5 months ago
Right Patch Set: diff -r 617db9efbdf1 https://code.google.com/p/go/ Created 11 years, 3 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/syscall/zsyscall_windows_386.go ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // mksyscall_windows.pl syscall_windows.go security_windows.go syscall_windows_a md64.go 1 // mksyscall_windows.pl syscall_windows.go security_windows.go syscall_windows_a md64.go
2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
3 3
4 package syscall 4 package syscall
5 5
6 import "unsafe" 6 import "unsafe"
7 7
8 var ( 8 var (
9 modkernel32 = NewLazyDLL("kernel32.dll") 9 modkernel32 = NewLazyDLL("kernel32.dll")
10 modadvapi32 = NewLazyDLL("advapi32.dll") 10 modadvapi32 = NewLazyDLL("advapi32.dll")
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 procDeleteFileW = modkernel32.NewProc("DeleteFileW" ) 42 procDeleteFileW = modkernel32.NewProc("DeleteFileW" )
43 procMoveFileW = modkernel32.NewProc("MoveFileW") 43 procMoveFileW = modkernel32.NewProc("MoveFileW")
44 procGetComputerNameW = modkernel32.NewProc("GetComputerN ameW") 44 procGetComputerNameW = modkernel32.NewProc("GetComputerN ameW")
45 procSetEndOfFile = modkernel32.NewProc("SetEndOfFile ") 45 procSetEndOfFile = modkernel32.NewProc("SetEndOfFile ")
46 procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTim eAsFileTime") 46 procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTim eAsFileTime")
47 procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneI nformation") 47 procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneI nformation")
48 procCreateIoCompletionPort = modkernel32.NewProc("CreateIoComp letionPort") 48 procCreateIoCompletionPort = modkernel32.NewProc("CreateIoComp letionPort")
49 procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCom pletionStatus") 49 procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCom pletionStatus")
50 procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCo mpletionStatus") 50 procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCo mpletionStatus")
51 procCancelIo = modkernel32.NewProc("CancelIo") 51 procCancelIo = modkernel32.NewProc("CancelIo")
52 procCancelIoEx = modkernel32.NewProc("CancelIoEx")
52 procCreateProcessW = modkernel32.NewProc("CreateProces sW") 53 procCreateProcessW = modkernel32.NewProc("CreateProces sW")
53 procOpenProcess = modkernel32.NewProc("OpenProcess" ) 54 procOpenProcess = modkernel32.NewProc("OpenProcess" )
54 procTerminateProcess = modkernel32.NewProc("TerminatePro cess") 55 procTerminateProcess = modkernel32.NewProc("TerminatePro cess")
55 procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeP rocess") 56 procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeP rocess")
56 procGetStartupInfoW = modkernel32.NewProc("GetStartupIn foW") 57 procGetStartupInfoW = modkernel32.NewProc("GetStartupIn foW")
57 procGetCurrentProcess = modkernel32.NewProc("GetCurrentPr ocess") 58 procGetCurrentProcess = modkernel32.NewProc("GetCurrentPr ocess")
58 procGetProcessTimes = modkernel32.NewProc("GetProcessTi mes") 59 procGetProcessTimes = modkernel32.NewProc("GetProcessTi mes")
59 procDuplicateHandle = modkernel32.NewProc("DuplicateHan dle") 60 procDuplicateHandle = modkernel32.NewProc("DuplicateHan dle")
60 procWaitForSingleObject = modkernel32.NewProc("WaitForSingl eObject") 61 procWaitForSingleObject = modkernel32.NewProc("WaitForSingl eObject")
61 procGetTempPathW = modkernel32.NewProc("GetTempPathW ") 62 procGetTempPathW = modkernel32.NewProc("GetTempPathW ")
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 procWSARecv = modws2_32.NewProc("WSARecv") 126 procWSARecv = modws2_32.NewProc("WSARecv")
126 procWSASend = modws2_32.NewProc("WSASend") 127 procWSASend = modws2_32.NewProc("WSASend")
127 procWSARecvFrom = modws2_32.NewProc("WSARecvFrom") 128 procWSARecvFrom = modws2_32.NewProc("WSARecvFrom")
128 procWSASendTo = modws2_32.NewProc("WSASendTo") 129 procWSASendTo = modws2_32.NewProc("WSASendTo")
129 procgethostbyname = modws2_32.NewProc("gethostbyname" ) 130 procgethostbyname = modws2_32.NewProc("gethostbyname" )
130 procgetservbyname = modws2_32.NewProc("getservbyname" ) 131 procgetservbyname = modws2_32.NewProc("getservbyname" )
131 procntohs = modws2_32.NewProc("ntohs") 132 procntohs = modws2_32.NewProc("ntohs")
132 procgetprotobyname = modws2_32.NewProc("getprotobyname ") 133 procgetprotobyname = modws2_32.NewProc("getprotobyname ")
133 procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") 134 procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
134 procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListF ree") 135 procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListF ree")
136 procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW")
137 procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW" )
135 procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") 138 procGetIfEntry = modiphlpapi.NewProc("GetIfEntry")
136 procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersI nfo") 139 procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersI nfo")
137 procTranslateNameW = modsecur32.NewProc("TranslateName W") 140 procTranslateNameW = modsecur32.NewProc("TranslateName W")
138 procGetUserNameExW = modsecur32.NewProc("GetUserNameEx W") 141 procGetUserNameExW = modsecur32.NewProc("GetUserNameEx W")
139 procNetUserGetInfo = modnetapi32.NewProc("NetUserGetIn fo") 142 procNetUserGetInfo = modnetapi32.NewProc("NetUserGetIn fo")
140 procNetApiBufferFree = modnetapi32.NewProc("NetApiBuffer Free") 143 procNetApiBufferFree = modnetapi32.NewProc("NetApiBuffer Free")
141 procLookupAccountSidW = modadvapi32.NewProc("LookupAccoun tSidW") 144 procLookupAccountSidW = modadvapi32.NewProc("LookupAccoun tSidW")
142 procLookupAccountNameW = modadvapi32.NewProc("LookupAccoun tNameW") 145 procLookupAccountNameW = modadvapi32.NewProc("LookupAccoun tNameW")
143 procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidTo StringSidW") 146 procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidTo StringSidW")
144 procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStrin gSidToSidW") 147 procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStrin gSidToSidW")
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 if r1 == 0 { 532 if r1 == 0 {
530 if e1 != 0 { 533 if e1 != 0 {
531 err = error(e1) 534 err = error(e1)
532 } else { 535 } else {
533 err = EINVAL 536 err = EINVAL
534 } 537 }
535 } 538 }
536 return 539 return
537 } 540 }
538 541
542 func CancelIoEx(s Handle, o *Overlapped) (err error) {
543 r1, _, e1 := Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsaf e.Pointer(o)), 0)
544 if r1 == 0 {
545 if e1 != 0 {
546 err = error(e1)
547 } else {
548 err = EINVAL
549 }
550 }
551 return
552 }
553
539 func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA ttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlag s uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) { 554 func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityA ttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlag s uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) {
540 var _p0 uint32 555 var _p0 uint32
541 if inheritHandles { 556 if inheritHandles {
542 _p0 = 1 557 _p0 = 1
543 } else { 558 } else {
544 _p0 = 0 559 _p0 = 0
545 } 560 }
546 r1, _, e1 := Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Poi nter(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(pro cSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(crea tionFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), u intptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0) 561 r1, _, e1 := Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Poi nter(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(pro cSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(crea tionFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), u intptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0)
547 if r1 == 0 { 562 if r1 == 0 {
548 if e1 != 0 { 563 if e1 != 0 {
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 status = Errno(r0) 1546 status = Errno(r0)
1532 } 1547 }
1533 return 1548 return
1534 } 1549 }
1535 1550
1536 func DnsRecordListFree(rl *DNSRecord, freetype uint32) { 1551 func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
1537 Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), ui ntptr(freetype), 0) 1552 Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), ui ntptr(freetype), 0)
1538 return 1553 return
1539 } 1554 }
1540 1555
1556 func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, resul t **AddrinfoW) (sockerr error) {
1557 r0, _, _ := Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer( nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)) , uintptr(unsafe.Pointer(result)), 0, 0)
1558 if r0 != 0 {
1559 sockerr = Errno(r0)
1560 }
1561 return
1562 }
1563
1564 func FreeAddrInfoW(addrinfo *AddrinfoW) {
1565 Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0)
1566 return
1567 }
1568
1541 func GetIfEntry(pIfRow *MibIfRow) (errcode error) { 1569 func GetIfEntry(pIfRow *MibIfRow) (errcode error) {
1542 r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIf Row)), 0, 0) 1570 r0, _, _ := Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIf Row)), 0, 0)
1543 if r0 != 0 { 1571 if r0 != 0 {
1544 errcode = Errno(r0) 1572 errcode = Errno(r0)
1545 } 1573 }
1546 return 1574 return
1547 } 1575 }
1548 1576
1549 func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) { 1577 func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) {
1550 r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointe r(ai)), uintptr(unsafe.Pointer(ol)), 0) 1578 r0, _, _ := Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointe r(ai)), uintptr(unsafe.Pointer(ol)), 0)
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) 1716 r1, _, e1 := Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen)))
1689 if r1 == 0 { 1717 if r1 == 0 {
1690 if e1 != 0 { 1718 if e1 != 0 {
1691 err = error(e1) 1719 err = error(e1)
1692 } else { 1720 } else {
1693 err = EINVAL 1721 err = EINVAL
1694 } 1722 }
1695 } 1723 }
1696 return 1724 return
1697 } 1725 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b