gpt4 book ai didi

python - 是否可以仅通过 dll 访问 .Net 运行时

转载 作者:太空宇宙 更新时间:2023-11-04 06:20:56 25 4
gpt4 key购买 nike

我使用的 PC (Win7) 没有任何 MS 开发工具。但是,此 PC 上安装了 python 2.7。 ctype 模块在此安装中可用。 (它不是 IronPython。它只是普通的 CPython)

现在,如果我们查看 OSX 上的 Objective-C,C 程序可以通过调用 objc_msgSend 和一些其他 API (https://developer .apple.com/library/mac/#documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html)。这很痛苦,根本不推荐,但至少它是可行的。

那么鉴于上述限制条件(win7,无 VStudio,python+ctype),我是否有可能以类似于 objective-c 的方式访问 .Net 运行时?

最佳答案

is it possible for me to access the .Net runtime in a manner similar to objective-c?

.NET Runtime can be Hosted ,它允许您直接从 native API 访问和使用类型。

话虽如此,通常有更简单的方法来完成此任务。例如,如果您需要访问的 .NET 类型是 COM 可见的,您可以直接通过 COM 使用它们。

关于python - 是否可以仅通过 dll 访问 .Net 运行时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12254952/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com