Metadata-Version: 2.4
Name: vools-dll32
Version: 0.7.5
Summary: vools 32-bit DLL / COM / Python 互操作子包
Author-email: Victor <victortop921129@gmail.com>
License: Apache License
                                   Version 2.0, January 2004
                                http://www.apache.org/licenses/
        
           TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
        
           1. Definitions.
        
              "License" shall mean the terms and conditions for use, reproduction,
              and distribution as defined by Sections 1 through 9 of this document.
        
              "Licensor" shall mean the copyright owner or entity authorized by
              the copyright owner that is granting the License.
        
              "Legal Entity" shall mean the union of the acting entity and all
              other entities that control, are controlled by, or are under common
              control with that entity. For the purposes of this definition,
              "control" means (i) the power, direct or indirect, to cause the
              direction or management of such entity, whether by contract or
              otherwise, or (ii) ownership of fifty percent (50%) or more of the
              outstanding shares, or (iii) beneficial ownership of such entity.
        
              "You" (or "Your") shall mean an individual or Legal Entity
              exercising permissions granted by this License.
        
              "Source" form shall mean the preferred form for making modifications,
              including but not limited to software source code, documentation
              source, and configuration files.
        
              "Object" form shall mean any form resulting from mechanical
              transformation or translation of a Source form, including but
              not limited to compiled object code, generated documentation,
              and conversions to other media types.
        
              "Work" shall mean the work of authorship, whether in Source or
              Object form, made available under the License, as indicated by a
              copyright notice that is included in or attached to the work
              (an example is provided in the Appendix below).
        
              "Derivative Works" shall mean any work, whether in Source or Object
              form, that is based on (or derived from) the Work and for which the
              editorial revisions, annotations, elaborations, or other modifications
              represent, as a whole, an original work of authorship. For the purposes
              of this License, Derivative Works shall not include works that remain
              separable from, or merely link (or bind by name) to the interfaces of,
              the Work and Derivative Works thereof.
        
              "Contribution" shall mean any work of authorship, including
              the original version of the Work and any modifications or additions
              to that Work or Derivative Works thereof, that is intentionally
              submitted to Licensor for inclusion in the Work by the copyright owner
              or by an individual or Legal Entity authorized to submit on behalf of
              the copyright owner. For the purposes of this definition, "submitted"
              means any form of electronic, verbal, or written communication sent
              to the Licensor or its representatives, including but not limited to
              communication on electronic mailing lists, source code control systems,
              and issue tracking systems that are managed by, or on behalf of, the
              Licensor for the purpose of discussing and improving the Work, but
              excluding communication that is conspicuously marked or otherwise
              designated in writing by the copyright owner as "Not a Contribution."
        
              "Contributor" shall mean Licensor and any individual or Legal Entity
              on behalf of whom a Contribution has been received by Licensor and
              subsequently incorporated within the Work.
        
           2. Grant of Copyright License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              copyright license to reproduce, prepare Derivative Works of,
              publicly display, publicly perform, sublicense, and distribute the
              Work and such Derivative Works in Source or Object form.
        
           3. Grant of Patent License. Subject to the terms and conditions of
              this License, each Contributor hereby grants to You a perpetual,
              worldwide, non-exclusive, no-charge, royalty-free, irrevocable
              (except as stated in this section) patent license to make, have made,
              use, offer to sell, sell, import, and otherwise transfer the Work,
              where such license applies only to those patent claims licensable
              by such Contributor that are necessarily infringed by their
              Contribution(s) alone or by combination of their Contribution(s)
              with the Work to which such Contribution(s) was submitted. If You
              institute patent litigation against any entity (including a
              cross-claim or counterclaim in a lawsuit) alleging that the Work
              or a Contribution incorporated within the Work constitutes direct
              or contributory patent infringement, then any patent licenses
              granted to You under this License for that Work shall terminate
              as of the date such litigation is filed.
        
           4. Redistribution. You may reproduce and distribute copies of the
              Work or Derivative Works thereof in any medium, with or without
              modifications, and in Source or Object form, provided that You
              meet the following conditions:
        
              (a) You must give any other recipients of the Work or
                  Derivative Works a copy of this License; and
        
              (b) You must cause any modified files to carry prominent notices
                  stating that You changed the files; and
        
              (c) You must retain, in the Source form of any Derivative Works
                  that You distribute, all copyright, patent, trademark, and
                  attribution notices from the Source form of the Work,
                  excluding those notices that do not pertain to any part of
                  the Derivative Works; and
        
              (d) If the Work includes a "NOTICE" text file as part of its
                  distribution, then any Derivative Works that You distribute must
                  include a readable copy of the attribution notices contained
                  within such NOTICE file, excluding those notices that do not
                  pertain to any part of the Derivative Works, in at least one
                  of the following places: within a NOTICE text file distributed
                  as part of the Derivative Works; within the Source form or
                  documentation, if provided along with the Derivative Works; or,
                  within a display generated by the Derivative Works, if and
                  wherever such third-party notices normally appear. The contents
                  of the NOTICE file are for informational purposes only and
                  do not modify the License. You may add Your own attribution
                  notices within Derivative Works that You distribute, alongside
                  or as an addendum to the NOTICE text from the Work, provided
                  that such additional attribution notices cannot be construed
                  as modifying the License.
        
              You may add Your own copyright statement to Your modifications and
              may provide additional or different license terms and conditions
              for use, reproduction, or distribution of Your modifications, or
              for any such Derivative Works as a whole, provided Your use,
              reproduction, and distribution of the Work otherwise complies with
              the conditions stated in this License.
        
           5. Submission of Contributions. Unless You explicitly state otherwise,
              any Contribution intentionally submitted for inclusion in the Work
              by You to the Licensor shall be under the terms and conditions of
              this License, without any additional terms or conditions.
              Notwithstanding the above, nothing herein shall supersede or modify
              the terms of any separate license agreement you may have executed
              with Licensor regarding such Contributions.
        
           6. Trademarks. This License does not grant permission to use the trade
              names, trademarks, service marks, or product names of the Licensor,
              except as required for reasonable and customary use in describing the
              origin of the Work and reproducing the content of the NOTICE file.
        
           7. Disclaimer of Warranty. Unless required by applicable law or
              agreed to in writing, Licensor provides the Work (and each
              Contributor provides its Contributions) on an "AS IS" BASIS,
              WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
              implied, including, without limitation, any warranties or conditions
              of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
              PARTICULAR PURPOSE. You are solely responsible for determining the
              appropriateness of using or redistributing the Work and assume any
              risks associated with Your exercise of permissions under this License.
        
           8. Limitation of Liability. In no event and under no legal theory,
              whether in tort (including negligence), contract, or otherwise,
              unless required by applicable law (such as deliberate and grossly
              negligent acts) or agreed to in writing, shall any Contributor be
              liable to You for damages, including any direct, indirect, special,
              incidental, or consequential damages of any character arising as a
              result of this License or out of the use or inability to use the
              Work (including but not limited to damages for loss of goodwill,
              work stoppage, computer failure or malfunction, or any and all
              other commercial damages or losses), even if such Contributor
              has been advised of the possibility of such damages.
        
           9. Accepting Warranty or Additional Liability. While redistributing
              the Work or Derivative Works thereof, You may choose to offer,
              and charge a fee for, acceptance of support, warranty, indemnity,
              or other liability obligations and/or rights consistent with this
              License. However, in accepting such obligations, You may act only
              on Your own behalf and on Your sole responsibility, not on behalf
              of any other Contributor, and only if You agree to indemnify,
              defend, and hold each Contributor harmless for any liability
              incurred by, or claims asserted against, such Contributor by reason
              of your accepting any such warranty or additional liability.
        
           END OF TERMS AND CONDITIONS
        
           APPENDIX: How to apply the Apache License to your work.
        
              To apply the Apache License to your work, attach the following
              boilerplate notice, with the fields enclosed by brackets "[]"
              replaced with your own identifying information. (Don't include
              the brackets!)  The text should be enclosed in the appropriate
              comment syntax for the file format. We also recommend that a
              file or class name and description of purpose be included on the
              same "printed page" as the copyright notice for easier
              identification within third-party archives.
        
           Copyright [yyyy] [name of copyright owner]
        
           Licensed under the Apache License, Version 2.0 (the "License");
           you may not use this file except in compliance with the License.
           You may obtain a copy of the License at
        
               http://www.apache.org/licenses/LICENSE-2.0
        
           Unless required by applicable law or agreed to in writing, software
           distributed under the License is distributed on an "AS IS" BASIS,
           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
           See the License for the specific language governing permissions and
           limitations under the License.
        
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: vools>=0.7.1
Dynamic: license-file

# vools.dll32 - 32 位 DLL 专用桥接包

通过嵌入式 Python 3.6 32 位进程，在 64 位 Python 环境中无缝调用 32 位 DLL、COM 组件和 .NET 程序集。

## 功能特点

- **跨位数调用**: 64 位 Python 调用 32 位 DLL/COM/.NET
- **统一装饰器接口**: 与 `vools.sys.dll` 风格一致的 `@dll32` 装饰器
- **内置 DLL 集合**: 预置常用 32 位 DLL，开箱即用
- **COM 组件支持**: 支持 RC6 (VBRichClient5) 等 COM 组件免注册调用
- **.NET 互操作**: 通过 pythonnet 调用 .NET 程序集
- **函数签名注册表**: 集中管理 DLL 函数签名，支持动态适配
- **跨进程通信**: 通过临时文件 + 子进程方式实现稳定通信

## 架构设计

```
vools/dll32/
├── __init__.py              # 主入口，导出核心 API
├── dll.py                   # @dll32 装饰器
├── vb6plus.py               # VB6Plus.dll 包装类
├── openssl.py               # VB6OpenSSL.dll 包装类
├── mqtt.py                  # VB6MQTT.dll 包装类
├── _core/                   # 核心通信层
│   ├── _spawn32.py          # 32 位 Python 进程管理
│   └── _pipe_comm.py        # 跨进程通信封装
├── _dlls/                   # 预置 32 位 DLL 文件
│   ├── VB6Plus.dll
│   ├── VB6OpenSSL.dll
│   ├── VB6MQTT.dll
│   ├── DirectCOM.dll
│   ├── RC6.dll
│   ├── RC6Widgets.dll
│   ├── vbRichClient5.dll
│   ├── cairo_sqlite.dll
│   └── WebView2Loader.dll
├── _lib/                    # 高层包装库
│   ├── com/                 # COM 组件支持
│   │   ├── _base.py         # COMObject 基类
│   │   ├── directcom.py     # DirectCOM 免注册加载
│   │   ├── rc6.py           # RC6 基础包装
│   │   └── rc6plus.py       # RC6Plus 增强包装
│   └── clr/                 # .NET 互操作支持
│       └── _base.py         # CLRAssembly / DotNetObject
├── _signatures/             # 函数签名注册表
│   ├── _registry.py         # 统一注册中心
│   ├── vb6plus.py           # VB6Plus.dll 签名
│   ├── openssl.py           # VB6OpenSSL.dll 签名
│   └── mqtt.py              # VB6MQTT.dll 签名
└── _python32/               # 嵌入式 Python 3.6 32 位
```

### 架构层次

| 层次 | 模块 | 职责 |
|------|------|------|
| 用户接口层 | `__init__.py`, `dll.py` | 提供装饰器和便捷 API |
| 包装层 | `vb6plus.py`, `openssl.py`, `mqtt.py`, `_lib/` | 高层封装，简化调用 |
| 签名层 | `_signatures/` | 函数元数据管理 |
| 通信层 | `_core/` | 32 位进程管理与通信 |
| 资源层 | `_dlls/`, `_python32/` | DLL 文件和 Python 运行时 |

## 支持的组件

### 标准 DLL

| DLL 文件 | 功能类别 | 函数数量 |
|----------|----------|----------|
| **VB6Plus.dll** | 编解码、加密、文件、网络、GUI | 57+ |
| **VB6OpenSSL.dll** | HTTPS GET/POST 请求 | 2 |
| **VB6MQTT.dll** | MQTT 客户端 | 4 |

### COM 组件

| 组件 | 说明 |
|------|------|
| **RC6 (VBRichClient5)** | 加密、文件、集合、网络、数据库、JSON 等 |
| **DirectCOM** | 免注册 COM 加载器 |

### .NET 程序集

通过 pythonnet 支持任意 .NET 程序集加载和调用。

## 安装

无需额外安装，Python 3.6 32 位嵌入式环境已内置在包中。

**要求**:
- Windows 平台
- Python 3.6+ (64 位)

## 使用方法

### 1. 使用 @dll32 装饰器调用标准 DLL

```python
from vools.dll32 import dll32

# 装饰器模式
@dll32('VB6Plus.dll::Base64Encode_UTF8')
def base64_encode(input_str: str) -> str:
    pass

result = base64_encode('Hello, World!')
print(result)  # SGVsbG8sIFdvcmxkIQ==
```

### 2. 使用内置包装类

#### VB6Plus - 多功能工具库

```python
from vools.dll32 import vb6plus

# Base64 编解码
encoded = vb6plus.base64_encode_utf8('Hello')
decoded = vb6plus.base64_decode_utf8(encoded)

# MD5 哈希
md5_32 = vb6plus.md5_32_utf8('test')
md5_16 = vb6plus.md5_16_utf8('test')

# HTML 编解码
html_encoded = vb6plus.html_encode('<div>test</div>')
html_decoded = vb6plus.html_decode(html_encoded)

# URL 编解码
url_encoded = vb6plus.url_encode_utf8('hello world')
url_decoded = vb6plus.url_decode_utf8(url_encoded)

# 字符串相似度
similarity = vb6plus.str_compare('hello', 'hallo')

# INI 文件操作
value = vb6plus.read_ini_value('Section', 'Key', 'default', 'config.ini')
vb6plus.write_ini_value('Section', 'Key', 'value', 'config.ini')

# AES 加解密
encrypted = vb6plus.aes_encrypt_utf8('data', 'password')
decrypted = vb6plus.aes_decrypt_utf8(encrypted, 'password')

# 二维码生成
vb6plus.make_qrcode('https://example.com', 'qrcode.jpg', size=5)
```

#### OpenSSL - HTTPS 请求

```python
from vools.dll32 import openssl

# GET 请求
response = openssl.get('https://api.example.com/data')

# POST 请求
response = openssl.post(
    'https://api.example.com/submit',
    data='{"key": "value"}',
    content_type='application/json'
)
```

#### MQTT - 消息队列

```python
from vools.dll32 import mqtt

# 连接 MQTT 服务器
mqtt.open('broker.example.com', 1883, 'client_id', 'user', 'password')

# 订阅主题
mqtt.subscribe('test/topic', qos=1)

# 发布消息
mqtt.publish('test/topic', 'Hello MQTT!', qos=1)

# 断开连接
mqtt.close()
```

### 3. 使用 RC6 (VBRichClient5) COM 组件

#### 方式一：全局实例

```python
from vools.dll32 import get_rc6

rc6 = get_rc6()

# 加密解密
encoded = rc6.base64_encode('Hello')
decoded = rc6.base64_decode(encoded)

md5 = rc6.md5('test')
sha256 = rc6.sha256('test')

encrypted = rc6.aes_encrypt('data', 'password')
decrypted = rc6.aes_decrypt(encrypted, 'password')

# 文件操作
content = rc6.read_text('test.txt')
rc6.write_text('output.txt', 'Hello World')

# 使用子对象
crypt = rc6.crypt           # cCrypt - 加密解密
fso = rc6.fso               # cFSO - 文件系统
collection = rc6.collection # cCollection - 集合
json = rc6.json             # cJSON - JSON 处理
timer = rc6.timer           # cTimer - 定时器
memdb = rc6.memdb           # cMemDB - 内存数据库
tcp_client = rc6.tcp_client # cTCPClient - TCP 客户端
```

#### 方式二：直接使用 RC6Plus 类

```python
from vools.dll32._lib.com import RC6Plus

rc6 = RC6Plus(dll_dir=r'path/to/dlls')
result = rc6.base64_encode('Hello')
```

### 4. 使用 .NET 程序集

```python
from vools.dll32._lib.clr import CLRAssembly

# 加载 .NET 程序集
clr = CLRAssembly.load_assembly('System.Data')

# 使用 .NET 类型
import System
table = System.Data.DataTable()
```

### 5. 函数签名注册表

```python
from vools.dll32 import list_dlls, list_functions, get_signature

# 列出所有已注册的 DLL
dlls = list_dlls()
# ['VB6Plus.dll', 'VB6OpenSSL.dll', 'VB6MQTT.dll']

# 列出指定 DLL 的所有函数
funcs = list_functions('VB6Plus.dll')

# 获取函数签名
sig = get_signature('VB6Plus.dll', 'Base64Encode_UTF8')
```

### 6. 内置 DLL 管理

```python
from vools.dll32._dlls import get_dll_path, list_builtin_dlls, dll_exists

# 获取内置 DLL 路径
path = get_dll_path('VB6Plus.dll')

# 列出所有内置 DLL
dlls = list_builtin_dlls()

# 检查 DLL 是否存在
exists = dll_exists('VB6Plus.dll')
```

## API 参考

### @dll32 装饰器

```python
@dll32(dll_spec, *, async_mode=False, fallback=None)
```

| 参数 | 类型 | 说明 |
|------|------|------|
| `dll_spec` | `str` | DLL 规格，格式: `"path/to/dll::func_name"` |
| `async_mode` | `bool` | 是否启用异步模式 (默认 False) |
| `fallback` | `Callable` | 调用失败时的回退函数 |

**说明**:
- 如果 `dll_spec` 是相对路径，会自动在 `_dlls/` 目录中查找
- 函数参数类型会自动适配（str、int、float、bytes 等）
- 支持可选参数和默认值

### VB6Plus 类

#### 编解码

| 方法 | 说明 |
|------|------|
| `base64_encode_gb(input_str)` | Base64 编码 (GB) |
| `base64_decode_gb(input_str)` | Base64 解码 (GB) |
| `base64_encode_utf8(input_str)` | Base64 编码 (UTF-8) |
| `base64_decode_utf8(input_str)` | Base64 解码 (UTF-8) |
| `html_encode(input_str)` | HTML 编码 |
| `html_decode(input_str)` | HTML 解码 |
| `url_encode_gb(input_str)` | URL 编码 (GB) |
| `url_decode_gb(input_str)` | URL 解码 (GB) |
| `url_encode_utf8(input_str)` | URL 编码 (UTF-8) |
| `url_decode_utf8(input_str)` | URL 解码 (UTF-8) |
| `unicode_encode(input_str)` | Unicode 编码 (\uXXXX) |
| `unicode_decode(input_str)` | Unicode 解码 |
| `str_to_hex_gb(input_str, is_upper=1)` | 字符串转十六进制 (GB) |
| `str_to_hex_utf8(input_str, is_upper=1)` | 字符串转十六进制 (UTF-8) |
| `hex_to_str_gb(input_str)` | 十六进制转字符串 (GB) |
| `hex_to_str_utf8(input_str)` | 十六进制转字符串 (UTF-8) |

#### 哈希

| 方法 | 说明 |
|------|------|
| `md5_16_gb(input_str)` | MD5 16 位 (GB) |
| `md5_32_gb(input_str)` | MD5 32 位 (GB) |
| `md5_16_utf8(input_str)` | MD5 16 位 (UTF-8) |
| `md5_32_utf8(input_str)` | MD5 32 位 (UTF-8) |

#### 加密

| 方法 | 说明 |
|------|------|
| `aes_encrypt_gb(input_str, password, iv, mode, padding, out_type)` | AES 加密 (GB) |
| `aes_decrypt_gb(input_str, password, iv, mode, padding, in_type)` | AES 解密 (GB) |
| `aes_encrypt_utf8(input_str, password, iv, mode, padding, out_type)` | AES 加密 (UTF-8) |
| `aes_decrypt_utf8(input_str, password, iv, mode, padding, in_type)` | AES 解密 (UTF-8) |

#### 字符串

| 方法 | 说明 |
|------|------|
| `no_html(input_str, no_html_more=0)` | 去除 HTML 标签 |
| `str_compare(str_a, str_b)` | 字符串相似度比较 (0-1) |
| `permutation(input_str, separator=',', result_total=0)` | 字符串全排列 |
| `combination(input_str, separator=',', result_total=0)` | 字符串组合 |
| `explode_data(input_str, start_str, end_str)` | 提取中间文本 |
| `regex_replace(input_str, pattern, replacement)` | 正则替换 |

#### 文件操作

| 方法 | 说明 |
|------|------|
| `read_ini_value(section, key, default='', ini_file='Config.ini')` | 读取 INI 值 |
| `write_ini_value(section, key, value, ini_file='Config.ini')` | 写入 INI 值 |

#### 网络

| 方法 | 说明 |
|------|------|
| `xmlhttp_get(url, headers='', ...)` | XMLHTTP GET 请求 |
| `xmlhttp_post(url, data, headers='', ...)` | XMLHTTP POST 请求 |

#### 图片处理

| 方法 | 说明 |
|------|------|
| `image_to_jpg(src, dst, quality=95)` | 图片转 JPG |
| `image_to_bmp(src, dst)` | 图片转 BMP |
| `make_qrcode(text, path, size=0, ...)` | 生成二维码 |
| `scan_qr_image(path, ...)` | 扫描二维码 |

#### 对话框

| 方法 | 说明 |
|------|------|
| `show_open_file(hwnd=0, filter='', ...)` | 打开文件对话框 |
| `show_save_file(hwnd=0, filter='', ...)` | 保存文件对话框 |
| `show_browser_folder(hwnd=0, ...)` | 浏览文件夹对话框 |

#### 数据库

| 方法 | 说明 |
|------|------|
| `sqlite_open(db_file='DB.DB')` | 打开 SQLite 数据库 |
| `sqlite_close(db_handle)` | 关闭 SQLite 数据库 |
| `sqlite_execute(db_handle, sql)` | 执行 SQL 语句 |

#### 系统工具

| 方法 | 说明 |
|------|------|
| `win_copy_file_to_clipboard(file_or_dir)` | 复制文件到剪贴板 |
| `run_vbscript(vbscript, error_msg)` | 执行 VBScript |

### RC6Plus 类

#### 便捷方法

| 方法 | 说明 |
|------|------|
| `base64_encode(text)` | Base64 编码 |
| `base64_decode(text)` | Base64 解码 |
| `md5(text)` | MD5 哈希 |
| `sha256(text)` | SHA256 哈希 |
| `aes_encrypt(data, password, mode=0, padding=0)` | AES 加密 |
| `aes_decrypt(encrypted, password, mode=0, padding=0)` | AES 解密 |
| `read_text(file_path, encoding='utf-8')` | 读取文本文件 |
| `write_text(file_path, content, encoding='utf-8')` | 写入文本文件 |

#### 子对象

| 属性 | 类型 | 说明 |
|------|------|------|
| `constructor` | cConstructor | RC6 构造器 |
| `crypt` | cCrypt | 加密解密 |
| `fso` | cFSO | 文件系统 |
| `collection` | cCollection | 集合 |
| `sorted_dict` | cSortedDictionary | 有序字典 |
| `json` | cJSON | JSON 处理 |
| `stream` | cStream | 数据流 |
| `timer` | cTimer | 定时器 |
| `tcp_client` | cTCPClient | TCP 客户端 |
| `tcp_server` | cTCPServer | TCP 服务器 |
| `memdb` | cMemDB | 内存数据库 |
| `simple_dom` | cSimpleDOM | XML/HTML 解析 |
| `formula` | cFormula | 公式计算 |

## 注意事项

1. **仅支持 Windows 平台**：32 位 DLL 是 Windows 特有技术
2. **进程间通信开销**：每次调用都会启动 32 位 Python 进程，频繁调用建议批量处理
3. **数据类型限制**：跨进程传输仅支持 JSON 可序列化类型（str、int、float、bool、list、dict、None）
4. **COM 组件注册**：部分 COM 组件可能需要先注册才能使用
5. **线程安全**：当前实现不是线程安全的，多线程环境需自行加锁

## 常见问题

### Q: 调用 DLL 时提示找不到文件？

A: 请确保 DLL 文件存在。如果使用相对路径，会在 `_dlls/` 目录中查找。可以使用绝对路径。

### Q: 如何添加新的 DLL 支持？

A: 
1. 将 DLL 文件放入 `_dlls/` 目录
2. 在 `_signatures/` 中创建对应的签名文件
3. 在 `_signatures/_registry.py` 中注册
4. 可选：创建包装类提供便捷 API

### Q: 性能如何？

A: 由于每次调用都需要启动 32 位 Python 进程，单次调用约有 50-100ms 的开销。适合调用频率不高但需要 32 位 DLL 功能的场景。

### Q: 可以调用自定义的 32 位 DLL 吗？

A: 可以。使用 `@dll32('path/to/your.dll::FunctionName')` 装饰器即可，不需要修改框架代码。
