编译 C-dll 以进行 Python 或 SWIG 模块创建,如何继续?

发布于 2024-09-04 18:55:56 字数 539 浏览 3 评论 0原文

我引用了此文件“kbdext.c”及其在 http://www.docdroppers.org/wiki/index.php?title=Writing_Keyloggers(列表位于底部)。

我一直在尝试将其编译dll以在Python或Visual Basic中使用,但没有成功。我不熟悉 C 或 GCC 来解决问题或正确编译 dll。 (在对所有文件进行常规编译时,我还收到有关 snprintf 未声明的错误)。

我应该采取哪些步骤才能使所有功能可用于其他语言和外部应用?

或者使用 SWIG 并创建一个 python 模块而不是编译 DLL 可能更容易?

I reference this file "kbdext.c" and its headerfile listed on http://www.docdroppers.org/wiki/index.php?title=Writing_Keyloggers (the listings are at the bottom).

I've been trying to compile this into a dll for use in Python or Visual Basic, but have not succeeded. I'm not familiar with C or GCC to sort out the problems or do the dll compile correctly. (I also get an error about snprintf not being declared when doing a regular compile of all the files).

What are the steps I should do to make all functions available for other languages and external apps?

Or is it perhaps easier to use SWIG and make a python module, instead of compiling a DLL?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

双手揣兜 2024-09-11 18:55:56

我已经成功地用 GCC 编译了 dll,并且能够在 C 中导入它的函数。我还没有在 VB 和 Python 中测试导入,但不明白为什么它会带来问题。

I've succeeded in compiling the dll with GCC, and am able to import its functions in C. I have yet to test the import in VB and Python but can't see why it would pose problems.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文