forked from hnakamur/w32uiautomation
-
Notifications
You must be signed in to change notification settings - Fork 1
/
iuiautomationelement2.go
59 lines (45 loc) · 1.55 KB
/
iuiautomationelement2.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package w32uiautomation
import (
"syscall"
"unsafe"
"github.com/go-ole/go-ole"
"github.com/gonutz/w32/v2"
)
type IUIAutomationElement2 struct {
IUIAutomationElement
}
type IUIAutomationElement2Vtbl struct {
IUIAutomationElementVtbl
Get_CachedFlowsFrom uintptr
Get_CachedLiveSetting uintptr
Get_CachedOptimizeForVisualContent uintptr
Get_CurrentFlowsFrom uintptr
Get_CurrentLiveSetting uintptr
Get_CurrentOptimizeForVisualContent uintptr
}
// IID为6749c683-f70d-4487-a698-5f79d55290d6
var IID_IUIAutomationElement2 = ole.NewGUID("6749c683-f70d-4487-a698-5f79d55290d6")
func (elem2 *IUIAutomationElement2) VTable() *IUIAutomationElement2Vtbl {
return (*IUIAutomationElement2Vtbl)(unsafe.Pointer(elem2.RawVTable))
}
func (elem2 *IUIAutomationElement2) GetCachedFlowsFrom() (elemArray *IUIAutomationElementArray, err error) {
return getCachedFlowsFrom(elem2)
}
func (elem2 *IUIAutomationElement2) GetCachedLiveSetting() {
}
func getCachedLiveSetting(elem2 *IUIAutomationElement2) {
}
func (elem2 *IUIAutomationElement2) GetCachedOptimizeForVisualContent() (b w32.BOOL, err error) {
return 0, nil
}
func getCachedOptimizeForVisualContent(elem2 *IUIAutomationElement2) (b w32.BOOL, err error) {
return 0, nil
}
func getCachedFlowsFrom(elem2 *IUIAutomationElement2) (elemArray *IUIAutomationElementArray, err error) {
hr, _, _ := syscall.SyscallN(elem2.VTable().Get_CachedFlowsFrom, uintptr(unsafe.Pointer(elem2)),
uintptr(unsafe.Pointer(&elemArray)))
if hr != 0 {
err = ole.NewError(hr)
}
return
}