Files
go-winrt/windows/devices/bluetooth/genericattributeprofile/gattserviceproviderresult.go
2025-08-22 17:42:23 -04:00

83 lines
2.2 KiB
Go

// Code generated by winrt-go-gen. DO NOT EDIT.
//go:build windows
//nolint:all
package genericattributeprofile
import (
"syscall"
"unsafe"
"github.com/go-ole/go-ole"
"github.com/saltosystems/winrt-go/windows/devices/bluetooth"
)
const SignatureGattServiceProviderResult string = "rc(Windows.Devices.Bluetooth.GenericAttributeProfile.GattServiceProviderResult;{764696d8-c53e-428c-8a48-67afe02c3ae6})"
type GattServiceProviderResult struct {
ole.IUnknown
}
func (impl *GattServiceProviderResult) GetError() (bluetooth.BluetoothError, error) {
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattServiceProviderResult))
defer itf.Release()
v := (*iGattServiceProviderResult)(unsafe.Pointer(itf))
return v.GetError()
}
func (impl *GattServiceProviderResult) GetServiceProvider() (*GattServiceProvider, error) {
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattServiceProviderResult))
defer itf.Release()
v := (*iGattServiceProviderResult)(unsafe.Pointer(itf))
return v.GetServiceProvider()
}
const GUIDiGattServiceProviderResult string = "764696d8-c53e-428c-8a48-67afe02c3ae6"
const SignatureiGattServiceProviderResult string = "{764696d8-c53e-428c-8a48-67afe02c3ae6}"
type iGattServiceProviderResult struct {
ole.IInspectable
}
type iGattServiceProviderResultVtbl struct {
ole.IInspectableVtbl
GetError uintptr
GetServiceProvider uintptr
}
func (v *iGattServiceProviderResult) VTable() *iGattServiceProviderResultVtbl {
return (*iGattServiceProviderResultVtbl)(unsafe.Pointer(v.RawVTable))
}
func (v *iGattServiceProviderResult) GetError() (bluetooth.BluetoothError, error) {
var out bluetooth.BluetoothError
hr, _, _ := syscall.SyscallN(
v.VTable().GetError,
uintptr(unsafe.Pointer(v)), // this
uintptr(unsafe.Pointer(&out)), // out bluetooth.BluetoothError
)
if hr != 0 {
return bluetooth.BluetoothErrorSuccess, ole.NewError(hr)
}
return out, nil
}
func (v *iGattServiceProviderResult) GetServiceProvider() (*GattServiceProvider, error) {
var out *GattServiceProvider
hr, _, _ := syscall.SyscallN(
v.VTable().GetServiceProvider,
uintptr(unsafe.Pointer(v)), // this
uintptr(unsafe.Pointer(&out)), // out GattServiceProvider
)
if hr != 0 {
return nil, ole.NewError(hr)
}
return out, nil
}