Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for UTF16PtrToString (0.36 sec)

  1. src/net/lookup_windows.go

    	}
    	if e != nil {
    		return "", newDNSError(winError("dnsquery", e), name, "")
    	}
    	defer syscall.DnsRecordListFree(rec, 1)
    
    	resolved := resolveCNAME(syscall.StringToUTF16Ptr(name), rec)
    	cname := windows.UTF16PtrToString(resolved)
    	return absDomainName(cname), nil
    }
    
    func (r *Resolver) lookupSRV(ctx context.Context, service, proto, name string) (string, []*SRV, error) {
    	if systemConf().mustUseGoResolver(r) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:23:45 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  2. src/internal/syscall/windows/syscall_windows.go

    // proper long path handling without the need for fixups.
    //
    //go:linkname CanUseLongPaths
    var CanUseLongPaths bool
    
    // UTF16PtrToString is like UTF16ToString, but takes *uint16
    // as a parameter instead of []uint16.
    func UTF16PtrToString(p *uint16) string {
    	if p == nil {
    		return ""
    	}
    	end := unsafe.Pointer(p)
    	n := 0
    	for *(*uint16)(end) != 0 {
    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/os/exec_windows.go

    	h, e := syscall.OpenProcess(da, false, uint32(pid))
    	if e != nil {
    		return nil, NewSyscallError("OpenProcess", e)
    	}
    	return newHandleProcess(pid, uintptr(h)), nil
    }
    
    func init() {
    	cmd := windows.UTF16PtrToString(syscall.GetCommandLine())
    	if len(cmd) == 0 {
    		arg0, _ := Executable()
    		Args = []string{arg0}
    	} else {
    		Args = commandLineToArgv(cmd)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 5K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/windows/syscall_windows.go

    		return nil, err
    	}
    	return &a[0], nil
    }
    
    // UTF16PtrToString takes a pointer to a UTF-16 sequence and returns the corresponding UTF-8 encoded string.
    // If the pointer is nil, it returns the empty string. It assumes that the UTF-16 sequence is terminated
    // at a zero word; if the zero word is not present, the program may crash.
    func UTF16PtrToString(p *uint16) string {
    	if p == nil {
    		return ""
    	}
    	if *p == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 22:18:42 UTC 2024
    - 82.8K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/windows/security_windows.go

    	var sddl *uint16
    	err := convertSecurityDescriptorToStringSecurityDescriptor(sd, 1, 0xff, &sddl, nil)
    	if err != nil {
    		return ""
    	}
    	defer LocalFree(Handle(unsafe.Pointer(sddl)))
    	return UTF16PtrToString(sddl)
    }
    
    // ToAbsolute converts a self-relative security descriptor into an absolute one.
    func (selfRelativeSD *SECURITY_DESCRIPTOR) ToAbsolute() (absoluteSD *SECURITY_DESCRIPTOR, err error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 52.5K bytes
    - Viewed (0)
Back to top