- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制 - 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题 - 添加鼠标路径录制器、硬件测试脚本等工具 - 更新多项配置默认值 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
89 lines
3.1 KiB
HTML
89 lines
3.1 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
|
||
<title>HKMGetDevInfo</title>
|
||
<link rel="stylesheet" type="text/css" href="css/help.css">
|
||
</head>
|
||
<body>
|
||
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="ts">
|
||
<tr>
|
||
<th width="50">名称</th>
|
||
<td class="name">HKMGetDevInfo 获得设备信息</td>
|
||
</tr>
|
||
<tr>
|
||
<th>功能</th>
|
||
<td>获得无涯键鼠盒子的设备信息。无涯键鼠盒子基础版一代不支持此函数。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>参数</th>
|
||
<td class="canshu">参数1 设备对象:无类型指针。使用<a href="HKMOpen.html">HKMOpen</a>可以创建它。<br />
|
||
参数2 序号:无符号32位整型数。需要获取的信息的序号。可取值如下:<br />
|
||
<table width="395" border="1" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<th width="39" scope="col"><span class="thf">序号</span></th>
|
||
<th width="342" scope="col"><span class="thf">说明</span></th>
|
||
</tr>
|
||
<tr>
|
||
<td>1</td>
|
||
<td>设备类型。无涯键鼠盒子基础版一代返回1,无涯键鼠盒子基础版二代返回2。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>2</td>
|
||
<td>固件版本。返回值中,0-15位是修订号,16-23位是副版本号,24-31位是主版本号。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>3</td>
|
||
<td>运行时间。返回值是从通电或者复位开始运行的毫秒数,断电和复位都会归零。系统休眠时不计时。这个时间精度不高,有误差。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>4</td>
|
||
<td>通电时间。返回值是从通电开始运行的毫秒数,断电会归零,复位不会归零。系统休眠时不计时。这个时间精度不高,有误差。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>6</td>
|
||
<td>复位次数。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>7</td>
|
||
<td>运行状态。设备未连接返回0xFFFFFFFF,设备准备中返回0,正常工作状态返回1,编辑状态返回2,禁止操作状态返回3。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>8</td>
|
||
<td>USB设备接口的VID值。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>9</td>
|
||
<td>USB设备接口的PID值。</td>
|
||
</tr>
|
||
<tr>
|
||
<td>10</td>
|
||
<td>USB设备接口的设备版本值。</td>
|
||
</tr>
|
||
</table>
|
||
参数3 是否鼠标:布尔值。取FALSE时,自动获得设备信息,如果同时有键盘模式或者鼠标模式的设备,获得键盘模式的设备信息。取TRUE时,自动获得设备信息,如果同时有键盘模式或者鼠标模式的设备,获得鼠标模式的设备信息。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>返回值</th>
|
||
<td class="fanhui"><span class="canshu">无符号32位整型数</span>。返回值由参数2决定。</td>
|
||
</tr>
|
||
<tr>
|
||
<th>C语言<br />例子</th>
|
||
<td class="lizi">DWORD dwDevId;<br />
|
||
LPVOID lpDev;<br />
|
||
dwDevId=HKMSearchDevice(0x1234,0xABCD,0);<br />
|
||
if(dwDevId==0xFFFFFFFF)<br />
|
||
{<br /> printf("未找到无涯键鼠盒子\n");<br /> return 0;<br />
|
||
}<br />
|
||
lpDev=HKMOpen(dwDevId,0);<br />
|
||
if(lpDev==NULL)<br />
|
||
{<br />
|
||
printf("打开无涯键鼠盒子失败\n");<br />
|
||
return 0;<br />
|
||
}<br />
|
||
printf("无涯键鼠盒子固件版本号:%08X\n",HKMGetDevInfo(lpDev,2,FALSE));<br />
|
||
HKMClose(lpDev);</td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html> |