开发者

Visual Studio view StandardOuptut stream from DLL

I have a c# application that is using a custom DLL (written in C, built with CL).

the DLL has many printf's that I'd like to be able to view while run开发者_C百科ning my c# app. So far I havnt been able to figure out how to view the output from the DLL in visual studio (2010 or 2005).

I have a test app in C that runs the dll from command line and I can see the output fine there.

Is it possible to see that output in Visual Studio? Do I need to build the DLL differently to enable it somehow?


You might consider the free utility from Sysinternals called DebugView:

http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx

I'm not sure if this will exactly solve your problem but if the calls are going through the right place you might be able to pick them up. It can't hurt to try.


You didn't ask this, but I will add a note here about viewing OutputDebugString output in the debugger when debugging managed code (C# in my case). I had to set the "Enable unmanaged code debugging" option on the Project->Properties->Debug tab in order to see the output from OutputDebugString. Note that this probably has nothing to do with printf, but it might be useful if your C dll is using OutputDebugString.

So, beware of that if you are using OutputDebugString.

Here is a link to my original question where I asked out OutputDebugString and the VS output window.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜