blob: b1a50f18690c31c8feb9faccaf99f6a7453be842 [file] [log] [blame]
David K. Bainbridge528b3182017-01-23 08:51:59 -08001// Copyright 2013 Canonical Ltd.
2// Licensed under the LGPLv3, see LICENCE file for details.
3
4// mksyscall_windows.pl -l32 file_windows.go
5// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
6
7package utils
8
9import "unsafe"
10import "syscall"
11
12var (
13 modkernel32 = syscall.NewLazyDLL("kernel32.dll")
14
15 procMoveFileExW = modkernel32.NewProc("MoveFileExW")
16)
17
18func moveFileEx(lpExistingFileName *uint16, lpNewFileName *uint16, dwFlags uint32) (err error) {
19 r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(lpExistingFileName)), uintptr(unsafe.Pointer(lpNewFileName)), uintptr(dwFlags))
20 if r1 == 0 {
21 if e1 != 0 {
22 err = error(e1)
23 } else {
24 err = syscall.EINVAL
25 }
26 }
27 return
28}