commit 86718a85e07ed7bf1e2a316289f7c4a66988e4b1
parent e7c0faf5a3c06a5ac746f6ee5b2931f89caf281e
Author: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Date: Fri, 17 Mar 2023 15:32:52 +0800
bind: explain cookie out param
Used for later revocation which we never do.
Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com>
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/internal/bind/procs.go b/internal/bind/procs.go
@@ -47,6 +47,9 @@ func free(object unsafe.Pointer) {
// registerClassFactory teaches the Windows Runtime about our factory that can allocate
// instances of our ActivationCallback.
func registerClassFactory(factory *IClassFactory) error {
+ // cookie is used as a handle to this class. It is used when calling CoRevokeClassObject
+ // which unregisters the class. We don't need it until we plan to revoke this registration
+ // for some reason.
var cookie int64
hr, _, _ := procRegisterClassObject.Call(
uintptr(unsafe.Pointer(GUID_ImplNotificationActivationCallback)),