Re: [Mingw-users] CreateFileA issue
- Date: Sun, 3 Jan 2016 21:43:29 +1000
- From: Steve A <stevenaaus@xxxxxxxxx>
- Subject: Re: [Mingw-users] CreateFileA issue
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.
>>> 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
MinGW-users mailing list
This list observes the Etiquette found at
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: