qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] QCOW/QCOW2 for win32


From: Jamie Lokier
Subject: Re: [Qemu-devel] QCOW/QCOW2 for win32
Date: Mon, 11 Sep 2006 22:53:35 +0100
User-agent: Mutt/1.4.1i

Kazu wrote:
> > Kazu wrote:
> >> Patch.
> >> http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060906-qcow.patch
> > 
> >>>  #ifdef QEMU_TOOL
> >>> -    overlapped = 0;
> >>> +    overlapped = FILE_ATTRIBUTE_NORMAL;
> >>>  #else
> >>>      overlapped = FILE_FLAG_OVERLAPPED;
> >>>  #endif
> > 
> > I suspect the second value should be (FILE_ATTRIBUTE_NORMAL |
> > FILE_FLAG_OVERLAPPED).  But I'm no Win32 expert.
>
> I think FILE_ATTRIBUTE_NORMAL is only used without other options.

I think that is true only for "attribute" options, i.e. those
beginning with FILE_ATTRIBUTE_* and not those beginning with
FILE_FLAG_*.

The Microsoft CreateFile documentation is not very clear:
"FILE_ATTRIBUTE_NORMAL: A file does not have other attributes
set. This attribute is valid only if used alone.".  But it does
distinguish between attributes and flags.

It also explains that the attributes are only used when creating a
file, not when opening an existing one.  Whereas the flags affect the
operation of open file handles, even if the file already exists.

But as I say, I'm no win32 expert.

-- Jamie




reply via email to

[Prev in Thread] Current Thread [Next in Thread]