>The other process is Visual Studio and the file is <project>.ncb .
> >I have a file that the test opens successfully, but my CreateFile syscall
> >fails on it claiming that it's opened by another process.
>
> So what options are you using differently?
None. The same call, except that I added FILE_FLAG_BACKUP_SEMANTICS .
> >The other process is Visual Studio and the file is <project>.ncb .
>
> What are you trying to do?
Check the size of the file
> I would expect VS to open the NCB file exclusively - it's not the sort
> of thing that it'd want to be opened by another process.
So I guess that this solves the problem: What I'm trying to do can't be done
with opening the file. I found that it can probably be done with
GetFileAttributesEx - see
http://blog.kowalczyk.info/kb/get-file-size-under-windows.html .
David Lowndes - 28 Nov 2007 16:51 GMT
>> >The other process is Visual Studio and the file is <project>.ncb .
>>
>> What are you trying to do?
>Check the size of the file
No need to open it then, just use FindFirstFile, FindClose.
Dave