Re: Anfängerfrage:Warten bis Externes Programm (gnuplot) fertig ist



Ole Hinz schrieb:
[...]
result = _sopen_s( &fd, filename, _O_RDONLY, _SH_DENYNO, _S_IREAD );
if ((fd == ~0) || (result != 0)) return -1;
// abfragen der dateigröße mit _fstat
result = _fstat( fd, &buf );

Warum open und fstat/_fstat statt einfach nur stat/_stat?

Wobei es _sopen_s nur für Visual Studio 2005 gibt.
Wenn schon Microsoft-only dann CreateFile und GetFileSize,
das ist wenigstens Compiler-unabhängig.

Allerdings hat *nichts* davon etwas mit ANSI C zu tun.

--
.