将C ++ DLL控制台Cout消息重定向到可视化的基本文本框控件 [英] Redirect c++ dll console cout message to a visual basic textbox control

查看:88
本文介绍了将C ++ DLL控制台Cout消息重定向到可视化的基本文本框控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在寻找一个sincro函数,该函数可以将c ++ dll的控制台(未显示)cout字符串重定向到使用Visual Basic .net开发的winform中的文本框.

I am looking for a sincro function that allow to redirect the console (not show) cout strings of a c++ dll to a text box inside a winform developed with visual basic .net.

由于c ++ dll具有无法返回所有值的类和子函数,因此无法更改. dll输出必须是cout流.

The c++ dll can not be changed since it has classes and sub functions that cannot return all the values. The dll output must be the cout stream.

我通过按钮运行主要的dll函数,然后我想以同步方式获取流(因为dll确实是:输出,计算,输出,计算等...),而我等不及函数结束获取全部输出.

I run the main dll function by a button and after I would like to obtain the stream in syncro (since dll does: output, computation, output, computation and so on...) and i cannot wait the function end to acquire the whole output. 

很少而且不清楚在线资源...我想结束这个问题.

Very few and not clear resources online... i would like to close this issue.

谢谢大家的帮助!

推荐答案

不确定我是否理解您的问题,但是是否要调用函数从您的C ++ dll异步获取,您将需要在其他线程上运行它.查看以下链接是否有帮助:

Not sure if I understand your question, but if you want to invoke functions from your C++ dll asynchronously, you will want to run it on a different thread. See if the below link helps:

https://www.codeproject.com /articles/31985/从线程最简单的方式更新ui


这篇关于将C ++ DLL控制台Cout消息重定向到可视化的基本文本框控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆