123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- // Code generated mksyscall_windows.exe DO NOT EDIT
- package hcn
- import (
- "syscall"
- "unsafe"
- "golang.org/x/sys/windows"
- )
- var _ unsafe.Pointer
- // Do the interface allocations only once for common
- // Errno values.
- const (
- errnoERROR_IO_PENDING = 997
- )
- var (
- errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
- )
- // errnoErr returns common boxed Errno values, to prevent
- // allocations at runtime.
- func errnoErr(e syscall.Errno) error {
- switch e {
- case 0:
- return nil
- case errnoERROR_IO_PENDING:
- return errERROR_IO_PENDING
- }
- // TODO: add more here, after collecting data on the common
- // error values see on Windows. (perhaps when running
- // all.bat?)
- return e
- }
- var (
- modiphlpapi = windows.NewLazySystemDLL("iphlpapi.dll")
- modvmcompute = windows.NewLazySystemDLL("vmcompute.dll")
- modcomputenetwork = windows.NewLazySystemDLL("computenetwork.dll")
- procSetCurrentThreadCompartmentId = modiphlpapi.NewProc("SetCurrentThreadCompartmentId")
- procHNSCall = modvmcompute.NewProc("HNSCall")
- procHcnEnumerateNetworks = modcomputenetwork.NewProc("HcnEnumerateNetworks")
- procHcnCreateNetwork = modcomputenetwork.NewProc("HcnCreateNetwork")
- procHcnOpenNetwork = modcomputenetwork.NewProc("HcnOpenNetwork")
- procHcnModifyNetwork = modcomputenetwork.NewProc("HcnModifyNetwork")
- procHcnQueryNetworkProperties = modcomputenetwork.NewProc("HcnQueryNetworkProperties")
- procHcnDeleteNetwork = modcomputenetwork.NewProc("HcnDeleteNetwork")
- procHcnCloseNetwork = modcomputenetwork.NewProc("HcnCloseNetwork")
- procHcnEnumerateEndpoints = modcomputenetwork.NewProc("HcnEnumerateEndpoints")
- procHcnCreateEndpoint = modcomputenetwork.NewProc("HcnCreateEndpoint")
- procHcnOpenEndpoint = modcomputenetwork.NewProc("HcnOpenEndpoint")
- procHcnModifyEndpoint = modcomputenetwork.NewProc("HcnModifyEndpoint")
- procHcnQueryEndpointProperties = modcomputenetwork.NewProc("HcnQueryEndpointProperties")
- procHcnDeleteEndpoint = modcomputenetwork.NewProc("HcnDeleteEndpoint")
- procHcnCloseEndpoint = modcomputenetwork.NewProc("HcnCloseEndpoint")
- procHcnEnumerateNamespaces = modcomputenetwork.NewProc("HcnEnumerateNamespaces")
- procHcnCreateNamespace = modcomputenetwork.NewProc("HcnCreateNamespace")
- procHcnOpenNamespace = modcomputenetwork.NewProc("HcnOpenNamespace")
- procHcnModifyNamespace = modcomputenetwork.NewProc("HcnModifyNamespace")
- procHcnQueryNamespaceProperties = modcomputenetwork.NewProc("HcnQueryNamespaceProperties")
- procHcnDeleteNamespace = modcomputenetwork.NewProc("HcnDeleteNamespace")
- procHcnCloseNamespace = modcomputenetwork.NewProc("HcnCloseNamespace")
- procHcnEnumerateLoadBalancers = modcomputenetwork.NewProc("HcnEnumerateLoadBalancers")
- procHcnCreateLoadBalancer = modcomputenetwork.NewProc("HcnCreateLoadBalancer")
- procHcnOpenLoadBalancer = modcomputenetwork.NewProc("HcnOpenLoadBalancer")
- procHcnModifyLoadBalancer = modcomputenetwork.NewProc("HcnModifyLoadBalancer")
- procHcnQueryLoadBalancerProperties = modcomputenetwork.NewProc("HcnQueryLoadBalancerProperties")
- procHcnDeleteLoadBalancer = modcomputenetwork.NewProc("HcnDeleteLoadBalancer")
- procHcnCloseLoadBalancer = modcomputenetwork.NewProc("HcnCloseLoadBalancer")
- procHcnOpenService = modcomputenetwork.NewProc("HcnOpenService")
- procHcnRegisterServiceCallback = modcomputenetwork.NewProc("HcnRegisterServiceCallback")
- procHcnUnregisterServiceCallback = modcomputenetwork.NewProc("HcnUnregisterServiceCallback")
- procHcnCloseService = modcomputenetwork.NewProc("HcnCloseService")
- )
- func SetCurrentThreadCompartmentId(compartmentId uint32) (hr error) {
- r0, _, _ := syscall.Syscall(procSetCurrentThreadCompartmentId.Addr(), 1, uintptr(compartmentId), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func _hnsCall(method string, path string, object string, response **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(method)
- if hr != nil {
- return
- }
- var _p1 *uint16
- _p1, hr = syscall.UTF16PtrFromString(path)
- if hr != nil {
- return
- }
- var _p2 *uint16
- _p2, hr = syscall.UTF16PtrFromString(object)
- if hr != nil {
- return
- }
- return __hnsCall(_p0, _p1, _p2, response)
- }
- func __hnsCall(method *uint16, path *uint16, object *uint16, response **uint16) (hr error) {
- if hr = procHNSCall.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHNSCall.Addr(), 4, uintptr(unsafe.Pointer(method)), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(object)), uintptr(unsafe.Pointer(response)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnEnumerateNetworks(query string, networks **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnEnumerateNetworks(_p0, networks, result)
- }
- func _hcnEnumerateNetworks(query *uint16, networks **uint16, result **uint16) (hr error) {
- if hr = procHcnEnumerateNetworks.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnEnumerateNetworks.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(networks)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCreateNetwork(id *_guid, settings string, network *hcnNetwork, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnCreateNetwork(id, _p0, network, result)
- }
- func _hcnCreateNetwork(id *_guid, settings *uint16, network *hcnNetwork, result **uint16) (hr error) {
- if hr = procHcnCreateNetwork.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnCreateNetwork.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnOpenNetwork(id *_guid, network *hcnNetwork, result **uint16) (hr error) {
- if hr = procHcnOpenNetwork.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnOpenNetwork.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(network)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnModifyNetwork(network hcnNetwork, settings string, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnModifyNetwork(network, _p0, result)
- }
- func _hcnModifyNetwork(network hcnNetwork, settings *uint16, result **uint16) (hr error) {
- if hr = procHcnModifyNetwork.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnModifyNetwork.Addr(), 3, uintptr(network), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnQueryNetworkProperties(network hcnNetwork, query string, properties **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnQueryNetworkProperties(network, _p0, properties, result)
- }
- func _hcnQueryNetworkProperties(network hcnNetwork, query *uint16, properties **uint16, result **uint16) (hr error) {
- if hr = procHcnQueryNetworkProperties.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnQueryNetworkProperties.Addr(), 4, uintptr(network), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnDeleteNetwork(id *_guid, result **uint16) (hr error) {
- if hr = procHcnDeleteNetwork.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnDeleteNetwork.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCloseNetwork(network hcnNetwork) (hr error) {
- if hr = procHcnCloseNetwork.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnCloseNetwork.Addr(), 1, uintptr(network), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnEnumerateEndpoints(query string, endpoints **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnEnumerateEndpoints(_p0, endpoints, result)
- }
- func _hcnEnumerateEndpoints(query *uint16, endpoints **uint16, result **uint16) (hr error) {
- if hr = procHcnEnumerateEndpoints.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnEnumerateEndpoints.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(endpoints)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCreateEndpoint(network hcnNetwork, id *_guid, settings string, endpoint *hcnEndpoint, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnCreateEndpoint(network, id, _p0, endpoint, result)
- }
- func _hcnCreateEndpoint(network hcnNetwork, id *_guid, settings *uint16, endpoint *hcnEndpoint, result **uint16) (hr error) {
- if hr = procHcnCreateEndpoint.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnCreateEndpoint.Addr(), 5, uintptr(network), uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnOpenEndpoint(id *_guid, endpoint *hcnEndpoint, result **uint16) (hr error) {
- if hr = procHcnOpenEndpoint.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnOpenEndpoint.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(endpoint)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnModifyEndpoint(endpoint hcnEndpoint, settings string, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnModifyEndpoint(endpoint, _p0, result)
- }
- func _hcnModifyEndpoint(endpoint hcnEndpoint, settings *uint16, result **uint16) (hr error) {
- if hr = procHcnModifyEndpoint.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnModifyEndpoint.Addr(), 3, uintptr(endpoint), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnQueryEndpointProperties(endpoint hcnEndpoint, query string, properties **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnQueryEndpointProperties(endpoint, _p0, properties, result)
- }
- func _hcnQueryEndpointProperties(endpoint hcnEndpoint, query *uint16, properties **uint16, result **uint16) (hr error) {
- if hr = procHcnQueryEndpointProperties.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnQueryEndpointProperties.Addr(), 4, uintptr(endpoint), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnDeleteEndpoint(id *_guid, result **uint16) (hr error) {
- if hr = procHcnDeleteEndpoint.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnDeleteEndpoint.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCloseEndpoint(endpoint hcnEndpoint) (hr error) {
- if hr = procHcnCloseEndpoint.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnCloseEndpoint.Addr(), 1, uintptr(endpoint), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnEnumerateNamespaces(query string, namespaces **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnEnumerateNamespaces(_p0, namespaces, result)
- }
- func _hcnEnumerateNamespaces(query *uint16, namespaces **uint16, result **uint16) (hr error) {
- if hr = procHcnEnumerateNamespaces.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnEnumerateNamespaces.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(namespaces)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCreateNamespace(id *_guid, settings string, namespace *hcnNamespace, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnCreateNamespace(id, _p0, namespace, result)
- }
- func _hcnCreateNamespace(id *_guid, settings *uint16, namespace *hcnNamespace, result **uint16) (hr error) {
- if hr = procHcnCreateNamespace.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnCreateNamespace.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnOpenNamespace(id *_guid, namespace *hcnNamespace, result **uint16) (hr error) {
- if hr = procHcnOpenNamespace.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnOpenNamespace.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(namespace)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnModifyNamespace(namespace hcnNamespace, settings string, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnModifyNamespace(namespace, _p0, result)
- }
- func _hcnModifyNamespace(namespace hcnNamespace, settings *uint16, result **uint16) (hr error) {
- if hr = procHcnModifyNamespace.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnModifyNamespace.Addr(), 3, uintptr(namespace), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnQueryNamespaceProperties(namespace hcnNamespace, query string, properties **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnQueryNamespaceProperties(namespace, _p0, properties, result)
- }
- func _hcnQueryNamespaceProperties(namespace hcnNamespace, query *uint16, properties **uint16, result **uint16) (hr error) {
- if hr = procHcnQueryNamespaceProperties.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnQueryNamespaceProperties.Addr(), 4, uintptr(namespace), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnDeleteNamespace(id *_guid, result **uint16) (hr error) {
- if hr = procHcnDeleteNamespace.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnDeleteNamespace.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCloseNamespace(namespace hcnNamespace) (hr error) {
- if hr = procHcnCloseNamespace.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnCloseNamespace.Addr(), 1, uintptr(namespace), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnEnumerateLoadBalancers(query string, loadBalancers **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnEnumerateLoadBalancers(_p0, loadBalancers, result)
- }
- func _hcnEnumerateLoadBalancers(query *uint16, loadBalancers **uint16, result **uint16) (hr error) {
- if hr = procHcnEnumerateLoadBalancers.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnEnumerateLoadBalancers.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(loadBalancers)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCreateLoadBalancer(id *_guid, settings string, loadBalancer *hcnLoadBalancer, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnCreateLoadBalancer(id, _p0, loadBalancer, result)
- }
- func _hcnCreateLoadBalancer(id *_guid, settings *uint16, loadBalancer *hcnLoadBalancer, result **uint16) (hr error) {
- if hr = procHcnCreateLoadBalancer.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnCreateLoadBalancer.Addr(), 4, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnOpenLoadBalancer(id *_guid, loadBalancer *hcnLoadBalancer, result **uint16) (hr error) {
- if hr = procHcnOpenLoadBalancer.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnOpenLoadBalancer.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(loadBalancer)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnModifyLoadBalancer(loadBalancer hcnLoadBalancer, settings string, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(settings)
- if hr != nil {
- return
- }
- return _hcnModifyLoadBalancer(loadBalancer, _p0, result)
- }
- func _hcnModifyLoadBalancer(loadBalancer hcnLoadBalancer, settings *uint16, result **uint16) (hr error) {
- if hr = procHcnModifyLoadBalancer.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnModifyLoadBalancer.Addr(), 3, uintptr(loadBalancer), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnQueryLoadBalancerProperties(loadBalancer hcnLoadBalancer, query string, properties **uint16, result **uint16) (hr error) {
- var _p0 *uint16
- _p0, hr = syscall.UTF16PtrFromString(query)
- if hr != nil {
- return
- }
- return _hcnQueryLoadBalancerProperties(loadBalancer, _p0, properties, result)
- }
- func _hcnQueryLoadBalancerProperties(loadBalancer hcnLoadBalancer, query *uint16, properties **uint16, result **uint16) (hr error) {
- if hr = procHcnQueryLoadBalancerProperties.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnQueryLoadBalancerProperties.Addr(), 4, uintptr(loadBalancer), uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnDeleteLoadBalancer(id *_guid, result **uint16) (hr error) {
- if hr = procHcnDeleteLoadBalancer.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnDeleteLoadBalancer.Addr(), 2, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCloseLoadBalancer(loadBalancer hcnLoadBalancer) (hr error) {
- if hr = procHcnCloseLoadBalancer.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnCloseLoadBalancer.Addr(), 1, uintptr(loadBalancer), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnOpenService(service *hcnService, result **uint16) (hr error) {
- if hr = procHcnOpenService.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnOpenService.Addr(), 2, uintptr(unsafe.Pointer(service)), uintptr(unsafe.Pointer(result)), 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnRegisterServiceCallback(service hcnService, callback int32, context int32, callbackHandle *hcnCallbackHandle) (hr error) {
- if hr = procHcnRegisterServiceCallback.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall6(procHcnRegisterServiceCallback.Addr(), 4, uintptr(service), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnUnregisterServiceCallback(callbackHandle hcnCallbackHandle) (hr error) {
- if hr = procHcnUnregisterServiceCallback.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnUnregisterServiceCallback.Addr(), 1, uintptr(callbackHandle), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
- func hcnCloseService(service hcnService) (hr error) {
- if hr = procHcnCloseService.Find(); hr != nil {
- return
- }
- r0, _, _ := syscall.Syscall(procHcnCloseService.Addr(), 1, uintptr(service), 0, 0)
- if int32(r0) < 0 {
- if r0&0x1fff0000 == 0x00070000 {
- r0 &= 0xffff
- }
- hr = syscall.Errno(r0)
- }
- return
- }
|