gpt4 book ai didi

javascript - 在 js-ctypes mozilla 附加 sdk 中使用 dll - 查看程序的 STDOUT?

转载 作者:行者123 更新时间:2023-11-28 07:49:17 25 4
gpt4 key购买 nike

编辑是因为我构建了错误的 DLL:

我已经构建了一个 DLL,如果我在 DLL 上执行 dumpbin/exports 命令,我会看到以下内容:

Dump of file stun_driver.dll

File Type: DLL

Section contains the following exports for stun_driver.dll

00000000 characteristics
546E6C63 time date stamp Thu Nov 20 17:34:11 2014
0.00 version
1 ordinal base
4 number of functions
4 number of names

ordinal hint RVA name

1 0 00001005 OPENSSL_Applink = @ILT+0(_OPENSSL_Applink)
2 1 00001320 launch_stun = @ILT+795(_launch_stun)
3 2 000011D6 stop_stun = @ILT+465(_stop_stun)
4 3 00001078 test_print = @ILT+115(_test_print)

Summary

1A000 .data
2000 .idata
46000 .rdata
F000 .reloc
135000 .text

我执行“test_print”函数的代码如下:

/* import js-ctypes */
Cu.import("resource://gre/modules/ctypes.jsm")
var stun_driver = ctypes.open("C:\\stun_driver.dll");

const test_print = stun_driver.declare("test_print", ctypes.default_abi, ctypes.int32_t);
.
.
.//in a button
test_print();

所以我的问题是,如果我的 test_print() 正在执行 printf("Hello World"),那么该文本会去哪里?它似乎没有记录到我的浏览器控制台,或者我正在运行“cfx run”的 dos 控制台。

最佳答案

如果您从终端窗口启动 Firefox,您应该在那里看到输出。

关于javascript - 在 js-ctypes mozilla 附加 sdk 中使用 dll - 查看程序的 STDOUT?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27050682/

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