python-3.x - 从 64 位 Python 访问 32 位 DLL 文件 - Ctypes 和 msl.loadlib 不起作用?
问题描述
我正在尝试使用 64 位 Python 访问 32 位 DLL 文件,但它不起作用?
我尝试了 Ctypes 和 msl.loadlib 模块,但它们没有帮助我吗?
I get the error not a valid 32bit application ? When i try Cpp64() i get
UnsupportedOperation: fileno
这是我在 excel 中的 VBA 代码
Private Declare Function UTLConnectSession Lib "ATMAPI32.DLL" (ByVal hWnd&, ByVal Session$) As Long
它运作良好。当尝试在 python 中访问相同的内容时,它不会
import ctypes
from ctypes import *
import os
import sys
myDll = ctypes.CDLL(r"C:\Program Files (x86)\IBM\EHLLAPI\atmapi32.dll")
print(myDll)
from msl.loadlib import LoadLibrary, IS_PYTHON_64BIT
from msl.examples.loadlib import EXAMPLES_DIR
from msl.examples.loadlib import Cpp64
cdir=r"C:\Program Files (x86)\IBM\EHLLAPI\atmapi32.dll"
Cpp64()
我如何让它在 python 中工作?
问候,任。
解决方案
推荐阅读
- python-3.x - 在 python 中使用 google api 创建问题时,问题 ID 不为空
- android - IllegalStateException:无法将 SemanticsComponentNode 转换为视图
- python - 如何让精灵出现在 pygame 窗口上
- sql - PostgreSQL 在所有情况下都左连接横向输出
- react-native - 如何将组件放置在文本行的末尾
- python - 了解单链接队列函数的实现
- sql - IIS 委派突然停止工作 Windows Server 2016 运行 SqlPackage.exe 到 SQL Server 2017
- python - 如何在 pygame 中对透明图像进行 blit 以制作 alpha“剪切”
- python - 无法创建在 Python 中查找文本字符串的列
- ssl - 如何使用 https 服务 devpi?