example code appending files with w32api broken?
hintak_leung at yahoo.co.uk
Mon Jan 18 01:41:13 CST 2010
I needed a WIN32 API based file-appending solution to fix a bug
(http://bugs.winehq.org/show_bug.cgi?id=21394) and using the example code
as reference, I have got a somewhat working solution, except if I follow the code, the WriteFile part for appending fails.
Then I have cross-gcc compiling that example source code standard-alone, and the resulting executable won't append under wine cmd either. So it looks like either the example code is wrong, or wine's implementation of WriteFile() is a bit broken sometimes. I have determined the ReadFile succceeds and the SetFilePointer() also work)
So I have two questions - (1) can somebody tell if there is something obviously wrong with the example, (2) can somebody say if it is because wine is not working e.g. SetPointer doesn't work?
On a general question: what's the policy of patches based on MSDN example code like this? I mean, assuming the example does the job, it is quite difficult to write file-appending code which isn't quite similiar to that.
More information about the wine-devel