Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for InvalidHandle (0.22 sec)

  1. src/os/file_windows.go

    // methods to stop working.
    func (file *File) Fd() uintptr {
    	if file == nil {
    		return uintptr(syscall.InvalidHandle)
    	}
    	return uintptr(file.pfd.Sysfd)
    }
    
    // newFile returns a new File with the given file handle and name.
    // Unlike NewFile, it does not check that h is syscall.InvalidHandle.
    func newFile(h syscall.Handle, name string, kind string) *File {
    	if kind == "file" {
    		var m uint32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 30 15:38:38 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  2. src/internal/syscall/windows/syscall_windows.go

    	Control     syscall.WSABuf
    	Flags       uint32
    }
    
    //sys	WSASocket(af int32, typ int32, protocol int32, protinfo *syscall.WSAProtocolInfo, group uint32, flags uint32) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = ws2_32.WSASocketW
    //sys	WSAGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
    
    func loadWSASendRecvMsg() error {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/windows/zsyscall_windows.go

    	handle = Handle(r0)
    	if handle == InvalidHandle {
    		err = errnoErr(e1)
    	}
    	return
    }
    
    func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) {
    	r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0)
    	handle = Handle(r0)
    	if handle == InvalidHandle {
    		err = errnoErr(e1)
    	}
    	return
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 195.8K bytes
    - Viewed (0)
  4. src/os/os_windows_test.go

    	})
    	allowsPerRun(1, func() {
    		syscall.UTF16FromString("abc")
    	})
    }
    
    func TestNewFileInvalid(t *testing.T) {
    	t.Parallel()
    	if f := os.NewFile(uintptr(syscall.InvalidHandle), "invalid"); f != nil {
    		t.Errorf("NewFile(InvalidHandle) got %v want nil", f)
    	}
    }
    
    func TestReadDirPipe(t *testing.T) {
    	dir := `\\.\pipe\`
    	fi, err := os.Stat(dir)
    	if err != nil || !fi.IsDir() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 41.8K bytes
    - Viewed (0)
Back to top