Re: Any possible fix for tmpfile() on Windows Vista ?
I had the same prolem and created my tmpfile like this if you prefer:
FILE* mytmpfile()
{
char* name = _tempnam( NULL, NULL );
if( !name )
return 0;
FILE* fp = fopen(name, "wb+TD");
LOG("mytmpfile: name=%s\n", name);
// When name is no longer needed :
if(name)
free(name);
return fp;
}
"Timothy Madden" <terminatorul@gmail.com>, iletisinde sunu yazdi,
news:4c80bb44$0$50453$14726298@news.sunsite.dk...
Hello
tmpfile() from <stdio.h> requires administrative privileges to run on
Windows Vista (but not on Windows XP or Windows 7) and will fail if
invoked in a non-elevated process.
Is there a Visual Studio library patch (like dinkumware patches, or STL
port, or a Microsoft VS CRT patch ...) to correct this problem ?
tmpfile() is important for my application because it has this property
that the file returned is automatically deleted when closed. Also it opens
a temporary files without the user having to worry about TEMP/TMP
environment varibles, or GetTemporaryDirectory() or temporary name clashes
/ concurrency ...
Thank you,
Timothy Madden