"ni user" wrote in message
news:50650000000800000082C40000-1078497998000@exchange.ni.com...
> I'm compiling an external C++ DLL with Borland's compiler then
> importing the DLL into Labwindows. After I create a console
> application I can get the following code to successfully print to the
> console:
> fprintf(stdout, "hello\n");
>
> But:
> OUTFILE = fopen("out.txt", "w");
> fprintf (OUTFILE, "hello\n");
>
> creates the out.txt file but nothing ever gets written to out.txt.
>
> Are there any special requirements needed for FILE I/O or passing FILE
> pointers into a DLL?
When you open the file to check file contents, make sure that the file was
closed after it was written. The file creaotor application also may need to
be exited before checki
ng the file.
HTH
****************
Mohan Pawar