启动快捷键监听 - StartHotkeyHook
函数简介
启动全局键盘鼠标钩子,注册快捷键前需先调用此接口。
接口名称
StartHotkeyHook
DLL调用
int StartHotkeyHook(long ola);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
示例
C++
long instance = CreateCOLAPlugInterFace();
// 启动全局键盘鼠标钩子
int ret = StartHotkeyHook(instance);
// ret == 1 表示成功,之后可注册快捷键
// ... 注册快捷键 ...
// 使用完毕后停止监听
StopHotkeyHook(instance);
Python
# 待补充
返回值
整数型。1 成功,0 失败。
