Web lists-archives.com

[Mingw-users] CreateFileA issue




Hi,
We cross compile our project for win32 and win64.
But we have a bug on some platforms - well most.
We do a fast file open and read inited with CreateFileA
FILE_FLAG_SEQUENTIAL_SCAN.
It works great compiled on our old fed14 system.
File reads about 4 or 5 times faster than otherwise.

m_file = CreateFileA(
                                        filename,
                                        GENERIC_READ,
                                        0,
                                        0,
                                        OPEN_EXISTING,
                                        FILE_FLAG_SEQUENTIAL_SCAN |
FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_TEMPORARY,
                                        0);

but CreateFileA is failing for us at runtime when compiled on many
other systems. eg mint17 64 bit (and mint15 32 bit) for win32,
and also my mate's system for win64. We can sucessfully open files
conventionally on these systems though.

  mint17 64 bit:
binutils-mingw-w64-i686  2.23.52.20130620-1ubuntu1+3build1
g++-mingw-w64-i686   4.8.2-10ubuntu2+12
gcc-mingw-w64-base  4.8.2-10ubuntu2+12
gcc-mingw-w64-i686   4.8.2-10ubuntu2+12
mingw-w64-common     3.1.0-1
mingw-w64-i686-dev     3.1.0-1

  But it works when compiled on fed14 amd64 (for win32)
mingw32-pthreads-2.8.0-10.fc13.noarch
mingw32-runtime-3.15.2-5.fc13.noarch
mingw32-w32api-3.14-1.fc14.noarch
mingetty-1.08-4.fc12.x86_64
mingw32-filesystem-64-2.fc14.noarch
mingw32-gcc-4.5.0-1.fc14.x86_64
mingw32-binutils-2.20.1-2.fc14.x86_64
mingw32-cpp-4.5.0-1.fc14.x86_64
mingw32-gcc-c++-4.5.0-1.fc14.x86_64

I've done header comparisons for CreateFileA and the flags
but am stumped where the problem may be.

Any ideas ?
thanks, Steven

scidvspc.sf.net , Makefile.mingwx, src/win_mmap.h

------------------------------------------------------------------------------
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@xxxxxxxxxxxxxxxxxxxxx?subject=unsubscribe