mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-05-12 21:18:03 +08:00
chore: corrected the incoming parameters of PowerUnregisterSuspendResumeNotification
This commit is contained in:
parent
4f339265d3
commit
951cae2156
@ -55,6 +55,11 @@ func NewEventListener(cb func(Type)) (func(), error) {
|
|||||||
}
|
}
|
||||||
handle := uintptr(0)
|
handle := uintptr(0)
|
||||||
|
|
||||||
|
// DWORD PowerRegisterSuspendResumeNotification(
|
||||||
|
// [in] DWORD Flags,
|
||||||
|
// [in] HANDLE Recipient,
|
||||||
|
// [out] PHPOWERNOTIFY RegistrationHandle
|
||||||
|
//);
|
||||||
_, _, err := powerRegisterSuspendResumeNotification.Call(
|
_, _, err := powerRegisterSuspendResumeNotification.Call(
|
||||||
_DEVICE_NOTIFY_CALLBACK,
|
_DEVICE_NOTIFY_CALLBACK,
|
||||||
uintptr(unsafe.Pointer(¶ms)),
|
uintptr(unsafe.Pointer(¶ms)),
|
||||||
@ -65,8 +70,11 @@ func NewEventListener(cb func(Type)) (func(), error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return func() {
|
return func() {
|
||||||
|
// DWORD PowerUnregisterSuspendResumeNotification(
|
||||||
|
// [in, out] HPOWERNOTIFY RegistrationHandle
|
||||||
|
//);
|
||||||
_, _, _ = powerUnregisterSuspendResumeNotification.Call(
|
_, _, _ = powerUnregisterSuspendResumeNotification.Call(
|
||||||
uintptr(unsafe.Pointer(&handle)),
|
handle,
|
||||||
)
|
)
|
||||||
runtime.KeepAlive(params)
|
runtime.KeepAlive(params)
|
||||||
runtime.KeepAlive(handle)
|
runtime.KeepAlive(handle)
|
||||||
|
Loading…
Reference in New Issue
Block a user