LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

call libray function node: read printf messages

Hello
I'm calling a function in a dll. This function generates "printf" messages, and I want to know if I can obtain this messages, and how.
Thanks for your help
0 Kudos
Message 1 of 2
(2,644 Views)
Hello esther,

you can redirect stdout to a file using "freopen":

FILE *myStdout;
myStdout = freopen("c:\\printf_output.txt", "w", stdout);

if(myStdout != NULL)
printf("\nthis text goes to the file and can be parsed afterwards");
fclose(myStdout);

but you need to have the dll-code. i don't know how to manage this if you only have the dll. maybe you then can create another dll as a wrapper.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 2
(2,644 Views)