Files
wow/ddl/chm_output/standard_fun/HKMSetDevDescInfo.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

71 lines
3.7 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>HKMSetDevDescInfo</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">HKMSetDevDescInfo 设置设备描述信息</td>
</tr>
<tr>
<th>功能</th>
<td>设置无涯键鼠盒子的设备描述信息。这个函数设置无涯键鼠盒子的USB接口信息后<a href="HKMSetResetTime.html"></a>,由于设备信息改变,系统会重新识别设备和自动安装驱动,需要等待几分钟或更长时间才能正常使用,这个过程中不要拔出盒子,否则会导致系统安装驱动失败。修改后需要关闭设备,等待系统安装驱动完成后再查找和打开设备,否则有些功能会受到影响,无法正常工作。无涯键鼠盒子基础版二代的固件版本大于等于1.2.0才支持此函数。</td>
</tr>
<tr>
<th>参数</th>
<td class="canshu">参数1 设备对象:无类型指针。使用<a href="HKMOpen.html">HKMOpen</a>可以创建它。<br />
参数2 VID:无符号32位整形数。USB接口的制造商ID。可设置值的范围0-65535。值为65536时不修改无涯键鼠盒子VID值。<br />
参数3 PID:无符号32位整形数。USB接口的产品ID。可设置值的范围0-65535。值为65536时不修改无涯键鼠盒子PID值。<br />
参数4 版本:无符号32位整形数。USB接口的设备版本。可设置值的范围0-65535。值为65536时不修改无涯键鼠盒子版本值。<br />
参数5 制造商名:字符串(Unicode/Ansi)或者无符号32/64位整型数(32位模块中是32位整型数,64位模块中是64位整型数)。USB接口的制造商名。设置制造商名是字符串(默认是Unicode字符串,可以通过HKMSetMode修改为Ansi字符串)。不修改制造商名时使用无符号32/64位整型数,值为1。<br />
参数6 产品名:字符串(Unicode/Ansi)或者无符号32/64位整型数(32位模块中是32位整型数,64位模块中是64位整型数)。USB接口的产品名。设置产品名是字符串(默认是Unicode字符串,可以通过HKMSetMode修改为Ansi字符串)。不修改产品名时使用无符号32/64位整型数,值为1。 <br />
参数7 模式:无符号32位整形数。可取值如下:<br />
<table width="245" border="1" cellpadding="0" cellspacing="0">
<tr>
<th width="34" scope="col"><span class="thf">值</span></th>
<th width="205" scope="col"><span class="thf">说明</span></th>
</tr>
<tr>
<td>0</td>
<td>取消临时设置。</td>
</tr>
<tr>
<td>1</td>
<td>临时设置,断电(USB接口停电或拔出无涯键鼠盒子)后恢复。</td>
</tr>
<tr>
<td>2</td>
<td>永久设置,断电后不会恢复,但有设置次数限制,不断电只能设置5次。</td>
</tr>
</table>
参数8 是否鼠标:布尔值。取FALSE时,自动设置设备描述信息,如果同时有键盘模式或者鼠标模式的设备,设置键盘模式的设备的设备描述信息。取TRUE时,自动设置设备描述信息,如果同时有键盘模式或者鼠标模式的设备,设置鼠标模式的设备的设备描述信息。</td>
</tr>
<tr>
<th>返回值</th>
<td class="fanhui">布尔值。成功返回TRUE,失败返回FALSE。</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 />
<span class="note">//修改设备描述信息,PID和制造商名不修改</span><br />
HKMSetDevDescInfo(lpDev,0x1235,0x10000,0x0101,(LPCWSTR)1,L&quot;Mouse&quot;,1,FALSE);<br />
HKMClose(lpDev);</td>
</tr>
</table>
</body>
</html>