-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbase.go
84 lines (67 loc) · 2.15 KB
/
base.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
package gdm
import "github.com/rogeecn/gdm/utils"
func (com *DmSoft) EnablePicCache(enable int) bool {
ret, _ := com.dm.CallMethod("EnablePicCache", enable)
return utils.IsOK(ret.Val)
}
func (com *DmSoft) GetBasePath() string {
ret, _ := com.dm.CallMethod("GetBasePath")
return ret.ToString()
}
func (com *DmSoft) GetDmCount() int {
ret, _ := com.dm.CallMethod("GetDmCount")
return int(ret.Val)
}
func (com *DmSoft) GetID() int {
ret, _ := com.dm.CallMethod("GetID")
return int(ret.Val)
}
func (com *DmSoft) GetLastError() error {
ret, _ := com.dm.CallMethod("GetLastError")
return utils.ErrorMap[int(ret.Val)]
}
func (com *DmSoft) GetPath() string {
ret, _ := com.dm.CallMethod("GetPath")
return ret.ToString()
}
func (com *DmSoft) Reg(regCode string, verInfo string) error {
ret, _ := com.dm.CallMethod("Reg", regCode, verInfo)
return utils.RegErrorMap[int(ret.Val)]
}
func (com *DmSoft) RegEx(regCode, verInfo, ip string) error {
ret, _ := com.dm.CallMethod("RegEx", regCode, verInfo, ip)
return utils.RegErrorMap[int(ret.Val)]
}
func (com *DmSoft) RegExNoMac(regCode, verInfo, ip string) error {
ret, _ := com.dm.CallMethod("RegExNoMac", regCode, verInfo, ip)
return utils.RegErrorMap[int(ret.Val)]
}
func (com *DmSoft) RegNoMac(regCode, verInfo string) error {
ret, _ := com.dm.CallMethod("RegNoMac", regCode, verInfo)
return utils.RegErrorMap[int(ret.Val)]
}
func (com *DmSoft) SetDisplayInput(mode string) bool {
ret, _ := com.dm.CallMethod("SetDisplayInput", mode)
return utils.IsOK(ret.Val)
}
func (com *DmSoft) SetEnumWindowDelay(delay int) bool {
ret, _ := com.dm.CallMethod("SetEnumWindowDelay", delay)
return utils.IsOK(ret.Val)
}
func (com *DmSoft) SetPath(path string) bool {
ret, _ := com.dm.CallMethod("SetPath", path)
return utils.IsOK(ret.Val)
}
func (com *DmSoft) SetShowErrorMsg(show int) bool {
ret, _ := com.dm.CallMethod("SetShowErrorMsg", show)
return utils.IsOK(ret.Val)
}
func (com *DmSoft) SpeedNormalGraphic(enable int) bool {
ret, _ := com.dm.CallMethod("SpeedNormalGraphic", enable)
return utils.IsOK(ret.Val)
}
// Ver get version
func (com *DmSoft) Ver() string {
ver, _ := com.dm.CallMethod("Ver")
return ver.ToString()
}