将值从 exe 传递到 dll c++

发布于 2024-08-27 16:35:12 字数 99 浏览 5 评论 0原文

所以我有这个可执行文件,它从操纵杆获取值并输出这些值(我有代码)。我想将这些值传递给 dll,该 dll 在程序中读取(我有 dll 的代码)。如何将这些值从 exe 传递到 dll?

so I have this executable which takes values from a joystick and outputs those values (i have the code). I want to pass those values to a dll, which is read in a program (i have the code for the dll). how can I pass those values from the exe to the dll?

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

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

发布评论

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

评论(1

巾帼英雄 2024-09-03 16:35:12

如果 DLL 中有使用这些值作为参数的函数,只需调用该函数并传入这些值即可。您可能需要使用 LoadLibrary 和 < a href="http://msdn.microsoft.com/en-us/library/ms683212%28v=VS.85%29.aspx" rel="nofollow noreferrer">GetProcAddress 获取函数的地址。

If you have functions in the DLL that use these values as parameters, simply invoke the function, passing in those values. You may need to use LoadLibrary and GetProcAddress to get the function's address.

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