creation.
You also won't be able to delete files case-sensitively by DeleteFile.
FILE_FLAG_DELETE_AFTER_CLOSE, or native functions has to be used instead.
"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:exYPkycFHHA.536@TK2MSFTNGP02.phx.gbl...
Try FILE_FLAG_POSIX_SEMANTICS for case sensitivity.
I'm happy to report that the use of that flag causes less grief than I
thought it might have. When I tried to create "foo.h" and "Foo.h" the
second creation failed.
Regards,
Will
#include <windows.h>
void create(const char *psz)
{
DWORD dwWritten;
HANDLE h;
h = CreateFile(psz, GENERIC_WRITE, 0, 0, CREATE_NEW,
FILE_FLAG_POSIX_SEMANTICS, 0);
if ( h != INVALID_HANDLE_VALUE )
{
WriteFile(h, psz, strlen(psz), &dwWritten, 0);
CloseHandle(h);
}
}
int main()
{
DeleteFile("foo.h");
DeleteFile("Foo.h");
create("foo.h");
create("Foo.h");
return 0;
}