-
Notifications
You must be signed in to change notification settings - Fork 44
/
other.go
80 lines (67 loc) · 2.57 KB
/
other.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
// 其他
// 大漠保护盾
package dmsoft
// DmGuard Type取值请查看大漠文档
func (com *Dmsoft) DmGuard(enable int, types string) int {
ret, _ := com.dm.CallMethod("DmGuard", enable, types)
return int(ret.Val)
}
// DmGuardExtract 释放插件用的驱动. 可以自己拿去签名. 防止有人对我的签名进行检测.
// 强烈推荐使用驱动的用户使用. 仅释放64位系统的驱动.
func (com *Dmsoft) DmGuardExtract(types, path string) int {
ret, _ := com.dm.CallMethod("DmGuardExtract", types, path)
return int(ret.Val)
}
// 加载用DmGuardExtract释放出的驱动. 建议自己签名后,然后找个自己喜欢的路径加载. 仅支持64位系统的驱动加载.
// 加载成功后,就可以正常调用DmGuard了.
func (com *Dmsoft) DmGuardLoadCustom(types, path string) int {
ret, _ := com.dm.CallMethod("DmGuardLoadCustom", types, path)
return int(ret.Val)
}
// DmGuardParams DmGuard的加强接口,用于获取一些额外信息.具体信息请查看大漠文档
func (com *Dmsoft) DmGuardParams(cmd, subcmd, param string) string {
ret, _ := com.dm.CallMethod("DmGuardParams", cmd, subcmd, param)
return ret.ToString()
}
// UnLoadDriver 卸载插件相关的所有驱动. 仅对64位系统的驱动生效
// 注 : 此接口一般不建议使用. 除非你真的知道自己在干什么.
func (com *Dmsoft) UnLoadDriver() int {
ret, _ := com.dm.CallMethod("UnLoadDriver")
return int(ret.Val)
}
func (com *Dmsoft) ActiveInputMethod(hwnd int, input_method int) int {
ret, _ := com.dm.CallMethod("ActiveInputMethod", hwnd, input_method)
return int(ret.Val)
}
func (com *Dmsoft) CheckInputMethod(hwnd int, input_method int) int {
ret, _ := com.dm.CallMethod("CheckInputMethod", hwnd, input_method)
return int(ret.Val)
}
func (com *Dmsoft) EnterCri() int {
ret, _ := com.dm.CallMethod("EnterCri")
return int(ret.Val)
}
func (com *Dmsoft) ExecuteCmd(cmd string, current_dir string, time_out int) string {
ret, _ := com.dm.CallMethod("ExecuteCmd", cmd, current_dir, time_out)
return ret.ToString()
}
func (com *Dmsoft) FindInputMethod(input_method int) int {
ret, _ := com.dm.CallMethod("FindInputMethod", input_method)
return int(ret.Val)
}
func (com *Dmsoft) InitCri() int {
ret, _ := com.dm.CallMethod("InitCri")
return int(ret.Val)
}
func (com *Dmsoft) LeaveCri() int {
ret, _ := com.dm.CallMethod("LeaveCri")
return int(ret.Val)
}
func (com *Dmsoft) ReleaseRef() int {
ret, _ := com.dm.CallMethod("ReleaseRef")
return int(ret.Val)
}
func (com *Dmsoft) SetExitThread(enable int) int {
ret, _ := com.dm.CallMethod("SetExitThread", enable)
return int(ret.Val)
}