~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/syscall/zsyscall_windows_amd64.go

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý, Ondřej Surý, Michael Stapelberg
  • Date: 2012-06-28 12:14:15 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120628121415-w1b0076ixkarr1ml
[ Ondřej Surý ]
* Imported Upstream version 1.0.2
* Update Vcs fields to reflect new git repository location
* Kill get-orig-source, since 1.0.0, the tarballs can be downloaded
  from webpage

[ Michael Stapelberg ]
* golang-mode: use debian-pkg-add-load-path-item (Closes: #664802)
* Add manpages (Closes: #632964)
* Use updated pt.po from Pedro Ribeiro (Closes: #674958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
142
142
        procOpenProcessToken                 = modadvapi32.NewProc("OpenProcessToken")
143
143
        procGetTokenInformation              = modadvapi32.NewProc("GetTokenInformation")
144
144
        procGetUserProfileDirectoryW         = moduserenv.NewProc("GetUserProfileDirectoryW")
 
145
        procgetCurrentProcessId              = modkernel32.NewProc("GetCurrentProcessId")
145
146
)
146
147
 
147
148
func GetLastError() (lasterr error) {
308
309
        return
309
310
}
310
311
 
311
 
func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) {
 
312
func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
312
313
        r0, _, e1 := Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
313
314
        handle = Handle(r0)
314
315
        if handle == InvalidHandle {
321
322
        return
322
323
}
323
324
 
324
 
func FindNextFile(handle Handle, data *Win32finddata) (err error) {
 
325
func findNextFile1(handle Handle, data *win32finddata1) (err error) {
325
326
        r1, _, e1 := Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0)
326
327
        if int(r1) == 0 {
327
328
                if e1 != 0 {
1600
1601
        }
1601
1602
        return
1602
1603
}
 
1604
 
 
1605
func getCurrentProcessId() (pid uint32) {
 
1606
        r0, _, _ := Syscall(procgetCurrentProcessId.Addr(), 0, 0, 0, 0)
 
1607
        pid = uint32(r0)
 
1608
        return
 
1609
}