Files
wow/ddl/chm_output/standard_fun/HKMGetError.html
王鹏 33dc741fd9 add 硬件控制模块 (hardware_control.py) 并修复游戏状态扫描区域宽度
- 新增 wyhkm.dll 硬件盒子 COM 接口封装,支持键盘鼠标控制
- 修复 game_state_config.json 中 scan_region_width 过小导致截图越界的问题
- 添加鼠标路径录制器、硬件测试脚本等工具
- 更新多项配置默认值

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 12:15:00 +08:00

131 lines
4.0 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>HKMGetError</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">HKMGetError 获得错误代码</td>
</tr>
<tr>
<th>功能</th>
<td>获得错误代码。如果要获得错误代码在设备对象有关函数执行后立刻执行该函数,执行其它设备对象有关函数会覆盖之前的值。</td>
</tr>
<tr>
<th>参数</th>
<td class="canshu">参数1 设备对象无类型指针。使用<a href="HKMOpen.html">HKMOpen</a>可以创建它。</td>
</tr>
<tr>
<th>返回值</th>
<td class="fanhui">无符号32位整型数。低16位是错误代码高16位是错误编号。错误代码中0是成功低于57344是系统错误代码与系统API&ldquo;GetLastError&rdquo;获得的值相同具体值的解释可以在微软网站查看高于或等于57344的错误代码如下<br />
<table width="370" border="1" cellpadding="0" cellspacing="0">
<tr>
<th width="80" scope="col"><span class="thf"></span></th>
<th width="100" scope="col"><span class="thf">说明</span></th>
<th width="80" scope="col"><span class="thf"></span></th>
<th width="100" scope="col"><span class="thf">说明</span></th>
</tr>
<tr>
<td>0000(0)</td>
<td>成功</td>
<td>E020(57376)</td>
<td>打开设备失败</td>
</tr>
<tr>
<td>E001(57345)</td>
<td>失败</td>
<td>E021(57377)</td>
<td>通信失败</td>
</tr>
<tr>
<td>E002(57346)</td>
<td>无效的参数</td>
<td>E022(57378)</td>
<td>无访问权限</td>
</tr>
<tr>
<td>E003(57347)</td>
<td>无效的指针</td>
<td>E023(57379)</td>
<td>超时</td>
</tr>
<tr>
<td>E004(57348)</td>
<td>无效的对象</td>
<td>E024(57380)</td>
<td>运行应用失败</td>
</tr>
<tr>
<td>E005(57349)</td>
<td>无效的初始化值</td>
<td>E025(57381)</td>
<td>超出限制</td>
</tr>
<tr>
<td>E006(57350)</td>
<td>无效的数据</td>
<td>E026(57382)</td>
<td>获取DPI信息失败</td>
</tr>
<tr>
<td>E007(57351)</td>
<td>数据太大</td>
<td>E027(57383)</td>
<td>获取数据失败</td>
</tr>
<tr>
<td>E008(57352)</td>
<td>字符串太长</td>
<td>E028(57384)</td>
<td>设备失败</td>
</tr>
<tr>
<td>E009(57353)</td>
<td>数据区域太小</td>
<td>E029(57385)</td>
<td>设备超时</td>
</tr>
<tr>
<td>E00A(57354)</td>
<td>不支持</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>E00B(57355)</td>
<td>对象已存在</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>E00C(57356)</td>
<td>系统错误</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table></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 /> &nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;未找到无涯键鼠盒子\n&quot;);<br /> &nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}<br />
lpDev=HKMOpen(dwDevId,0);<br />
if(lpDev==NULL)<br />
{<br />
&nbsp;&nbsp;&nbsp;&nbsp;printf(&quot;打开无涯键鼠盒子失败\n&quot;);<br />
&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br />
}<br />
printf(&quot;错误代码:%04X\n&quot;,HKMGetError(lpDev) &amp; 0xFFFF);<br />
HKMClose(lpDev);</td>
</tr>
</table>
</body>
</html>