LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Printing from within a VC++ DLL (using LabWindows 6.0)

Hi,

I'm writing dlls with Microsoft's Visual C++. I've taken the code I've written and tested it with C code I've written with Visual C++. It seems to work fine. I put it into labWindows and it seems to manipulate data just fine, but it won't print out any messages I had in the C++ code (I was using couts). Is there a way to get labWindows to print out these messages? Right now I'm breaking my code into smaller dlls to get around this, and it is slowing me down (and bumming me out)

ChrisS
0 Kudos
Message 1 of 2
(2,492 Views)
Hello

Try explicitly allocating your output resource by using the attached function in your dll. And replace your cout's with printf's. Just call the RedirectConsoleIO() function at the beginning of your dll.
This is the same as if you wanted to use printf statements in a win32 app.

I hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
Download All
0 Kudos
Message 2 of 2
(2,492 Views)