FDI: Constify some variables

James Hawkins truiken at gmail.com
Thu Mar 15 20:49:14 CDT 2007


On 3/15/07, Andrew Talbot <Andrew.Talbot at talbotville.com> wrote:
> James Hawkins wrote:
>
> > Are you checking with the SDK to make sure these changes are legit?
> > This isn't how the Windows SDK fdi.h has these defined.
> >
>
> I ascertained that the function-pointer parameters of FDICreate() should
> have the same signatures as the corresponding low-level file functions
> (e.g., pfnopen should point to a function that takes and returns identical
> parameters to _open(), pfnwrite to _write(). Its pfnopen, is of type
> PFNOPEN and its pfnwrite of type PFNWRITE, so I constified those types to
> match the signatures of _open() and _write(), respectively, and altered the
> functions that were affected.
>

That's not how it works.  PFNOPEN, et al., has a specific definition
that is similar to, but not the same as, the corresponding low-level
file IO function.  If you make a change to a public header, you need
to check the same header in the SDK and make sure that the change is
warranted.  As it stands, this is wrong.

-- 
James Hawkins



More information about the wine-devel mailing list