github.com/secoba/wails/v2@v2.6.4/internal/frontend/desktop/windows/winc/w32/iunknown.go (about)

     1  //go:build windows
     2  
     3  /*
     4   * Copyright (C) 2019 Tad Vizbaras. All Rights Reserved.
     5   * Copyright (C) 2010-2012 The W32 Authors. All Rights Reserved.
     6   */
     7  package w32
     8  
     9  type pIUnknownVtbl struct {
    10  	pQueryInterface uintptr
    11  	pAddRef         uintptr
    12  	pRelease        uintptr
    13  }
    14  
    15  type IUnknown struct {
    16  	lpVtbl *pIUnknownVtbl
    17  }
    18  
    19  func (this *IUnknown) QueryInterface(id *GUID) *IDispatch {
    20  	return ComQueryInterface(this, id)
    21  }
    22  
    23  func (this *IUnknown) AddRef() int32 {
    24  	return ComAddRef(this)
    25  }
    26  
    27  func (this *IUnknown) Release() int32 {
    28  	return ComRelease(this)
    29  }