first commit

This commit is contained in:
2025-08-22 17:42:23 -04:00
commit a6c09a5890
120 changed files with 11443 additions and 0 deletions

View File

@ -0,0 +1,82 @@
// 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 SignatureGattLocalCharacteristicResult string = "rc(Windows.Devices.Bluetooth.GenericAttributeProfile.GattLocalCharacteristicResult;{7975de9b-0170-4397-9666-92f863f12ee6})"
type GattLocalCharacteristicResult struct {
ole.IUnknown
}
func (impl *GattLocalCharacteristicResult) GetCharacteristic() (*GattLocalCharacteristic, error) {
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattLocalCharacteristicResult))
defer itf.Release()
v := (*iGattLocalCharacteristicResult)(unsafe.Pointer(itf))
return v.GetCharacteristic()
}
func (impl *GattLocalCharacteristicResult) GetError() (bluetooth.BluetoothError, error) {
itf := impl.MustQueryInterface(ole.NewGUID(GUIDiGattLocalCharacteristicResult))
defer itf.Release()
v := (*iGattLocalCharacteristicResult)(unsafe.Pointer(itf))
return v.GetError()
}
const GUIDiGattLocalCharacteristicResult string = "7975de9b-0170-4397-9666-92f863f12ee6"
const SignatureiGattLocalCharacteristicResult string = "{7975de9b-0170-4397-9666-92f863f12ee6}"
type iGattLocalCharacteristicResult struct {
ole.IInspectable
}
type iGattLocalCharacteristicResultVtbl struct {
ole.IInspectableVtbl
GetCharacteristic uintptr
GetError uintptr
}
func (v *iGattLocalCharacteristicResult) VTable() *iGattLocalCharacteristicResultVtbl {
return (*iGattLocalCharacteristicResultVtbl)(unsafe.Pointer(v.RawVTable))
}
func (v *iGattLocalCharacteristicResult) GetCharacteristic() (*GattLocalCharacteristic, error) {
var out *GattLocalCharacteristic
hr, _, _ := syscall.SyscallN(
v.VTable().GetCharacteristic,
uintptr(unsafe.Pointer(v)), // this
uintptr(unsafe.Pointer(&out)), // out GattLocalCharacteristic
)
if hr != 0 {
return nil, ole.NewError(hr)
}
return out, nil
}
func (v *iGattLocalCharacteristicResult) 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
}