...

Source file src/github.com/Microsoft/hcsshim/internal/vmcompute/zsyscall_windows.go

Documentation: github.com/Microsoft/hcsshim/internal/vmcompute

     1  //go:build windows
     2  
     3  // Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
     4  
     5  package vmcompute
     6  
     7  import (
     8  	"syscall"
     9  	"unsafe"
    10  
    11  	"golang.org/x/sys/windows"
    12  )
    13  
    14  var _ unsafe.Pointer
    15  
    16  // Do the interface allocations only once for common
    17  // Errno values.
    18  const (
    19  	errnoERROR_IO_PENDING = 997
    20  )
    21  
    22  var (
    23  	errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
    24  	errERROR_EINVAL     error = syscall.EINVAL
    25  )
    26  
    27  // errnoErr returns common boxed Errno values, to prevent
    28  // allocations at runtime.
    29  func errnoErr(e syscall.Errno) error {
    30  	switch e {
    31  	case 0:
    32  		return errERROR_EINVAL
    33  	case errnoERROR_IO_PENDING:
    34  		return errERROR_IO_PENDING
    35  	}
    36  	// TODO: add more here, after collecting data on the common
    37  	// error values see on Windows. (perhaps when running
    38  	// all.bat?)
    39  	return e
    40  }
    41  
    42  var (
    43  	modvmcompute = windows.NewLazySystemDLL("vmcompute.dll")
    44  
    45  	procHcsCloseComputeSystem              = modvmcompute.NewProc("HcsCloseComputeSystem")
    46  	procHcsCloseProcess                    = modvmcompute.NewProc("HcsCloseProcess")
    47  	procHcsCreateComputeSystem             = modvmcompute.NewProc("HcsCreateComputeSystem")
    48  	procHcsCreateProcess                   = modvmcompute.NewProc("HcsCreateProcess")
    49  	procHcsEnumerateComputeSystems         = modvmcompute.NewProc("HcsEnumerateComputeSystems")
    50  	procHcsGetComputeSystemProperties      = modvmcompute.NewProc("HcsGetComputeSystemProperties")
    51  	procHcsGetProcessInfo                  = modvmcompute.NewProc("HcsGetProcessInfo")
    52  	procHcsGetProcessProperties            = modvmcompute.NewProc("HcsGetProcessProperties")
    53  	procHcsGetServiceProperties            = modvmcompute.NewProc("HcsGetServiceProperties")
    54  	procHcsModifyComputeSystem             = modvmcompute.NewProc("HcsModifyComputeSystem")
    55  	procHcsModifyProcess                   = modvmcompute.NewProc("HcsModifyProcess")
    56  	procHcsModifyServiceSettings           = modvmcompute.NewProc("HcsModifyServiceSettings")
    57  	procHcsOpenComputeSystem               = modvmcompute.NewProc("HcsOpenComputeSystem")
    58  	procHcsOpenProcess                     = modvmcompute.NewProc("HcsOpenProcess")
    59  	procHcsPauseComputeSystem              = modvmcompute.NewProc("HcsPauseComputeSystem")
    60  	procHcsRegisterComputeSystemCallback   = modvmcompute.NewProc("HcsRegisterComputeSystemCallback")
    61  	procHcsRegisterProcessCallback         = modvmcompute.NewProc("HcsRegisterProcessCallback")
    62  	procHcsResumeComputeSystem             = modvmcompute.NewProc("HcsResumeComputeSystem")
    63  	procHcsSaveComputeSystem               = modvmcompute.NewProc("HcsSaveComputeSystem")
    64  	procHcsShutdownComputeSystem           = modvmcompute.NewProc("HcsShutdownComputeSystem")
    65  	procHcsSignalProcess                   = modvmcompute.NewProc("HcsSignalProcess")
    66  	procHcsStartComputeSystem              = modvmcompute.NewProc("HcsStartComputeSystem")
    67  	procHcsTerminateComputeSystem          = modvmcompute.NewProc("HcsTerminateComputeSystem")
    68  	procHcsTerminateProcess                = modvmcompute.NewProc("HcsTerminateProcess")
    69  	procHcsUnregisterComputeSystemCallback = modvmcompute.NewProc("HcsUnregisterComputeSystemCallback")
    70  	procHcsUnregisterProcessCallback       = modvmcompute.NewProc("HcsUnregisterProcessCallback")
    71  )
    72  
    73  func hcsCloseComputeSystem(computeSystem HcsSystem) (hr error) {
    74  	hr = procHcsCloseComputeSystem.Find()
    75  	if hr != nil {
    76  		return
    77  	}
    78  	r0, _, _ := syscall.Syscall(procHcsCloseComputeSystem.Addr(), 1, uintptr(computeSystem), 0, 0)
    79  	if int32(r0) < 0 {
    80  		if r0&0x1fff0000 == 0x00070000 {
    81  			r0 &= 0xffff
    82  		}
    83  		hr = syscall.Errno(r0)
    84  	}
    85  	return
    86  }
    87  
    88  func hcsCloseProcess(process HcsProcess) (hr error) {
    89  	hr = procHcsCloseProcess.Find()
    90  	if hr != nil {
    91  		return
    92  	}
    93  	r0, _, _ := syscall.Syscall(procHcsCloseProcess.Addr(), 1, uintptr(process), 0, 0)
    94  	if int32(r0) < 0 {
    95  		if r0&0x1fff0000 == 0x00070000 {
    96  			r0 &= 0xffff
    97  		}
    98  		hr = syscall.Errno(r0)
    99  	}
   100  	return
   101  }
   102  
   103  func hcsCreateComputeSystem(id string, configuration string, identity syscall.Handle, computeSystem *HcsSystem, result **uint16) (hr error) {
   104  	var _p0 *uint16
   105  	_p0, hr = syscall.UTF16PtrFromString(id)
   106  	if hr != nil {
   107  		return
   108  	}
   109  	var _p1 *uint16
   110  	_p1, hr = syscall.UTF16PtrFromString(configuration)
   111  	if hr != nil {
   112  		return
   113  	}
   114  	return _hcsCreateComputeSystem(_p0, _p1, identity, computeSystem, result)
   115  }
   116  
   117  func _hcsCreateComputeSystem(id *uint16, configuration *uint16, identity syscall.Handle, computeSystem *HcsSystem, result **uint16) (hr error) {
   118  	hr = procHcsCreateComputeSystem.Find()
   119  	if hr != nil {
   120  		return
   121  	}
   122  	r0, _, _ := syscall.Syscall6(procHcsCreateComputeSystem.Addr(), 5, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(configuration)), uintptr(identity), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)), 0)
   123  	if int32(r0) < 0 {
   124  		if r0&0x1fff0000 == 0x00070000 {
   125  			r0 &= 0xffff
   126  		}
   127  		hr = syscall.Errno(r0)
   128  	}
   129  	return
   130  }
   131  
   132  func hcsCreateProcess(computeSystem HcsSystem, processParameters string, processInformation *HcsProcessInformation, process *HcsProcess, result **uint16) (hr error) {
   133  	var _p0 *uint16
   134  	_p0, hr = syscall.UTF16PtrFromString(processParameters)
   135  	if hr != nil {
   136  		return
   137  	}
   138  	return _hcsCreateProcess(computeSystem, _p0, processInformation, process, result)
   139  }
   140  
   141  func _hcsCreateProcess(computeSystem HcsSystem, processParameters *uint16, processInformation *HcsProcessInformation, process *HcsProcess, result **uint16) (hr error) {
   142  	hr = procHcsCreateProcess.Find()
   143  	if hr != nil {
   144  		return
   145  	}
   146  	r0, _, _ := syscall.Syscall6(procHcsCreateProcess.Addr(), 5, uintptr(computeSystem), uintptr(unsafe.Pointer(processParameters)), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)), 0)
   147  	if int32(r0) < 0 {
   148  		if r0&0x1fff0000 == 0x00070000 {
   149  			r0 &= 0xffff
   150  		}
   151  		hr = syscall.Errno(r0)
   152  	}
   153  	return
   154  }
   155  
   156  func hcsEnumerateComputeSystems(query string, computeSystems **uint16, result **uint16) (hr error) {
   157  	var _p0 *uint16
   158  	_p0, hr = syscall.UTF16PtrFromString(query)
   159  	if hr != nil {
   160  		return
   161  	}
   162  	return _hcsEnumerateComputeSystems(_p0, computeSystems, result)
   163  }
   164  
   165  func _hcsEnumerateComputeSystems(query *uint16, computeSystems **uint16, result **uint16) (hr error) {
   166  	hr = procHcsEnumerateComputeSystems.Find()
   167  	if hr != nil {
   168  		return
   169  	}
   170  	r0, _, _ := syscall.Syscall(procHcsEnumerateComputeSystems.Addr(), 3, uintptr(unsafe.Pointer(query)), uintptr(unsafe.Pointer(computeSystems)), uintptr(unsafe.Pointer(result)))
   171  	if int32(r0) < 0 {
   172  		if r0&0x1fff0000 == 0x00070000 {
   173  			r0 &= 0xffff
   174  		}
   175  		hr = syscall.Errno(r0)
   176  	}
   177  	return
   178  }
   179  
   180  func hcsGetComputeSystemProperties(computeSystem HcsSystem, propertyQuery string, properties **uint16, result **uint16) (hr error) {
   181  	var _p0 *uint16
   182  	_p0, hr = syscall.UTF16PtrFromString(propertyQuery)
   183  	if hr != nil {
   184  		return
   185  	}
   186  	return _hcsGetComputeSystemProperties(computeSystem, _p0, properties, result)
   187  }
   188  
   189  func _hcsGetComputeSystemProperties(computeSystem HcsSystem, propertyQuery *uint16, properties **uint16, result **uint16) (hr error) {
   190  	hr = procHcsGetComputeSystemProperties.Find()
   191  	if hr != nil {
   192  		return
   193  	}
   194  	r0, _, _ := syscall.Syscall6(procHcsGetComputeSystemProperties.Addr(), 4, uintptr(computeSystem), uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)), 0, 0)
   195  	if int32(r0) < 0 {
   196  		if r0&0x1fff0000 == 0x00070000 {
   197  			r0 &= 0xffff
   198  		}
   199  		hr = syscall.Errno(r0)
   200  	}
   201  	return
   202  }
   203  
   204  func hcsGetProcessInfo(process HcsProcess, processInformation *HcsProcessInformation, result **uint16) (hr error) {
   205  	hr = procHcsGetProcessInfo.Find()
   206  	if hr != nil {
   207  		return
   208  	}
   209  	r0, _, _ := syscall.Syscall(procHcsGetProcessInfo.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(processInformation)), uintptr(unsafe.Pointer(result)))
   210  	if int32(r0) < 0 {
   211  		if r0&0x1fff0000 == 0x00070000 {
   212  			r0 &= 0xffff
   213  		}
   214  		hr = syscall.Errno(r0)
   215  	}
   216  	return
   217  }
   218  
   219  func hcsGetProcessProperties(process HcsProcess, processProperties **uint16, result **uint16) (hr error) {
   220  	hr = procHcsGetProcessProperties.Find()
   221  	if hr != nil {
   222  		return
   223  	}
   224  	r0, _, _ := syscall.Syscall(procHcsGetProcessProperties.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(processProperties)), uintptr(unsafe.Pointer(result)))
   225  	if int32(r0) < 0 {
   226  		if r0&0x1fff0000 == 0x00070000 {
   227  			r0 &= 0xffff
   228  		}
   229  		hr = syscall.Errno(r0)
   230  	}
   231  	return
   232  }
   233  
   234  func hcsGetServiceProperties(propertyQuery string, properties **uint16, result **uint16) (hr error) {
   235  	var _p0 *uint16
   236  	_p0, hr = syscall.UTF16PtrFromString(propertyQuery)
   237  	if hr != nil {
   238  		return
   239  	}
   240  	return _hcsGetServiceProperties(_p0, properties, result)
   241  }
   242  
   243  func _hcsGetServiceProperties(propertyQuery *uint16, properties **uint16, result **uint16) (hr error) {
   244  	hr = procHcsGetServiceProperties.Find()
   245  	if hr != nil {
   246  		return
   247  	}
   248  	r0, _, _ := syscall.Syscall(procHcsGetServiceProperties.Addr(), 3, uintptr(unsafe.Pointer(propertyQuery)), uintptr(unsafe.Pointer(properties)), uintptr(unsafe.Pointer(result)))
   249  	if int32(r0) < 0 {
   250  		if r0&0x1fff0000 == 0x00070000 {
   251  			r0 &= 0xffff
   252  		}
   253  		hr = syscall.Errno(r0)
   254  	}
   255  	return
   256  }
   257  
   258  func hcsModifyComputeSystem(computeSystem HcsSystem, configuration string, result **uint16) (hr error) {
   259  	var _p0 *uint16
   260  	_p0, hr = syscall.UTF16PtrFromString(configuration)
   261  	if hr != nil {
   262  		return
   263  	}
   264  	return _hcsModifyComputeSystem(computeSystem, _p0, result)
   265  }
   266  
   267  func _hcsModifyComputeSystem(computeSystem HcsSystem, configuration *uint16, result **uint16) (hr error) {
   268  	hr = procHcsModifyComputeSystem.Find()
   269  	if hr != nil {
   270  		return
   271  	}
   272  	r0, _, _ := syscall.Syscall(procHcsModifyComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(configuration)), uintptr(unsafe.Pointer(result)))
   273  	if int32(r0) < 0 {
   274  		if r0&0x1fff0000 == 0x00070000 {
   275  			r0 &= 0xffff
   276  		}
   277  		hr = syscall.Errno(r0)
   278  	}
   279  	return
   280  }
   281  
   282  func hcsModifyProcess(process HcsProcess, settings string, result **uint16) (hr error) {
   283  	var _p0 *uint16
   284  	_p0, hr = syscall.UTF16PtrFromString(settings)
   285  	if hr != nil {
   286  		return
   287  	}
   288  	return _hcsModifyProcess(process, _p0, result)
   289  }
   290  
   291  func _hcsModifyProcess(process HcsProcess, settings *uint16, result **uint16) (hr error) {
   292  	hr = procHcsModifyProcess.Find()
   293  	if hr != nil {
   294  		return
   295  	}
   296  	r0, _, _ := syscall.Syscall(procHcsModifyProcess.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)))
   297  	if int32(r0) < 0 {
   298  		if r0&0x1fff0000 == 0x00070000 {
   299  			r0 &= 0xffff
   300  		}
   301  		hr = syscall.Errno(r0)
   302  	}
   303  	return
   304  }
   305  
   306  func hcsModifyServiceSettings(settings string, result **uint16) (hr error) {
   307  	var _p0 *uint16
   308  	_p0, hr = syscall.UTF16PtrFromString(settings)
   309  	if hr != nil {
   310  		return
   311  	}
   312  	return _hcsModifyServiceSettings(_p0, result)
   313  }
   314  
   315  func _hcsModifyServiceSettings(settings *uint16, result **uint16) (hr error) {
   316  	hr = procHcsModifyServiceSettings.Find()
   317  	if hr != nil {
   318  		return
   319  	}
   320  	r0, _, _ := syscall.Syscall(procHcsModifyServiceSettings.Addr(), 2, uintptr(unsafe.Pointer(settings)), uintptr(unsafe.Pointer(result)), 0)
   321  	if int32(r0) < 0 {
   322  		if r0&0x1fff0000 == 0x00070000 {
   323  			r0 &= 0xffff
   324  		}
   325  		hr = syscall.Errno(r0)
   326  	}
   327  	return
   328  }
   329  
   330  func hcsOpenComputeSystem(id string, computeSystem *HcsSystem, result **uint16) (hr error) {
   331  	var _p0 *uint16
   332  	_p0, hr = syscall.UTF16PtrFromString(id)
   333  	if hr != nil {
   334  		return
   335  	}
   336  	return _hcsOpenComputeSystem(_p0, computeSystem, result)
   337  }
   338  
   339  func _hcsOpenComputeSystem(id *uint16, computeSystem *HcsSystem, result **uint16) (hr error) {
   340  	hr = procHcsOpenComputeSystem.Find()
   341  	if hr != nil {
   342  		return
   343  	}
   344  	r0, _, _ := syscall.Syscall(procHcsOpenComputeSystem.Addr(), 3, uintptr(unsafe.Pointer(id)), uintptr(unsafe.Pointer(computeSystem)), uintptr(unsafe.Pointer(result)))
   345  	if int32(r0) < 0 {
   346  		if r0&0x1fff0000 == 0x00070000 {
   347  			r0 &= 0xffff
   348  		}
   349  		hr = syscall.Errno(r0)
   350  	}
   351  	return
   352  }
   353  
   354  func hcsOpenProcess(computeSystem HcsSystem, pid uint32, process *HcsProcess, result **uint16) (hr error) {
   355  	hr = procHcsOpenProcess.Find()
   356  	if hr != nil {
   357  		return
   358  	}
   359  	r0, _, _ := syscall.Syscall6(procHcsOpenProcess.Addr(), 4, uintptr(computeSystem), uintptr(pid), uintptr(unsafe.Pointer(process)), uintptr(unsafe.Pointer(result)), 0, 0)
   360  	if int32(r0) < 0 {
   361  		if r0&0x1fff0000 == 0x00070000 {
   362  			r0 &= 0xffff
   363  		}
   364  		hr = syscall.Errno(r0)
   365  	}
   366  	return
   367  }
   368  
   369  func hcsPauseComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   370  	var _p0 *uint16
   371  	_p0, hr = syscall.UTF16PtrFromString(options)
   372  	if hr != nil {
   373  		return
   374  	}
   375  	return _hcsPauseComputeSystem(computeSystem, _p0, result)
   376  }
   377  
   378  func _hcsPauseComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   379  	hr = procHcsPauseComputeSystem.Find()
   380  	if hr != nil {
   381  		return
   382  	}
   383  	r0, _, _ := syscall.Syscall(procHcsPauseComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   384  	if int32(r0) < 0 {
   385  		if r0&0x1fff0000 == 0x00070000 {
   386  			r0 &= 0xffff
   387  		}
   388  		hr = syscall.Errno(r0)
   389  	}
   390  	return
   391  }
   392  
   393  func hcsRegisterComputeSystemCallback(computeSystem HcsSystem, callback uintptr, context uintptr, callbackHandle *HcsCallback) (hr error) {
   394  	hr = procHcsRegisterComputeSystemCallback.Find()
   395  	if hr != nil {
   396  		return
   397  	}
   398  	r0, _, _ := syscall.Syscall6(procHcsRegisterComputeSystemCallback.Addr(), 4, uintptr(computeSystem), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)), 0, 0)
   399  	if int32(r0) < 0 {
   400  		if r0&0x1fff0000 == 0x00070000 {
   401  			r0 &= 0xffff
   402  		}
   403  		hr = syscall.Errno(r0)
   404  	}
   405  	return
   406  }
   407  
   408  func hcsRegisterProcessCallback(process HcsProcess, callback uintptr, context uintptr, callbackHandle *HcsCallback) (hr error) {
   409  	hr = procHcsRegisterProcessCallback.Find()
   410  	if hr != nil {
   411  		return
   412  	}
   413  	r0, _, _ := syscall.Syscall6(procHcsRegisterProcessCallback.Addr(), 4, uintptr(process), uintptr(callback), uintptr(context), uintptr(unsafe.Pointer(callbackHandle)), 0, 0)
   414  	if int32(r0) < 0 {
   415  		if r0&0x1fff0000 == 0x00070000 {
   416  			r0 &= 0xffff
   417  		}
   418  		hr = syscall.Errno(r0)
   419  	}
   420  	return
   421  }
   422  
   423  func hcsResumeComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   424  	var _p0 *uint16
   425  	_p0, hr = syscall.UTF16PtrFromString(options)
   426  	if hr != nil {
   427  		return
   428  	}
   429  	return _hcsResumeComputeSystem(computeSystem, _p0, result)
   430  }
   431  
   432  func _hcsResumeComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   433  	hr = procHcsResumeComputeSystem.Find()
   434  	if hr != nil {
   435  		return
   436  	}
   437  	r0, _, _ := syscall.Syscall(procHcsResumeComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   438  	if int32(r0) < 0 {
   439  		if r0&0x1fff0000 == 0x00070000 {
   440  			r0 &= 0xffff
   441  		}
   442  		hr = syscall.Errno(r0)
   443  	}
   444  	return
   445  }
   446  
   447  func hcsSaveComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   448  	var _p0 *uint16
   449  	_p0, hr = syscall.UTF16PtrFromString(options)
   450  	if hr != nil {
   451  		return
   452  	}
   453  	return _hcsSaveComputeSystem(computeSystem, _p0, result)
   454  }
   455  
   456  func _hcsSaveComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   457  	hr = procHcsSaveComputeSystem.Find()
   458  	if hr != nil {
   459  		return
   460  	}
   461  	r0, _, _ := syscall.Syscall(procHcsSaveComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   462  	if int32(r0) < 0 {
   463  		if r0&0x1fff0000 == 0x00070000 {
   464  			r0 &= 0xffff
   465  		}
   466  		hr = syscall.Errno(r0)
   467  	}
   468  	return
   469  }
   470  
   471  func hcsShutdownComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   472  	var _p0 *uint16
   473  	_p0, hr = syscall.UTF16PtrFromString(options)
   474  	if hr != nil {
   475  		return
   476  	}
   477  	return _hcsShutdownComputeSystem(computeSystem, _p0, result)
   478  }
   479  
   480  func _hcsShutdownComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   481  	hr = procHcsShutdownComputeSystem.Find()
   482  	if hr != nil {
   483  		return
   484  	}
   485  	r0, _, _ := syscall.Syscall(procHcsShutdownComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   486  	if int32(r0) < 0 {
   487  		if r0&0x1fff0000 == 0x00070000 {
   488  			r0 &= 0xffff
   489  		}
   490  		hr = syscall.Errno(r0)
   491  	}
   492  	return
   493  }
   494  
   495  func hcsSignalProcess(process HcsProcess, options string, result **uint16) (hr error) {
   496  	var _p0 *uint16
   497  	_p0, hr = syscall.UTF16PtrFromString(options)
   498  	if hr != nil {
   499  		return
   500  	}
   501  	return _hcsSignalProcess(process, _p0, result)
   502  }
   503  
   504  func _hcsSignalProcess(process HcsProcess, options *uint16, result **uint16) (hr error) {
   505  	hr = procHcsSignalProcess.Find()
   506  	if hr != nil {
   507  		return
   508  	}
   509  	r0, _, _ := syscall.Syscall(procHcsSignalProcess.Addr(), 3, uintptr(process), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   510  	if int32(r0) < 0 {
   511  		if r0&0x1fff0000 == 0x00070000 {
   512  			r0 &= 0xffff
   513  		}
   514  		hr = syscall.Errno(r0)
   515  	}
   516  	return
   517  }
   518  
   519  func hcsStartComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   520  	var _p0 *uint16
   521  	_p0, hr = syscall.UTF16PtrFromString(options)
   522  	if hr != nil {
   523  		return
   524  	}
   525  	return _hcsStartComputeSystem(computeSystem, _p0, result)
   526  }
   527  
   528  func _hcsStartComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   529  	hr = procHcsStartComputeSystem.Find()
   530  	if hr != nil {
   531  		return
   532  	}
   533  	r0, _, _ := syscall.Syscall(procHcsStartComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   534  	if int32(r0) < 0 {
   535  		if r0&0x1fff0000 == 0x00070000 {
   536  			r0 &= 0xffff
   537  		}
   538  		hr = syscall.Errno(r0)
   539  	}
   540  	return
   541  }
   542  
   543  func hcsTerminateComputeSystem(computeSystem HcsSystem, options string, result **uint16) (hr error) {
   544  	var _p0 *uint16
   545  	_p0, hr = syscall.UTF16PtrFromString(options)
   546  	if hr != nil {
   547  		return
   548  	}
   549  	return _hcsTerminateComputeSystem(computeSystem, _p0, result)
   550  }
   551  
   552  func _hcsTerminateComputeSystem(computeSystem HcsSystem, options *uint16, result **uint16) (hr error) {
   553  	hr = procHcsTerminateComputeSystem.Find()
   554  	if hr != nil {
   555  		return
   556  	}
   557  	r0, _, _ := syscall.Syscall(procHcsTerminateComputeSystem.Addr(), 3, uintptr(computeSystem), uintptr(unsafe.Pointer(options)), uintptr(unsafe.Pointer(result)))
   558  	if int32(r0) < 0 {
   559  		if r0&0x1fff0000 == 0x00070000 {
   560  			r0 &= 0xffff
   561  		}
   562  		hr = syscall.Errno(r0)
   563  	}
   564  	return
   565  }
   566  
   567  func hcsTerminateProcess(process HcsProcess, result **uint16) (hr error) {
   568  	hr = procHcsTerminateProcess.Find()
   569  	if hr != nil {
   570  		return
   571  	}
   572  	r0, _, _ := syscall.Syscall(procHcsTerminateProcess.Addr(), 2, uintptr(process), uintptr(unsafe.Pointer(result)), 0)
   573  	if int32(r0) < 0 {
   574  		if r0&0x1fff0000 == 0x00070000 {
   575  			r0 &= 0xffff
   576  		}
   577  		hr = syscall.Errno(r0)
   578  	}
   579  	return
   580  }
   581  
   582  func hcsUnregisterComputeSystemCallback(callbackHandle HcsCallback) (hr error) {
   583  	hr = procHcsUnregisterComputeSystemCallback.Find()
   584  	if hr != nil {
   585  		return
   586  	}
   587  	r0, _, _ := syscall.Syscall(procHcsUnregisterComputeSystemCallback.Addr(), 1, uintptr(callbackHandle), 0, 0)
   588  	if int32(r0) < 0 {
   589  		if r0&0x1fff0000 == 0x00070000 {
   590  			r0 &= 0xffff
   591  		}
   592  		hr = syscall.Errno(r0)
   593  	}
   594  	return
   595  }
   596  
   597  func hcsUnregisterProcessCallback(callbackHandle HcsCallback) (hr error) {
   598  	hr = procHcsUnregisterProcessCallback.Find()
   599  	if hr != nil {
   600  		return
   601  	}
   602  	r0, _, _ := syscall.Syscall(procHcsUnregisterProcessCallback.Addr(), 1, uintptr(callbackHandle), 0, 0)
   603  	if int32(r0) < 0 {
   604  		if r0&0x1fff0000 == 0x00070000 {
   605  			r0 &= 0xffff
   606  		}
   607  		hr = syscall.Errno(r0)
   608  	}
   609  	return
   610  }
   611  

View as plain text