Web lists-archives.com

Re: [Mingw-users] CreateFileA issue




Actually, our problem is not resolved.
The above fix works for g++-mingw-w64-i686, but not for our 64 bit system, where calling the CreateFileA API
succeeds, but performance is reduced 10 fold or so over the normal file open and read.  :(

And i see now that there are two separate projects. mingw and ming-w64.

The bug could be solely in ming-w64, as it is not evidient on my Fed144/MinGW system.
 If someone from MinGW-W64 could email me with any ideas, it would be appreciated.
Thanks



On Sun, Jan 3, 2016 at 9:43 PM, Steve A <stevenaaus@xxxxxxxxx> wrote:
Our problem was the CreateFileA share permissions, which had
previously worked fine as NULL, now need to be "FILE_SHARE_READ |
FILE_SHARE_WRITE". (Using either one of these alone does not work).
thanks again, Steven

On Sun, Jan 3, 2016 at 9:26 AM, Steve A <stevenaaus@xxxxxxxxx> wrote:
> Sorry mate - maybe we have opened it already.
> Will check it out and get back to you.
>
>
> On Sun, Jan 3, 2016 at 8:46 AM, Steve A <stevenaaus@xxxxxxxxx> wrote:
>> The same error result is given if i replace the
>> FILE_FLAG_SEQUENTIAL_SCAN with FILE_ATTRIBUTE_NORMAL
>>
>> And also if i replace the share flag with FILE_SHARE_READ or
>> FILE_SHARE_WRITE  while using FILE_ATTRIBUTE_NORMAL
>>
>> ... Sorry - it's a bit hard for me to make simple program/case.
>>
>>
>> On Sun, Jan 3, 2016 at 7:47 AM, Steve A <stevenaaus@xxxxxxxxx> wrote:
>>> ERROR_SHARING_VIOLATION 32 (0x20)
>>> "The process cannot access the file because it is being used by
>>> another process."
>>>
>>> But i'm doubtful our program has opened it at all at this stage.
>>> Especially since it works fine on Fed14.
>>>
>>> thanks
>>>
>>>
>>>
>>> On Sat, Jan 2, 2016 at 11:28 PM, Eli Zaretskii <eliz@xxxxxxx> wrote:
>>>>> Date: Sat, 2 Jan 2016 23:18:17 +1000
>>>>> From: Steve A <stevenaaus@xxxxxxxxx>
>>>>>
>>>>> 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".
>>>>
>>>> Open a file and write the error to it.
>>>>
>>>>> 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
>>>>
>>>> Can you show the shortest C program using this call that exhibits the
>>>> problem?

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
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