http://bugs.winehq.org/show_bug.cgi?id=14705
--- Comment #4 from Roel Messiant roelmessiant@gmail.com 2008-10-10 21:06:34 --- Created an attachment (id=16574) --> (http://bugs.winehq.org/attachment.cgi?id=16574) Guideline to fix the registry functions
(In reply to comment #3)
Several patches including unicode fixes just went in to GIT. Please retest and let me know if you think something should be fixed.
I see some of the fixes in the original patch have been commited, which I'm happy about.
Of course I would also like to see the MessageBox calls fixed, as the behaviour on Windows and Reactos does not support its arguments to be resource strings.
On a more constructive note, the original patch was just the tip of the iceberg of the fixes I made on Wordpad, but due to the history of this bug report I don't feel like just giving away the code (yes, I'm a bastard, I know).
I will however give some guidelines on a few of the flaws I found and fixed on my side:
- In the file registry.c, pretty much all functions potentially attempt to close a random registry handle, it doesn't really take all that much bad luck for it to happen either. A guideline to clean up this file is given in the attachment. - DoSaveFile leaks a handle if a WriteFile isn't satisfactory - Why (not quite so accurate) conversions between twips and centimeters when you can use more natural conversions between twips and inches, and inches and micrometers. Micrometers seem quite small but you can still represent values up to 4.2 kilometers if you're using a 32 bit ULONG that stores a micrometer measurement.
Enjoy