github.com/secoba/wails/v2@v2.6.4/internal/frontend/desktop/windows/winc/w32/istream.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 import ( 10 "unsafe" 11 ) 12 13 type pIStreamVtbl struct { 14 pQueryInterface uintptr 15 pAddRef uintptr 16 pRelease uintptr 17 } 18 19 type IStream struct { 20 lpVtbl *pIStreamVtbl 21 } 22 23 func (this *IStream) QueryInterface(id *GUID) *IDispatch { 24 return ComQueryInterface((*IUnknown)(unsafe.Pointer(this)), id) 25 } 26 27 func (this *IStream) AddRef() int32 { 28 return ComAddRef((*IUnknown)(unsafe.Pointer(this))) 29 } 30 31 func (this *IStream) Release() int32 { 32 return ComRelease((*IUnknown)(unsafe.Pointer(this))) 33 }