mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2024-11-15 19:22:53 +08:00
chore: corrected the incoming parameters of PowerUnregisterSuspendResumeNotification
Some checks failed
Trigger CMFA Update / trigger-CMFA-update (push) Has been cancelled
Some checks failed
Trigger CMFA Update / trigger-CMFA-update (push) Has been cancelled
This commit is contained in:
parent
4f339265d3
commit
951cae2156
|
@ -55,6 +55,11 @@ func NewEventListener(cb func(Type)) (func(), error) {
|
|||
}
|
||||
handle := uintptr(0)
|
||||
|
||||
// DWORD PowerRegisterSuspendResumeNotification(
|
||||
// [in] DWORD Flags,
|
||||
// [in] HANDLE Recipient,
|
||||
// [out] PHPOWERNOTIFY RegistrationHandle
|
||||
//);
|
||||
_, _, err := powerRegisterSuspendResumeNotification.Call(
|
||||
_DEVICE_NOTIFY_CALLBACK,
|
||||
uintptr(unsafe.Pointer(¶ms)),
|
||||
|
@ -65,8 +70,11 @@ func NewEventListener(cb func(Type)) (func(), error) {
|
|||
}
|
||||
|
||||
return func() {
|
||||
// DWORD PowerUnregisterSuspendResumeNotification(
|
||||
// [in, out] HPOWERNOTIFY RegistrationHandle
|
||||
//);
|
||||
_, _, _ = powerUnregisterSuspendResumeNotification.Call(
|
||||
uintptr(unsafe.Pointer(&handle)),
|
||||
handle,
|
||||
)
|
||||
runtime.KeepAlive(params)
|
||||
runtime.KeepAlive(handle)
|
||||
|
|
Loading…
Reference in New Issue
Block a user