64位二进制文​​件将值返回到32位二进制文​​件?

编程入门 行业动态 更新时间:2024-10-23 10:26:37
本文介绍了64位二进制文​​件将值返回到32位二进制文​​件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个需要编译为64位的程序。我有另一个需要编译为32位的 程序,并将调用64位二进制文件。有没有办法让64位二进制文​​件将字符串返回到32位的?如果是这样,怎么样? 我能想到的唯一方法就是让32位二进制调用64- 位二进制,然后写到一个文本文件,最后有32位 二进制文件读取它。 有更好的方法吗?

I have a program that needs to be compiled as 64bit. I have another program that needs to be compiled as 32bit and will call that 64-bit binary. Is there a way for the 64-bit binary to return a string to the 32-bit? If so, how? The only way I could think of is to have the 32-bit binary call the 64- bit binary, then it writes to a text file and finally have the 32-bit binary read it off. Is there a better way to do this?

推荐答案

sp ** ***********@yahoo.ca 写道: 我有一个需要编译为64位的程序。我有另一个需要编译为32位的 程序,并将调用64位二进制文件。有没有办法让64位二进制文​​件将字符串返回到32位的?如果是这样,怎么样? 我能想到的唯一方法就是让32位二进制调用64- 位二进制,然后写到一个文本文件,最后有32位 二进制文件读取它。 有更好的方法吗? I have a program that needs to be compiled as 64bit. I have another program that needs to be compiled as 32bit and will call that 64-bit binary. Is there a way for the 64-bit binary to return a string to the 32-bit? If so, how? The only way I could think of is to have the 32-bit binary call the 64- bit binary, then it writes to a text file and finally have the 32-bit binary read it off. Is there a better way to do this?

32位二进制文​​件是否支持多长?如果不是,你可能需要按照你写的 来做,或者使用一些非便携式的方法,比如popen(),或者通过套接字调用 64位并读取从标准输出中回来字符串。 但当然所有这些都是偏离主题的:-)。 - 问候, Stan Milam =========================== ======================= =========== 平庸吉他协会的特许会员上演 昂贵的乐器有限公司 =========================== ======================= ===========

Does the 32 bit binary support long long? If not you may have to do as you wrote, or use some non-portable means such as popen(), or invoke the 64 bit via a socket and read back the string from its standard output. But of course all of that stuff is off-topic :-). -- Regards, Stan Milam ================================================== =========== Charter Member of The Society for Mediocre Guitar Playing on Expensive Instruments, Ltd. ================================================== ===========

开3月28日晚上11点18分,Stan Milam< stmi ... @ swbellwrote: On Mar 28, 11:18 pm, Stan Milam <stmi...@swbellwrote: spammenotplu ... @ yahoo.ca写道: spammenotplu...@yahoo.ca wrote: 我有一个需要编译为64位的程序。我有另一个需要编译为32位的 程序,并将调用64位二进制文件。有没有办法让64位二进制文​​件将字符串返回到32位的?如果是这样,怎么样? I have a program that needs to be compiled as 64bit. I have another program that needs to be compiled as 32bit and will call that 64-bit binary. Is there a way for the 64-bit binary to return a string to the 32-bit? If so, how?

我能想到的唯一方法是让32位二进制调用64- 位二进制,然后它写入一个文本文件,最后让32位 二进制文件读取它。 The only way I could think of is to have the 32-bit binary call the 64- bit binary, then it writes to a text file and finally have the 32-bit binary read it off.

有更好的方法吗? Is there a better way to do this?

32位二进制文​​件是否支持多长?如果不是,你可能需要按照你写的 来做,或者使用一些非便携式的方法,比如popen(),或者通过套接字调用 64位并读取从标准输出中回来字符串。 但当然所有这些都是偏离主题的:-)。 - 问候, Stan Milam =========================== ======================= =========== 平庸吉他协会的特许会员上演 昂贵的乐器有限公司 =========================== ======================= ===========

Does the 32 bit binary support long long? If not you may have to do as you wrote, or use some non-portable means such as popen(), or invoke the 64 bit via a socket and read back the string from its standard output. But of course all of that stuff is off-topic :-). -- Regards, Stan Milam ================================================== =========== Charter Member of The Society for Mediocre Guitar Playing on Expensive Instruments, Ltd. ================================================== ===========

嗨Stan, 我不擅长C.如果支持很长时间怎么办?什么是 更有效的方式呢?我会使用什么样的函数 为你建议调用套接字的第二种方法? 谢谢! :)

Hi Stan, I''m not good in C. What if it supports long long? What would be the more efficient way of doing it? What sort of functions would I use for the second method you suggested with invoking a socket? Thanks! :)

On 29 Mrz。,04:58,spammenotplu ... @ yahoo.ca写道: On 29 Mrz., 04:58, spammenotplu...@yahoo.ca wrote: 3月28日晚上11点18分,Stan Milam< stmi ... @ swbellwrote: On Mar 28, 11:18 pm, Stan Milam <stmi...@swbellwrote: spammenotplu ... @ yahoo .ca写道: spammenotplu...@yahoo.ca wrote: 我有一个需要编译为64位的程序。我有另一个需要编译为32位的 程序,并将调用64位二进制文件。有没有办法让64位二进制文​​件将字符串返回到32位的?如果是这样,怎么样? I have a program that needs to be compiled as 64bit. I have another program that needs to be compiled as 32bit and will call that 64-bit binary. Is there a way for the 64-bit binary to return a string to the 32-bit? If so, how?

我能想到的唯一方法是让32位二进制调用64 - 位二进制,然后它写入一个文本文件,最后有32位 二进制读取它。 The only way I could think of is to have the 32-bit binary call the 64- bit binary, then it writes to a text file and finally have the 32-bit binary read it off.

有更好的方法吗? Is there a better way to do this?

32位二进制文​​件是否支持多长?如果不是,你可能需要按照你写的 来做,或者使用一些非便携式的方法,比如popen(),或者通过套接字调用 64位并读取从标准输出中返回字符串。 但当然所有这些都是偏离主题的:-)。 Does the 32 bit binary support long long? If not you may have to do as you wrote, or use some non-portable means such as popen(), or invoke the 64 bit via a socket and read back the string from its standard output. But of course all of that stuff is off-topic :-).

- 问候, Stan Milam ================================================== =========== 普通吉他协会的特许会员演奏 昂贵的乐器有限公司 ================================================== =========== -- Regards, Stan Milam ================================================== =========== Charter Member of The Society for Mediocre Guitar Playing on Expensive Instruments, Ltd. ================================================== ===========

嗨斯坦, 我不擅长C如果长时间支持怎么办?什么是 更有效的方式呢?我会使用什么样的函数 为你建议调用套接字的第二种方法? 谢谢! :)

Hi Stan, I''m not good in C. What if it supports long long? What would be the more efficient way of doing it? What sort of functions would I use for the second method you suggested with invoking a socket? Thanks! :)

Google for IPC,套接字是恕我直言最好的。打开一个端口0的套接字 和 将给定的端口号传递给被叫方。但是你需要先了解 IPC 来理解上面的句子。

Google for IPC, sockets are IMHO the best. Open a socket with port 0 and pass the given port number to the callee. But you need to learn about IPC first to understand the sentence above.

更多推荐

64位二进制文​​件将值返回到32位二进制文​​件?

本文发布于:2023-11-08 15:53:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1569814.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:件将值

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!