Web lists-archives.com

Re: [Mingw-users] CreateFileA issue




Thanks.
If i can figure out how to see GetLastError()
i will let you know, but stdout is missing of course
and our custom wish does not have a "console".
I think i should be able to, but I am more a wish programmer than C.
(The CreateFileA code in question is contributed.)
At the moment CreateFileA just returns INVALID_HANDLE_VALUE

On Sat, Jan 2, 2016 at 6:52 PM, Eli Zaretskii <eliz@xxxxxxx> wrote:
>> Date: Sat, 2 Jan 2016 16:48:12 +1000
>> From: Steve A <stevenaaus@xxxxxxxxx>
>>
>> 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.
>
> Failing how?  Is there an error code when it fails returned by
> GetLastError?  If so, what is the code?
>
>>   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
>
> These versions seem to be old, in both cases.  Not sure if that's
> related.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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

------------------------------------------------------------------------------
_______________________________________________
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