http://bugs.winehq.org/show_bug.cgi?id=2435
Summary: Typelib-generation - probable bug in hash-function Product: Wine Version: 20040813 Platform: All OS/Version: Windows XP Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-ole AssignedTo: wine-bugs@winehq.org ReportedBy: aag@computas.com
I haven't actually used wine - but used some of the sourcecode for wine to write my own functions for parsing existing win32 tlb's (MSFT)
If I rely on the hash-value generated by ctl2_hash_guid in typelib2.c, I get a mismatch with the values in the typelib I examine.
If however I alter the return-statemet from return (hash & 0xf) | ((hash & 0x10) & (0 - !!(hash & 0xe0))); to return (hash & 0xf) | (hash & 0x10); the generated hash-values seems to be correct. I didn't quite figure out what the intention of the part I deleted was anyway...
Regards, Åsmund Grøstad