How to reproduce?
Version 8.00.19 Release candidate #6
Open the Pelles IDE (not as administrator)
Run this sample:
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
size_t string_to_file(char* pszFileName, wchar_t* psz, size_t len)
{
FILE *hFile = fopen(pszFileName, "w");
if (hFile)
{
size_t w = fwrite(psz, sizeof(wchar_t), len, hFile);
if (w != len)
{
assert(0);
}
if (fclose(hFile) != 0)
{
assert(0);
}
return w;
}
else
{
assert(0);
}
return 0;
}
int main(void)
{
string_to_file("c:\\f.txt", L"abc", 3);
return 0;
}
The problem: **no error is reported** by fopen or fwrite or fclose but the file f.txt is not created.
If you open the Pelles IDE as adminstrator , the sample works.