Hi guys,
Eric Tanguy asked on wine-users a while back about getting some geography games (http://olivier.leflon.free.fr/jeux/jeux.htm) to run. These seem to be Visual Basic, so oleaut32 issues come up. We succeeded with the first one (departments of France - font size problem fixed). Next, there is the issue that some of them call GetIDsOfNames on ole font objects (countries of Europe, http://olivier.leflon.free.fr/jeux/europe.htm). OLEFontImpl_GetIDsOfNames is currently a stub. What's needed is basically just to convert the strings "Name", "Size", "Bold", etc. into DISPID_FONT_NAME, etc. In particular, this game only needs "Size."
It's not hard to code that, and make the game work. I'm not sure, though, what the proper approach would be for an acceptable patch:
1. Just code in the string comparisons, ignoring the locale. (Google provides no evidence that the property names vary by locale).
2. Call GetTypeInfo to get an ITypeInfo, and call DispGetIDsOfNames on that. I think this means that the information should be extracted from stdole32.tlb. Currently this doesn't find any match for these property names. Do they need to be added to stdole32.tlb somehow?
3. Something else.
Any ideas?
Thanks, Walter
Walt Ogburn wrote:
Hi guys,
Eric Tanguy asked on wine-users a while back about getting some geography games (http://olivier.leflon.free.fr/jeux/jeux.htm) to run. These seem to be Visual Basic, so oleaut32 issues come up. We succeeded with the first one (departments of France - font size problem fixed). Next, there is the issue that some of them call GetIDsOfNames on ole font objects (countries of Europe, http://olivier.leflon.free.fr/jeux/europe.htm). OLEFontImpl_GetIDsOfNames is currently a stub. What's needed is basically just to convert the strings "Name", "Size", "Bold", etc. into DISPID_FONT_NAME, etc. In particular, this game only needs "Size."
It's not hard to code that, and make the game work. I'm not sure, though, what the proper approach would be for an acceptable patch:
... 2. Call GetTypeInfo to get an ITypeInfo, and call DispGetIDsOfNames on that. I think this means that the information should be extracted from stdole32.tlb. Currently this doesn't find any match for these property names. Do they need to be added to stdole32.tlb somehow?
Yes, the typelib approach is the correct one. You need to use stdole2.tlb instead of stdole32.tlb though.
On Mon, 12 Sep 2005, Robert Shearman wrote:
Walt Ogburn wrote:
... 2. Call GetTypeInfo to get an ITypeInfo, and call DispGetIDsOfNames on that. I think this means that the information should be extracted from stdole32.tlb. Currently this doesn't find any match for these property names. Do they need to be added to stdole32.tlb somehow?
Yes, the typelib approach is the correct one. You need to use stdole2.tlb instead of stdole32.tlb though.
Right, thanks. I think that means that OLEFontImpl_GetTypeInfo needs to get IFontDisp from stdole2.tlb instead of IDispatch from stdole32.tlb. That way, you can use GetTypeInfo and DispGetIDsOfNames together to implement GetIDsOfNames. I'll submit some tests and proposed patches soon.
- Walter