q472448760 发表于 2025-9-11 00:09 测试了一下,没有问题 <火山程序 类型 = "通常" 版本 = 1 /> 变量 data_ <类型 = 变整数 @输出名 = "data_"> data_ = 取静态方法地址 (测试回调方法2) @ std::string log_str{u8"你好啊"}; @ ((void (CALLBACK*)(CVolString&))data_) (CVolString(log_str.c_str())); |
weilai 发表于 2025-9-10 23:56 没办法的了 说不听 |
Xelloss0618 发表于 2025-9-10 23:27 <火山程序 类型 = "通常" 版本 = 1 /> 方法 测试回调方法2 <静态> 参数 参数1 <类型 = 文本型> { 调试输出 (取源方法名 (), 返回结果) } =========== 就这样,用取静态方法地址 然后嵌入调这个方法,32位是有反应的,但是输出乱码之后就崩 |
q472448760 发表于 2025-9-10 23:15 老吴早就说过了,小白无需了解嵌入,老实用火山写代码就行 |
q472448760 发表于 2025-9-10 23:15 你的火山函数是怎样的? |
Xelloss0618 发表于 2025-9-10 16:57 都试过了,乱码就算了。按理不应该崩溃。 调用约定的问题。报这样的错 Run-Time Check Failure #0 -The value of ESP was not properly savedacross a function call. This is usually a result of calling a functiondeclared with one calling convention with a function pointer declaredwith a different calling convention. (Press Retry to debug the application) 都是火山调为啥会有调用约定的问题。。。 |
sunye88888 发表于 2025-9-10 10:32 诶,还真是。 |
q472448760 发表于 2025-9-10 15:57 可能你的函数指针类型和参数类型没写好 ((void (CALLBACK*)(CVolString&)data_)) (CVolString(log_str.c_str())); |
Xelloss0618 发表于 2025-9-10 08:32 我这是 mfc下的火山静态方法,同一个代码自己调自己, 用传指针解决了,就是不知道为啥32位用嵌如调就不行 |
|Archiver|手机版|小黑屋|递归火山软件开发平台
( 鄂ICP备18029190号 )
GMT+8, 2025-9-13 21:25 , Processed in 0.096003 second(s), 23 queries .
Powered by Discuz! X3.4
© 2001-2017 Comsenz Inc.